How to create crs for leaflet using pro4js

97 Views Asked by At

I am a newbie to leaflet, and need an crs function sample to create an system that can change the coordinate system from EPSG:3857 to EPSG:3826. The basic library for coordinate I hope to use is proj4js, and I have the sample code as following:

proj4.defs('EPSG:3826', '+proj=tmerc +lat_0=0 +lon_0=121 +k=0.9999 +x_0=250000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs');;
proj4.defs("GOOGLE", "EPSG:3857");
var coord = proj4("EPSG:3826", "GOOGLE", [longitude, latitude]);

However, to create crs for leaflet need more to define, is there any good sample to refer for me to write a library to make that? Any instruction is highly appreciated, thanks a lot.

0

There are 0 best solutions below