Tuesday, 6 December 2016

Reprojecting coordinates and geoJSON in leaflet



I have a Leaflet map in default projection and a WMS layer also in default (Web Mercator) projection. I would like to add polylines and a geoJSON layer to my map, but the coordinates are in EPSG4326. I have figured out how to set the entire map projection, passing L.CRS.EPSG4326 into the map object. But as I have a WMS in Web Mercator (no other projection options here), but polylines and geoJSON in EPSG4326, that does not seem to be an option.


I looked at the Proj4Leaflet plugin, but that also seems to pass a CRS into the map object. Any ideas?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...