kartena / Proj4Leaflet

Smooth Proj4js integration with Leaflet.
http://kartena.github.io/Proj4Leaflet/
BSD 2-Clause "Simplified" License
587 stars 172 forks source link

Use with vector tiles #173

Closed davidbrochart closed 4 years ago

davidbrochart commented 4 years ago

I was wondering if proj4leaflet, in combination with the vector tile plugin, could allow to show a map in (virtually) any projection? Do the two plugins play well together?

perliedman commented 4 years ago

Hi, sorry to say, no these two plugins will most likely not work well together. Proj4Leaflet is used to handle map data in other projections than the ones built into Leaflet by default, but it doesn't do reprojection from one CRS to another (except for L.Proj.GeoJSON, which sort of does that).

AFAIK, the Vector Tiles spec does not really allow other projections than WGS84/spherical mercator, but I know some people have worked around that. There might be some possibility to use logic from Proj4Leaflet for this, but it's not what it was built for and to my knowledge no one has tried it.