Skip to content

Commit 75f5399

Browse files
committed
*bo09转wgs84时如果坐标在国外则返回原坐标
1 parent 40a11c3 commit 75f5399

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@
173173
wgs84ToGcj02: wgs84togcj02,
174174
gcj02ToWgs84: gcj02towgs84,
175175
bd09ToWgs84: function (lng, lat) {
176+
if (!isInChina(lng, lat)) {
177+
return [lng, lat]
178+
}
176179
var gcj02 = bd09togcj02(lng, lat)
177180
return gcj02towgs84(gcj02[0], gcj02[1])
178181
},

0 commit comments

Comments
 (0)