You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
onStyleLoadedCallback fires (n - 1) times the map has been loaded #373
I currently need to navigate to a page containing a MapboxMap, and as suggested in the documentation I'm using onStyleLoadedCallback to generate and add all annotations for the map. Unfortunately I have noticed that on first load onStyleLoadedCallback does not fire, and on every subsequent navigation to the map it fires n times for however many times I have navigated to it (after the first navigation to it)
@m0nac0 I also have very little iOS experience.
From what I see in the PR, it users weakReference to avoid capturing and holding the reference inside. Not sure if it is the problem exactly.
At the moment my app is barely usable on iOS due to map issues. I will try to take a look once I have time, but would be best if someone who has more iOS experience could check.
If the iOS SDK is working fine, then the issue should lie in the integration layer somewhere.
@m0nac0 could this be related? Was closed recently and probably is not yet updated in Flutter version: mapbox/mapbox-gl-native-ios#172
I will test on real device today
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Activity
m0nac0 commentedon Aug 7, 2020
@JoelGG Thank you for the report. On what platform (android/iOS/web) and with which flutter and plugin version does this happen?
JoelGG commentedon Aug 11, 2020
@m0nac0 thank you for your reply. This is on iOS and with the latest version of flutter-mapbox-gl available on pub.
m0nac0 commentedon Aug 13, 2020
@JoelGG Thank you. Might be related to #347 and/or #226 (?)
tonnyavery commentedon Sep 5, 2020
The fact that callback fires more than once points to a memory leak.
#389
#370
#226
m0nac0 commentedon Sep 6, 2020
@aaverin I have very little iOS dev experience, do you happen to have tested #370 and know if it fixes these issues?
tonnyavery commentedon Sep 6, 2020
@m0nac0 I also have very little iOS experience.
From what I see in the PR, it users weakReference to avoid capturing and holding the reference inside. Not sure if it is the problem exactly.
At the moment my app is barely usable on iOS due to map issues. I will try to take a look once I have time, but would be best if someone who has more iOS experience could check.
If the iOS SDK is working fine, then the issue should lie in the integration layer somewhere.
tonnyavery commentedon Sep 11, 2020
@m0nac0 could this be related? Was closed recently and probably is not yet updated in Flutter version: mapbox/mapbox-gl-native-ios#172
I will test on real device today
tonnyavery commentedon Sep 4, 2021
This seems to still be an issue on a real device.
onStyleLoadedCallbackis not called reliably on iOSstale commentedon Jan 14, 2022
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
tonnyavery commentedon Jan 14, 2022
Hopefully all style loading issues were resolved in latest PRs