mirror of
https://github.com/StikDebug/StikDebug.git
synced 2026-10-16 04:20:30 +00:00
In mainland China, published map data is legally required to use the GCJ-02 datum, so MapKit renders AutoNavi tiles and hands back GCJ-02 coordinates. The location simulation service expects WGS-84, so a point picked on the map is currently simulated 100-700 m away from where the user tapped. Convert at locationUpdateCode(for:), the single place where map-derived coordinates -- both the dropped pin and route playback -- leave MapSelectionView. The URL-scheme path in MainTabView is deliberately left alone: stikdebug://simulate-location carries raw WGS-84 from outside the app, so converting there would double-shift it. Coordinates outside the mainland bounding box are returned unchanged, so behaviour everywhere else is bit-for-bit identical. Measured at Tiananmen Square (39.9087, 116.3975): 556.1 m of offset removed; round-trip error 0.000016 m. |
||
|---|---|---|
| .. | ||
| App | ||
| Assets.xcassets | ||
| Core | ||
| Device | ||
| Features | ||
| idevice | ||
| JSSupport | ||
| Scripts | ||
| Services | ||
| StikDebug.icon | ||
| Support | ||
| Views | ||
| Info.plist | ||
| StikDebug.entitlements | ||