Large GeoJSON not working w/ MapBox GL -
i've got mapbox gl js setup, won't load large (~75mb) geojson file. console not throw errors, nothing shows on map. file not work located here.
the script has no issues smaller files such this one. loads , gets highlighted.
my code simple (and works smaller datasets):
map.addsource('plutodata', { type: 'geojson', data: 'http://173.254.28.39/~keggera1/reogeo/data/mnmappluto.geojson' }); map.addlayer({ id: 'pluto-fills', type: 'fill', source: 'plutodata', layout: {}, paint: { 'fill-color': '#627bc1', 'fill-opacity': 0.5 } });
i don't detect wrong geojson encoding , can't find size limitations in mapbox documentation.
does know causing this?
this data issue: if @ source of smaller file, pluto.geojson
, you'll see:
[-74.002537,40.733446],[-74.002543,40.733446],[-74.002547,40.733446],
these longitude, latitude coordinates, required geojson standard. if @ mnmappluto.geojson
[[[997277.2344000041,221816.0936000049],[997300.0160000026,221803.44499999285],[997288.5119999945,221782.6930000037],[997286.4176000059,221778.9143999964],[997197.0333999991,221828.3980000019]
these coordinates far outside of longitude, latitude range. you'll need project data wgs84 datum (longitude, latitude units) in order valid geojson , show on map.
Comments
Post a Comment