Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay adding puck images until adding layer #862

Merged
merged 2 commits into from
Nov 25, 2021
Merged

Conversation

macdrevx
Copy link
Contributor

@macdrevx macdrevx commented Nov 24, 2021

Fixes #860

Pull request checklist:

  • Briefly describe the changes in this PR.
  • Write tests for all new functionality. If tests were not written, please explain why.
  • Apply changelog label ('breaking change', 'bug 🪲', 'build', 'docs', 'feature 🍏', 'performance ⚡', 'testing 💯') or use the label 'skip changelog'
  • Update the changelog

Summary of changes

Fixes an issue that caused the location puck to fail to render if it was configured prior to the style loading and the first location update didn't happen until after the style loaded.

Previously, the style images were added to the style as soon as the puck was activated. However, in the situation described above, the persistent puck layer would not be added until after the style loaded. MapboxCoreMaps clears style images during reload if there are no persistent layers. That meant that the puck images were missing when the puck layer was finally added.

This fix updates the logic to delay adding the images to the style until it's time to add the persistent layer.

@macdrevx macdrevx added the bug 🪲 Something is broken! label Nov 24, 2021
@macdrevx macdrevx enabled auto-merge (squash) November 24, 2021 18:47
@sosthoff
Copy link
Contributor

functional ✅

@macdrevx macdrevx merged commit 5d6f7ad into main Nov 25, 2021
@macdrevx macdrevx deleted the ah/fix-missing-puck branch November 25, 2021 07:30
macdrevx added a commit that referenced this pull request Dec 2, 2021
* Fix StyleColor tests for iOS 12 and lower (#847)

* Make persistent layer APIs non-experimental (#849)

* Generate private module interface (#854)

* Fix changelog (#857)

* Fix to only localize the primary localization and not the fall-throug… (#856)

* Exclude swiftlint config from packaged artifact (#859)

* View Annotations follow-up (#846)

* Reduce geometry wrapping using GeometryConvertible (#861)

* Update baselines to new format (#863)

* Delay adding puck images until adding layer (#862)

* Add missing StyleColor support for exponentials (#873)

* Fix attribution dialog initialization (#865)

* Add v10.0.2 to CHANGELOG.md (#883)

* Improve panning behavior on pitched maps (#888)

* Add pinch gesture tradeoff configuration option (#890)

* Update MapboxCoreMaps and MapboxCommon (#891)

* Update changelog and bump version for v10.2.0-rc.1 (#892)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something is broken!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Puck not showing during initial launch with 10.2.0-beta.1
3 participants