zws-china / wechat-coordinate Goto Github PK
View Code? Open in Web Editor NEW微信小程序经纬度转换,坐标系转换💯 WGS-84(国际标准)、GCJ-02(火星坐标) 、百度坐标相互转换
微信小程序经纬度转换,坐标系转换💯 WGS-84(国际标准)、GCJ-02(火星坐标) 、百度坐标相互转换
直接用你的那个wechat-Coordinate.js 文件就可以了吧????
小程序定位获取的坐标,调用时偏移约500米,使用本工具‘transformFromWGSToGCJ’转换为火星坐标后,定位非常准确 。
用你这个转换,反编码还是不对。
然后用的这个是可以的:https://blog.csdn.net/qq_34775102/article/details/87004878
wcg to jcj02 如果在境内就不用做处理???传进去什么就else了?
let coord = util.transformFromGCJToWGS(result.latitude, result.longitude)
console.log("gcj02", result.latitude, result.longitude);
console.log("wgs84", coord);
console.log("wgs84ToGcj02", util.transformFromWGSToGCJ(coord.lat, coord.lon));
gcj02 初始坐标 25.86076 115.01161
wgs84 {lat: 26.360759999534338, lon: 115.51160999953434}
wgs84ToGcj02 {lat: 26.357383387891318, lon: 115.5165655121619}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.