Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

felix-ht
Copy link
Collaborator

sometimes on style loaded would still not be called. This is fixed by removing a check on mapReadyResult that could cause a race condition.

@felix-ht felix-ht requested a review from tonnyavery November 24, 2021 13:56
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN November 24, 2021 13:56 Inactive
@felix-ht felix-ht temporarily deployed to ANDROID_CI_DOWNLOADS_TOKEN November 24, 2021 13:56 Inactive
@felix-ht felix-ht added ios bug Something isn't working labels Nov 24, 2021
if isStyleReady && !isStyleReadyNotified {
if isStyleReady && !onStyleLoadedCalled {
if let channel = channel {
onStyleLoadedCalled = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we first invoke the callback and only the set the boolean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed that on purpose. As soon as this if is entered the callback will be sent here. So this could avoid calling onStyleLoaded more than once.

@felix-ht felix-ht merged commit 743b2bf into master Nov 24, 2021
TheHumr added a commit to MobileSoftHK/maps that referenced this pull request Jan 12, 2022
m0nac0 added a commit to maplibre/flutter-maplibre-gl that referenced this pull request May 19, 2022
m0nac0 added a commit to maplibre/flutter-maplibre-gl that referenced this pull request May 19, 2022
…being called (#82)

Cherry-pick upstream#787 (fixed more issues with on style loaded not being called)

https: //github.com/flutter-mapbox-gl/maps/pull/787

Co-authored-by: Felix Horvat <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants