Repository Details
Shared by
HelloGitHub Rating
0 ratings
一个处理地理坐标的轻型 JS 库
Past 7 days Received 2 stars ✨
Use arrow keys to explore dates, Home and End for the first and last date, Escape to dismiss.| Date | Star | Daily change |
|---|---|---|
| 周二 | 3,324 | — |
| 周三 | 3,325 | +1 |
| 周四 | 3,324 | -1 |
| 周五 | 3,325 | +1 |
| 周六 | 3,325 | 0 |
| 周日 | 3,325 | 0 |
| 周一 | 3,326 | +1 |
3.3k
Stars
Yes
Chinese
TypeScript
Language
Yes
Active
8
Contributors
4
Issues
No
Organization
None
Latest
401
Forks
MIT
License
一个处理地理坐标的轻型 JS 库。由于处理国内对于地理坐标有特殊的政策,导致从 API 得到的地理坐标放在百度地图或高德地图上会有数百米的偏移,gcoord 可以将坐标在不同坐标系下转换,修正偏移。转换为百度地图坐标系的示例代码:
```javascript
var result = gcoord.transform(
[ 116.403988, 39.914266 ], // 经纬度坐标
gcoord.WGS84, // 当前坐标系
gcoord.BD09 // 目标坐标系
);
console.log( result ); // [ 116.41661560068297, 39.92196580126834 ]
```
Included in:
Vol.25
Comments
Rating:
No comments yet