Skip to content

Size 3D tiled markers by the camera's level, not the tile's - #20

Merged
wf9a5m75 merged 1 commit into
developfrom
fix/scene-marker-tile-size
Oct 30, 2026
Merged

wf9a5m75 merged 1 commit into
developfrom
fix/scene-marker-tile-size

Conversation

@wf9a5m75

Copy link
Copy Markdown
Contributor

What was wrong

On the 3D SceneView, the post office pins in some parts of the screen came out about half the size of the 2D map's: 26px against 41px on a Pixel (2.125x).

The SceneView picks a level per tile from the ground it covers on the globe, so one screen mixes two levels. Tile requests at the sample's start were z=11 (55) and z=10 (35), side by side. The marker tile renderer draws every tile's icons at the same pixel size. A z=11 tile is shown at half the size of a z=10 tile, so its pins were half as large.

Fix

On the 3D view only, tiled icons are drawn at 2^(tile level − camera level). The app's iconScaleCallback is asked for the camera's level (round(zoom)), as on the 2D map. When the camera's level changes, the marker layer is redrawn through the existing updateRasterLayerSource.

The 2D map is unchanged.

An earlier attempt drew every 3D tile at half size, assuming a fixed one-level offset. It doubled the pins that were already right, so it was dropped.

Checked on a device (Pixel, 2.125x, post office sample)

Pin diameter (median) Uniform across screen
Google 41px yes
ArcGIS 2D 41px yes
ArcGIS 3D before 26px no (half-size area in the south-west)
ArcGIS 3D after 40px yes

testDebugUnitTest passes. ktlintCheck reports two existing issues, in ArcGISMapView2DController.kt and ArcGISRasterLayerOverlayRenderer.kt; this change does not touch either file.

Not checked: zooming across a level boundary on the 3D view, which redraws the layer.

The 3D SceneView picks a level per tile from the ground it covers on the
globe, so one screen mixes two levels (z=10 and z=11 side by side on a
Pixel at the post office sample). A tile one level deeper is shown at half
the size, and its pins came out half as large as the 2D map's: 26px against
41px, next to correct ones.

Tiled icons on the 3D view are now drawn at 2^(tile level - camera level),
and the app's icon scale callback is asked for the camera's level, as on
the 2D map. The layer is redrawn when the camera's level changes. On the
same device every pin now measures 40-41px, matching the 2D map and Google.
@wf9a5m75
wf9a5m75 merged commit 5c862e2 into develop Oct 30, 2026
2 checks passed
@wf9a5m75
wf9a5m75 deleted the fix/scene-marker-tile-size branch October 30, 2026 08:14
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