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.
I am using Mapbox with Fusetools. I am adding multiple layers on a map and they are displayed perfectly. But when I change map style, all previously added layers are removed.
When you call addLayer or addSource, you are adding that source or layer to your map's current style, not to the map directly. Therefore, you need to add any styles and sources to your new style after that style has finished loading.
We are discussing allowing sources and layers to persist after a style change, but do not have a timeline for that feature. See #6180 for discussions about workarounds. Hope this helps!
Hi,
I am using Mapbox with Fusetools. I am adding multiple layers on a map and they are displayed perfectly. But when I change map style, all previously added layers are removed.
Code for changing map style in iOS:
self.mapView.styleURL = [[NSURL alloc] initWithString:mapStyle];
And for Android:
mapboxMap.setStyleUrl(mapStyle);
Should changing map style affect all added layers? Should I need to add layer again?
The text was updated successfully, but these errors were encountered: