When I read the post before
, someone said: in fact, the GPS information is accurate, but in China, the longitude and latitude of the map must be false in order to pass the examination and approval of the relevant departments. So if you look at the maps of each family, they all have deviations and false latitudes and longitudes, and they are different from each other. You have to calculate the offset according to the map you are using, and then you can use false latitudes and longitudes on the map to find out the exact location of the map.
may be a coordinate system problem. Your coordinates are in WGS84 format, but Tencent Map coordinates require
in GCJ02 format. You can use the following library to transform coordinates
https://github.com/wandergis/.
.
< hr >
am I not clear enough? Let me show you the description of the map component
in the official document.
you can convert it yourself, or you can let Wechat convert
and let Wechat turn
in getLocation.
type:'wgs84'
Change
to
type:'gcj02'
the reason why the problem has been solved is that if I use the debugging tool of pc Wechat, it will be incorrect. If there is mobile phone debugging, it will be fine
.