投影坐标转经纬度,
proj4.js为转换文件,
1 let wgs84Touying = ‘+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs ‘; 2 let cgcs2000Jingweidu = ‘+proj=tmerc +lat_0=0 +lon_0=120 +k=1 +x_0=500000 +y_0=0 +ellps=GRS80 +units=m +no_defs‘;//120 3 let pt = [589424.9439086914, 3416872.3975219727]; 4 if(pt[0] > 180){ 5 pt = proj4(cgcs2000Jingweidu, wgs84Touying, [589424.9439086914, 3416872.3975219727]) 6 }
投影坐标和经纬度坐标对应关系:
6位投影坐标对应经度lng,对应X, 7位投影坐标对应维度坐标lat, 对应Y
原文:https://www.cnblogs.com/shiyujian/p/14812299.html