[view/map][xs] Fix lat/lon parsing (eg geoms in Greenwich can have lon 0)
This commit is contained in:
parent
9ed43dfdc6
commit
1655690bc8
@ -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]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user