[view/map][xs] Fix lat/lon parsing (eg geoms in Greenwich can have lon 0)

This commit is contained in:
amercader 2012-04-24 14:19:03 +01:00
parent 9ed43dfdc6
commit 1655690bc8

View File

@ -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]