bg6rsh has ported the original Traccar to create a China-specific version supporting Chinese maps with the GCJ-02 standard. The basic principle involves converting received raw data via WGS-to-GCJ transformation and storing it in the latitude/longitudefields of the database table tc_positions, while simultaneously backing up the original WGS84 coordinates in newly added columns latitudewgs84/longitudewgs84. Under normal operation, Chinese maps directly use the GCJ-02-converted latitude/longitudecoordinates, maintaining behavior consistent with the original Traccar.
Would it be possible to adopt a similar mechanism to release a version supporting Chinese maps? This could include an option to enable Chinese map support. Upon receiving data, the system would save both the original WGS84 coordinates and the WGS-to-GCJ converted ones to the database. Additionally, a setting in the interface could allow users to select the map data source—either the WGS84 data (latitudewgs84/longitudewgs84) or the GCJ-02 data (latitude/longitude) from the database—thus enabling compatibility with both original maps and Chinese maps.
Does this approach allow for supporting Chinese maps even when MapLibre does not support different projections?
will it be merge to main release version and to official docker release?
Of course it will be in the next official release.
I'm really looking forward to the next version. Thanks!
Tried the preview version—China's AutoNavi maps now display driving tracker correctly, thanks!
But:
- Google road maps show incorrectly, while Google satellite view works fine.
- Suggest adding support for more map providers, such as Baidu Maps [ https://ditu.baidu.com ] and Tencent Maps [ https://map.qq.com ].
Yes, the road traces on Google Maps appear to reflect the typical offset discrepancy between GCJ‑02 and WGS‑84, while the satellite imagery tracks display correctly—at least within mainland China’s mapping scope. This seems to be rooted in Google itself, since even in Google’s hybrid map view, the satellite layer and road layer do not align properly in mainland China scope. However, when displaying them separately, it is still advisable to apply coordinate conversion for accurate overlay. Thanks.
bg6rsh has ported the original Traccar to create a China-specific version supporting Chinese maps with the GCJ-02 standard. The basic principle involves converting received raw data via WGS-to-GCJ transformation and storing it in the latitude/longitudefields of the database table tc_positions, while simultaneously backing up the original WGS84 coordinates in newly added columns latitudewgs84/longitudewgs84. Under normal operation, Chinese maps directly use the GCJ-02-converted latitude/longitudecoordinates, maintaining behavior consistent with the original Traccar.
Would it be possible to adopt a similar mechanism to release a version supporting Chinese maps? This could include an option to enable Chinese map support. Upon receiving data, the system would save both the original WGS84 coordinates and the WGS-to-GCJ converted ones to the database. Additionally, a setting in the interface could allow users to select the map data source—either the WGS84 data (latitudewgs84/longitudewgs84) or the GCJ-02 data (latitude/longitude) from the database—thus enabling compatibility with both original maps and Chinese maps.
Does this approach allow for supporting Chinese maps even when MapLibre does not support different projections?