I have different layers with different CRS requirements. Since you cannot set CRS per-layer, but only per-map, I need to change the CRS for my map at runtime, depending on which layer is selected. How do I do this in Leaflet?


The current version of Leaflet (1.3.x) does not have the feature to change the map's CRS at runtime. It's simply not possible.

Possible alternatives are: reprojecting your data so all your layers use the same CRS; or removing all layers from the map, destroying the map, creating a new instance of the map, and adding all layers back.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.