Skip to content

Commit 40a11c3

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

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
@@ -177,6 +177,9 @@
177177
return gcj02towgs84(gcj02[0], gcj02[1])
178178
},
179179
wgs84ToBd09: function (lng, lat) {
180+
if (!isInChina(lng, lat)) {
181+
return [lng, lat]
182+
}
180183
var gcj02 = wgs84togcj02(lng, lat)
181184
return gcj02tobd09(gcj02[0], gcj02[1])
182185
}

0 commit comments

Comments
 (0)