fix(ios): resolve pending layer waiters - #4288
Open
LukasB-DEV wants to merge 1 commit into
Open
LukasB-DEV wants to merge 1 commit into
LukasB-DEV wants to merge 1 commit into
Conversation
LukasB-DEV
had a problem deploying
to
CI with Mapbox Tokens
August 27, 2026 08:15 — with
GitHub Actions
Failure
LukasB-DEV
had a problem deploying
to
CI with Mapbox Tokens
August 27, 2026 08:15 — with
GitHub Actions
Failure
LukasB-DEV
had a problem deploying
to
CI with Mapbox Tokens
August 27, 2026 08:15 — with
GitHub Actions
Failure
R4ULtv
added a commit
to R4ULtv/rail-radar
that referenced
this pull request
Sep 26, 2026
A map button, grouped with the locate button on one surface like Apple Maps' controls, opens a sheet to pick the simple map (Mapbox's light and dark styles, still the default) or the street map (Mapbox Standard with its day or night light preset, without transit labels or 3D objects). Each option has a preview of Milano Centrale in that style and theme, and the choice is saved to map-style.json. The sheet has a centered title and the map credits, which move out of the search sheet into a shared component. Standard keeps its Mapbox Streets tiles inside its import, so the street map loads them as a source of its own for the railway lines, and the lines, icons and labels use full emissive strength so its night lighting doesn't darken them. A style switch adds the railway lines again on top of the stations, so they're pinned below the station layers with belowLayerID and mounted after them, since rnmapbox 10.3.5 on iOS never adds a layer that waits for one that isn't on the map yet (rnmapbox/maps#4288).
Contributor
|
@LukasB-DEV thanks for the fix, and sorry it took so long to get to it. Could you merge the latest |
This branch had an error being deployed
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.
Description
On iOS, a layer mounted with
belowLayerIDbefore its anchor layer exists is queued bywaitForLayerWithID. However,RNMBXMapView.layerAdded(_:)was left as a TODO, so the queued callbacks were never invoked after the anchor layer was added.As a result, the dependent layer remained absent from the map.
This change removes and invokes the callbacks waiting for the newly added layer. It mirrors the existing Android implementation and also prevents fulfilled callbacks from remaining retained in
layerWaiters.This is a general iOS layer-ordering issue and is not specific to an application integration.
No linked issue.
Reproduction and verification
Tested against unmodified
mainEnvironment:
@rnmapbox/maps10.3.5Before the fix:
FAIL: WAITING LAYER MISSINGbelowLayerID="anchor-layer"was absent.After the fix:
PASS: WAITING LAYER RENDEREDChecklist
CONTRIBUTING.mdyarn generatein the root folderyarn generatecompleted successfully and produced no changes./exampleapp.Screenshot OR Video
Before — unfixed
main:After — commit 9af2571:
Tests
yarn generate— passed, generated tree remained unchangedyarn test— passed, 22 test suites and 112 testsyarn typecheck— passedgit diff --check— passedComponent to reproduce the issue you're fixing
BugReportExample.js