Repository navigation
Redraw tiles when a tiled marker changes - #11
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
When a tiled marker changes, the controller now:
cacheKey: "v{version}").A burst of updates, such as relabelling hundreds of markers, triggers one rebuild, not one per marker.
Why
update(state:)only rewrote the marker manager. Nothing reached the map.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:
Works with ios-sdk-core 1.3.2; it does not depend on any unreleased core change.