Skip to content

Calibrate the TomTom zoom offset to 1.735 - #22

Merged
wf9a5m75 merged 1 commit into
developfrom
fix/tomtom-zoom-offset
Nov 13, 2026
Merged

wf9a5m75 merged 1 commit into
developfrom
fix/tomtom-zoom-offset

Conversation

@wf9a5m75

Copy link
Copy Markdown
Contributor

TomTom showed slightly more area than Google Maps at the same unified zoom. This changes TOMTOM_TO_GOOGLE_ZOOM_BASE_OFFSET from 1.76 to 1.735.

Measurement

TB520FU, TomTom Maps SDK 2.7.2. Both maps on the Visible Region page at the same unified zoom and size. The centre scale is the distance between fromScreenOffset points ±200 px from the centre. + means TomTom shows more area.

zoom 1.76 1.735
5 — +0.002 to +0.005
7–19 +0.025 (z ≥ 12, every latitude) within ±0.0015
  • Latitudes 0, 35.68 and 64.95 behave the same, so the log2(cos φ) term was already right.
  • On the CameraSync reference rectangles, the TomTom box went from 1.7% smaller than Google's (Tokyo z12, 870 → 856 px) to the same size (871 → 871 px).
  • At zoom 3 and below, the globe and Mercator projections diverge and no constant matches them.

Changes

  • ZoomAltitudeConverter: the constant, and a comment explaining the calibration.
  • ExampleUnitTest: the pinned offsets now come from the new constant (Tokyo 1.435, Oahu 1.632). testDebugUnitTest passes.

The android-sdk-core golden test pins the formula with its own literal 1.76 and does not read this constant, so it is unaffected.

iOS measured the same 0.025 offset: MapConductor/ios-for-tomtom (same branch name).

With 1.76, TomTom showed 0.025 zoom levels more area than Google Maps at the same unified zoom: the centre scale (coordinateForPoint ±200 px) differed by +0.025 at latitudes 0, 35.68 and 64.95 and zooms 9-19 on the TB520FU, about 1.7% on the CameraSync reference rectangles. With 1.735 the difference is within ±0.0005 from zoom 7 up, and +0.003 at zoom 5. Below that the globe and Mercator projections cannot be matched by a constant.

The latitude term log2(cos φ) was already right, so only the base offset changes. iOS shows the same 0.025 offset and gets the same value.
@wf9a5m75
wf9a5m75 merged commit 8b6fca5 into develop Nov 13, 2026
2 checks passed
@wf9a5m75
wf9a5m75 deleted the fix/tomtom-zoom-offset branch November 13, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant