xy-map 1.1.58 → 1.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/xy-map.common.js +14 -17
- package/xy-map.umd.js +14 -17
- package/xy-map.umd.min.js +1 -1
package/package.json
CHANGED
package/xy-map.common.js
CHANGED
|
@@ -70779,23 +70779,20 @@ const gcj02ToWgs84 = coord => {
|
|
|
70779
70779
|
return [lng, lat];
|
|
70780
70780
|
}
|
|
70781
70781
|
|
|
70782
|
-
//
|
|
70783
|
-
|
|
70784
|
-
|
|
70785
|
-
|
|
70786
|
-
|
|
70787
|
-
|
|
70788
|
-
|
|
70789
|
-
|
|
70790
|
-
|
|
70791
|
-
|
|
70792
|
-
|
|
70793
|
-
|
|
70794
|
-
|
|
70795
|
-
|
|
70796
|
-
}
|
|
70797
|
-
}
|
|
70798
|
-
return [mLng, mLat];
|
|
70782
|
+
// 计算偏移量
|
|
70783
|
+
let dLat = transformLat(lng - 105.0, lat - 35.0);
|
|
70784
|
+
let dLng = transformLng(lng - 105.0, lat - 35.0);
|
|
70785
|
+
let radLat = lat / 180.0 * PI;
|
|
70786
|
+
let magic = Math.sin(radLat);
|
|
70787
|
+
magic = 1 - ee * magic * magic;
|
|
70788
|
+
let sqrtMagic = Math.sqrt(magic);
|
|
70789
|
+
dLat = dLat * 180.0 / (a * (1 - ee) / (magic * sqrtMagic) * PI);
|
|
70790
|
+
dLng = dLng * 180.0 / (a / sqrtMagic * Math.cos(radLat) * PI);
|
|
70791
|
+
|
|
70792
|
+
// GCJ-02 to WGS-84
|
|
70793
|
+
let wgsLat = lat - dLat;
|
|
70794
|
+
let wgsLng = lng - dLng;
|
|
70795
|
+
return [wgsLng, wgsLat];
|
|
70799
70796
|
};
|
|
70800
70797
|
|
|
70801
70798
|
// 3857墨卡托坐标系转换为4326 (WGS84)经纬度坐标
|
package/xy-map.umd.js
CHANGED
|
@@ -70797,23 +70797,20 @@ const gcj02ToWgs84 = coord => {
|
|
|
70797
70797
|
return [lng, lat];
|
|
70798
70798
|
}
|
|
70799
70799
|
|
|
70800
|
-
//
|
|
70801
|
-
|
|
70802
|
-
|
|
70803
|
-
|
|
70804
|
-
|
|
70805
|
-
|
|
70806
|
-
|
|
70807
|
-
|
|
70808
|
-
|
|
70809
|
-
|
|
70810
|
-
|
|
70811
|
-
|
|
70812
|
-
|
|
70813
|
-
|
|
70814
|
-
}
|
|
70815
|
-
}
|
|
70816
|
-
return [mLng, mLat];
|
|
70800
|
+
// 计算偏移量
|
|
70801
|
+
let dLat = transformLat(lng - 105.0, lat - 35.0);
|
|
70802
|
+
let dLng = transformLng(lng - 105.0, lat - 35.0);
|
|
70803
|
+
let radLat = lat / 180.0 * PI;
|
|
70804
|
+
let magic = Math.sin(radLat);
|
|
70805
|
+
magic = 1 - ee * magic * magic;
|
|
70806
|
+
let sqrtMagic = Math.sqrt(magic);
|
|
70807
|
+
dLat = dLat * 180.0 / (a * (1 - ee) / (magic * sqrtMagic) * PI);
|
|
70808
|
+
dLng = dLng * 180.0 / (a / sqrtMagic * Math.cos(radLat) * PI);
|
|
70809
|
+
|
|
70810
|
+
// GCJ-02 to WGS-84
|
|
70811
|
+
let wgsLat = lat - dLat;
|
|
70812
|
+
let wgsLng = lng - dLng;
|
|
70813
|
+
return [wgsLng, wgsLat];
|
|
70817
70814
|
};
|
|
70818
70815
|
|
|
70819
70816
|
// 3857墨卡托坐标系转换为4326 (WGS84)经纬度坐标
|