diff --git a/src/view-map.js b/src/view-map.js index 412ab2c7..8e622a0a 100644 --- a/src/view-map.js +++ b/src/view-map.js @@ -345,8 +345,11 @@ my.Map = Backbone.View.extend({ if (this.state.get('geomField')){ var value = doc.get(this.state.get('geomField')); if (typeof(value) === 'string'){ - // We have a GeoJSON string representation - return $.parseJSON(value); + // We *may* have a GeoJSON string representation + try { + return $.parseJSON(value); + } catch(e) { + } } else { // We assume that the contents of the field are a valid GeoJSON object return value;