Leaflet / Leaflet.VectorGrid

Display gridded vector data (sliced GeoJSON or protobuf vector tiles) in Leaflet 1.0.0
598 stars 194 forks source link

Nothing displayed when usind CRS EPSG4326 #92

Closed tylkomat closed 7 years ago

tylkomat commented 7 years ago

I created an Example at https://github.com/tylkomat/leaflet-vectorgrid-epsg4326 Just clone an run with your favourite webserver, I was using autoreload-server.

When loaded normally via L.geoJSON(...).addTo(map) the map is properly displayed.

perliedman commented 7 years ago

Hi there, I think the problem is that slicer's underlying library, geojson-vt is hardwired to use EPSG:3857 (Spherical Mercator, Leaflet's default projection), see https://github.com/mapbox/geojson-vt/blob/master/src/convert.js#L94. This means it is essentially non-compatible with other projections.

@IvanSanchez perhaps we should see to that slicer throws or at least writes a warning when you try to add it to a map with another projection?

perliedman commented 7 years ago

Related: https://github.com/mapbox/geojson-vt/issues/57