1

From the Leaflet.js documentation it states that it uses a default CRS of 3857.

This implies that if I am going to generate points with PostGIS based on polygons, or points created by drawing or dropping on Leaflet.js canvas, I would need to use the following SQL:

SELECT ST_SetSRID(ST_MakePoint(lng, lat),3857)

Bill
  • 111
  • 4

1 Answers1

1

If you are generating coordinates or geojson or something on the server to bring into Leaflet then you most likely want the coordinates to be in decimal degrees in the WGS84 datum (EPSG:4326).

Leaflet displays data in Web Mercator (EPSG:3857), but this conversion is implicit.

See this question and discussion for more information, especially the point:

In Most Mapping API,s You can give the coordinates in Lat-long, and the API automatically transforms it to the appropriate Web Mercator coordinates.

toms
  • 6,978
  • 1
  • 25
  • 30