[view/map][xs] Fix lat/lon parsing (eg geoms in Greenwich can have lon 0)
This commit is contained in:
@@ -356,7 +356,7 @@ my.Map = Backbone.View.extend({
|
|||||||
// We'll create a GeoJSON like point object from the two lat/lon fields
|
// We'll create a GeoJSON like point object from the two lat/lon fields
|
||||||
var lon = doc.get(this.state.get('lonField'));
|
var lon = doc.get(this.state.get('lonField'));
|
||||||
var lat = doc.get(this.state.get('latField'));
|
var lat = doc.get(this.state.get('latField'));
|
||||||
if (lon && lat) {
|
if (!isNaN(parseFloat(lon)) && !isNaN(parseFloat(lat))) {
|
||||||
return {
|
return {
|
||||||
type: 'Point',
|
type: 'Point',
|
||||||
coordinates: [lon,lat]
|
coordinates: [lon,lat]
|
||||||
|
|||||||
Reference in New Issue
Block a user