Skip to content

Keep an explicitly set markerTilingOptions through the content builder - #26

Merged
wf9a5m75 merged 1 commit into
developfrom
fix/tiling-disabled-merge
Nov 7, 2026
Merged

wf9a5m75 merged 1 commit into
developfrom
fix/tiling-disabled-merge

Conversation

@wf9a5m75

@wf9a5m75 wf9a5m75 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

MapViewContent.merge only carried markerTilingOptions over when it was enabled, so it could not tell a fresh content's .Default from a deliberately set .Disabled. buildBlock merges even a single expression into a new MapViewContent, so .Disabled set inside the map's content builder was dropped and tiling stayed on.

Now the content remembers whether the option was set; merge carries any explicitly set value (enabled or disabled, last one wins) and leaves an unset one alone. The public property keeps its type and get/set; the API baseline changes only from a stored property to { get set }.

Tests: MapViewContentMergeTests (7), which fail on the old merge; full suite 334 pass. On an iPad with 2,500 markers on MapLibre, .Disabled in the builder used to give one marker tile source and no individual markers; now no tile source and individual markers. Enabled tiling still tiles. All ios-for-* providers read content.markerTilingOptions the same way, so no provider changes.

MapViewContent.merge carried markerTilingOptions over only when it was
enabled, because a fresh content's .Default and a deliberate .Disabled
could not be told apart. Every builder closure goes through buildBlock,
which merges into a fresh content, so .Disabled set inside the builder
(e.g. the sample's `{ var c = MapViewContent(); ...; return c }()` form)
came out as the default and the markers were tiled anyway. Returning the
content from the map view's closure with `return` skipped the builder,
which is why that form worked.

markerTilingOptions now records whether it was set. merge takes an
explicit setting from the other side whatever its value, so the later
explicit one wins, and leaves an unset one alone, which still reads
.Default. It is the only non-collection field of MapViewContent; the
others are appended. The public property keeps its type and get/set; the
API baseline only changes from a stored to a computed property.
@wf9a5m75
wf9a5m75 merged commit 8709b1a into develop Nov 7, 2026
2 checks passed
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