[GIS] How to draw polygons in leaflet using x and y coordinates instead of lat lng

coordinate systemgeojsonleaflet

I am currently working with leaflet. I was able to draw the polygons with geojson using lat,lng with below code snippet:

var geolayer=L.geoJson(geodata);

But above code uses the latlng for drawing the polygons. Now is there any way possible to draw the polygon using x and y coordinate(eg:1,1)?

Best Answer

The GeoJSON format only supports the WGS84 CRS.

The coordinate reference system for all GeoJSON coordinates is a
geographic coordinate reference system, using the World Geodetic
System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units of decimal degrees.

Please see the website for more information or read the specification here.

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