ckan / ckanext-spatial

Geospatial extension for CKAN
http://docs.ckan.org/projects/ckanext-spatial
126 stars 193 forks source link

minimal geojson raises TypeError #95

Closed rpietzsch closed 9 years ago

rpietzsch commented 9 years ago

Using the minimal geoJSON from http://geojsonlint.com/

{
    "type": "Point",
    "coordinates": [
        -105.01621,
        39.57422
    ]
}

Causes a Uncaught TypeError in the geojson preview. No map is loaded.

Uncaught TypeError: Cannot read property 'length' of undefined jquery.min.js:35     
jQuery.extend.each geojson_preview.js:152 
showPreview.L.geoJson.onEachFeature geojson_preview.js:7 
n.GeoJSON.n.FeatureGroup.extend.addData geojson_preview.js:7 
n.GeoJSON.n.FeatureGroup.extend.initialize geojson_preview.js:5 
n.Class.extend.e geojson_preview.js:7 
...

However, a more complicated sample works nicely.

We are using commit 7c2b42693d097884ee4fbb10625274763d0b89a7 from 10 Sep 2014.

Regards, René

amercader commented 9 years ago

Fixed in a96d134, thanks for the report @rpietzsch