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 }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Style changes - either through setStyleURL or through automatic style reloads - will lose programmatically added/customized layers, attributes. This is expected, but if we have a data stream that is live updating data we would like to know when the style is about to be loaded/reloaded so we can pause the data stream or any other work we are doing with the layers until the time that map has finished loading with the style. We sometimes also want to save the state of a layer or grab information from it before it goes away.
Current delegate methods get called after the style is set to nil - we would like a "will" callback that is called before the style is set to nil.
Platform:
iOS or Android Mapbox SDK version:
4.x/6.x
Steps to trigger behavior
Load a style
Create a thread that updates layer data in realtime streaming from an endpoint
Reload the style
Expected behavior
Get a callback that the style is about to go away.
Actual behavior
Get a callback after the style has already been set to nil.
The text was updated successfully, but these errors were encountered:
If it is the style rather than vector tiles that you want to observe, then you can use -[MGLMapViewDelegate mapView:didFinishLoadingStyle: to find out when the style finishes loading. If you need more granularity than that, consider key-value observing MGLMapView’s style key path.
Completion handlers for style loading are proposed in #6386 (comment), but that’s for manual style loading or reloading, rather than anything automatic on the part of the SDK.
Style changes - either through setStyleURL or through automatic style reloads - will lose programmatically added/customized layers, attributes. This is expected, but if we have a data stream that is live updating data we would like to know when the style is about to be loaded/reloaded so we can pause the data stream or any other work we are doing with the layers until the time that map has finished loading with the style. We sometimes also want to save the state of a layer or grab information from it before it goes away.
Current delegate methods get called after the style is set to nil - we would like a "will" callback that is called before the style is set to nil.
Platform:
iOS or Android
Mapbox SDK version:
4.x/6.x
Steps to trigger behavior
Expected behavior
Get a callback that the style is about to go away.
Actual behavior
Get a callback after the style has already been set to nil.
The text was updated successfully, but these errors were encountered: