Add Amap geocoder and coordinate util
In China, geolocation encoding is commonly dominated by the use of Gaode Maps(Amap) and Baidu Maps. Other internationally used platforms are not as accurate. Moreover, China has a special system of geographic coordinates(GCJ-02). This merge request implements the geolocation encoding implementation of the Gaode map(Amap).
For this merge request I added two class, CoordinateUtil and AmapGeocoder. CoordinateUtil is mainly used to convert WGS84 to GCJ-02 coordinates, this code reference: https://github.com/dromara/hutool/blob/v5-master/hutool-core/src/main/java/cn/hutool/core/util/CoordinateUtil.java AmapGeocoder implements the interpretation of geographic coordinates of Gaode map(Amap).
Re-worked the code to the code specification and the CI on github has been passed.
I resubmitted the code, mainly modifying the copyright description, replacing abbreviations with complete words, and adjusting the order of latitude and longitude.
In the latest commit version, I added the georeferencing interpreters of the three major map providers in China. This way, users can have more choices.
In the project "traccar-web", the company name of the map manufacturer, "autoNavi", is used as the name. "amap" is a product of "autoNavi". In order to standardise the naming convention, "amap" has been changed to "autoNavi".
In the project "traccar-web", the company name of the map manufacturer, "autoNavi", is used as the name. "amap" is a product of "autoNavi". In order to standardise the naming convention, "amap" has been changed to "autoNavi".
@tananaev In "traccar-web" project, autoNavi (amap) uses GCJ-02 coordinates, but openlayers does not support GCJ-02. As a result, when using autoNavi maps, the position and track of the device will be offset. Has it been considered to support GCJ-02 coordinates on "traccar-web"? I can also contribute code for this feature.
In "traccar-web" project
Let's not discuss it here.
在“traccar-web”项目中,地图制造商“autoNavi”的公司名称被用作名称。“amap”是“autoNavi”的产品。为了统一命名规则,“amap”已更改为“autoNavi”。
大佬,现在代码合并了吗,docker镜像好像没更新?
然后请教下这个配置怎么填
“ <entry key='geocoder.enable'>true</entry>”
“ <entry key='geocoder.key'>1d355462f845e2efb6978b215cb</entry> ” // Web服务
“ <entry key='geocoder.type'>autonavi</entry>”
“ <entry key='geocoder.url'>https://restapi.amap.com/v3/geocode/regeo</entry> ”
现在就是点显示地址没反应
在“traccar-web”项目中,地图制造商“autoNavi”的公司名称被用作名称。“amap”是“autoNavi”的产品。为了统一命名规则,“amap”已更改为“autoNavi”。
大佬,现在代码合并了吗,docker镜像好像没更新? 然后请教下这个配置怎么填
“ <entry key='geocoder.enable'>true</entry>”
“ <entry key='geocoder.key'>**********</entry> ” // Web服务
“ <entry key='geocoder.type'>autonavi</entry>”
“ <entry key='geocoder.url'>https://restapi.amap.com/v3/geocode/regeo</entry> ”现在就是点显示地址没反应
This PR isn't megred yet, and pls hide your geocoder.key or you will leak it
在“traccar-web”项目中,地图制造商“autoNavi”的公司名称被用作名称。“amap”是“autoNavi”的产品。为了统一命名规则,“amap”已更改为“autoNavi”。
大佬,现在代码合并了吗,docker镜像好像没更新? 然后请教下这个配置怎么填
“ <entry key='geocoder.enable'>true</entry>”“ <entry key='geocoder.key'>**********</entry> ” // Web服务“ <entry key='geocoder.type'>autonavi</entry>”“ <entry key='geocoder.url'>https://restapi.amap.com/v3/geocode/regeo</entry> ”现在就是点显示地址没反应This PR isn't megred yet, and pls hide your geocoder.key or you will leak it
thanks, the geocoder.key is not correct 😄
在“traccar-web”项目中,地图制造商“autoNavi”的公司名称被默认名称。“amap”是“autoNavi”的产品。为了统一命名规则,“amap”已更改为“autoNavi”。
大佬,现在代码合并了吗,docker镜像好像没更新? 然后请教下这个配置怎么填
“ <entry key='geocoder.enable'>true</entry>”
“ <entry key='geocoder.key'>1d355462f845e2efb6978b215cb</entry> ” // Web服务
“ <entry key='geocoder.type'>autonavi</entry>”
“ <entry key='geocoder.url'>https://restapi.amap.com/v3/geocode/regeo</entry> ”现在就是点显示地址没反应
Currently the server does not support the address translation of Chinese map manufacturers, although the front-end support for the Gaode map, but there will be a map offset problem, the back-end I have submitted a merger request, the front-end due to the fact that I have more things to do lately, do not have too much time to look at the project, the follow-up I think about how to help the project to solve the problem of Chinese map offset!
waiting for traccar that support chinease map like baidu/amap
有支持gcj02的计划吗?