From 1655690bc81c79de72150b54f91097022fbc652f Mon Sep 17 00:00:00 2001 From: amercader Date: Tue, 24 Apr 2012 14:19:03 +0100 Subject: [PATCH] [view/map][xs] Fix lat/lon parsing (eg geoms in Greenwich can have lon 0) --- src/view-map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view-map.js b/src/view-map.js index 430c89d9..8b63fe15 100644 --- a/src/view-map.js +++ b/src/view-map.js @@ -356,7 +356,7 @@ my.Map = Backbone.View.extend({ // We'll create a GeoJSON like point object from the two lat/lon fields var lon = doc.get(this.state.get('lonField')); var lat = doc.get(this.state.get('latField')); - if (lon && lat) { + if (!isNaN(parseFloat(lon)) && !isNaN(parseFloat(lat))) { return { type: 'Point', coordinates: [lon,lat]