3

Right now Leaflet can only add geometries with latitude and longitude values onto the map.

If we have a EPSG:3857 point, whose x=-11819829 and y=4200860, how can I add it onto the map?

If this point needs to be unprojected as geographical coordinates, how to implement it?

1
  • have a look at cs2cs from the proj4 library and tools project. There are some online conversion tools using it as well. Commented Feb 3, 2014 at 19:29

1 Answer 1

0

Are you sure you have the right projection in mind? According to SpatialReference.org, you're talking about Web Mercator which, as its name implies, has (decimal) degrees as linear units. EPSG 3857 is, in fact, the default projection used by Leaflet and most web mapping frameworks. As the underlying SRS is WGS84, you should be able to treat your EPSG 3857 coordinates as unprojected geographical coordinates (GCS WGS84).

6
  • I was talking about Web Mercator (auxiliary sphere), which is EPSG:3857. I have tried L.Projection.SphericalMercator.unproject and map.unproject. Both failed.
    – G Chen
    Commented Feb 3, 2014 at 19:50
  • @Arthur, the WKT has 2 UNIT objects. One is for the GeoCRS, and the other for the Projected CRS. The overall unit is in metres. Web Mercator (Auxiliary Sphere) is the Esri name for EPSG:3857.
    – mkennedy
    Commented Feb 3, 2014 at 21:23
  • @GChen, have you seen this doc: developer.tomtom.com/docs/read/map_toolkit/javascript_sdk_2_0/…
    – mkennedy
    Commented Feb 3, 2014 at 21:23
  • @mkennedy This document is very helpful! Thanks a lot!
    – G Chen
    Commented Feb 3, 2014 at 22:18
  • 1
    This answer is completely incorrect. EPSG:3857 uses meters as the unit, not degrees. Commented Sep 28, 2016 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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