Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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? Thanks

share|improve this question

1 Answer 1

Leaflet expects GeoJSON to be in EPSG:4326. In fact, the entire API uses 4326 (lat/lng), so you are good to go without any reprojection.

If you need to reproject GeoJSON, you could look at https://github.com/perliedman/reproject.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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