kartena / Proj4Leaflet

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

mixing maps #166

Closed gildronien closed 5 years ago

gildronien commented 5 years ago

Hi,

i'm beginner on projections, CRS... I want show a basic OSM map and switch to a WMTS map with a different projection (3946) (a part of france).

i know do all of this without Proj4leaflet, but the scale of my WMTS is not the same so i can't place markers or polylines.

I would create a 'classic' map type OSM (EPSG:3857) with another layer with the 'same scale' from WMTS.

i work with last version of leaflet.

I hope i'm understanding, thanks

perliedman commented 5 years ago

Hi, unfortunately there's no official way to switch projections in a Leaflet map. If you google it, you can find some issues where people explain workarounds they have found, but it's more or less hacks.

Maybe you already know this, but it's worth noting since Proj4Leaflet can't do raster reprojection, and Leaflet itself also can't, there is no way to mix two layers with different projections at the same time either.