Skip to content

Redraw tiles when a tiled marker changes - #11

Merged
wf9a5m75 merged 1 commit into
developfrom
fix/tiled-marker-refresh
Nov 5, 2026
Merged

wf9a5m75 merged 1 commit into
developfrom
fix/tiled-marker-refresh

Conversation

@wf9a5m75

@wf9a5m75 wf9a5m75 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

What

When a tiled marker changes, the controller now:

  • invalidates the marker tiles, and
  • rebuilds the tile layer with a versioned URL (cacheKey: "v{version}").

A burst of updates, such as relabelling hundreds of markers, triggers one rebuild, not one per marker.

Why

  • A tiled marker has no native marker, so the base update(state:) only rewrote the marker manager. Nothing reached the map.
  • Changing a marker's icon or position in place therefore left the drawn tiles as they were.
  • On top of that, the layer URL had no version, so even a rebuilt layer could be served from the map's tile cache.

Swapping the whole marker list (add) was not affected; it already invalidated the tiles.

Checked

On an iPad, with the street-tree sample (144k markers) on MapKit:

  • Changed labels in place, then counted how many already-drawn tiles were drawn again.
  • Before: 0. After: 59.

Works with ios-sdk-core 1.3.2; it does not depend on any unreleased core change.

A tiled marker has no native marker, so the base update() only rewrote the
manager and nothing reached the map: changing an icon or position in place
left the drawn tiles as they were. Invalidate the tiles and rebuild the layer
with a versioned URL, once per burst of updates.
@wf9a5m75
wf9a5m75 merged commit d241d25 into develop Nov 5, 2026
2 checks passed
@wf9a5m75
wf9a5m75 deleted the fix/tiled-marker-refresh branch November 5, 2026 09:09
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