About Traccar support Chinease Map?

mike 23 days ago

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?

Anton Tananaev 22 days ago
mike 22 days ago

will it be merge to main release version and to official docker release?

Anton Tananaev 22 days ago

Of course it will be in the next official release.

mike 20 days ago

I'm really looking forward to the next version. Thanks!

Anton Tananaev 20 days ago

You can already test it on preview if you want:

https://www.traccar.org/preview/

mike 17 days ago

Tried the preview version—China's AutoNavi maps now display driving tracker correctly, thanks!
But:

  1. Google road maps show incorrectly, while Google satellite view works fine.
  2. Suggest adding support for more map providers, such as Baidu Maps [ https://ditu.baidu.com ] and Tencent Maps [ https://map.qq.com ].
Anton Tananaev 16 days ago
  1. What is incorrect exactly? Does Google also use offset?
  2. Feel free to send pull requests or feature requests.
mike 16 days ago

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.