-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Satellite view removed existing layer(line or geojson) from street view #8646
Comments
Layers and sources are per style. When you change the style, the new style does not know about the old style's sources and layers so they won't automatically reappear on the map. You'll need to add the line layer to the satellite style when you switch to it. |
Thanks for your response. Is there any shortcut to get already drew layers(Line or geojson), Then apply to satellite style? |
Not really. This is something you'll have to implement yourself however best works in your application. It's common to keep track of what layers have been added/are visible and then loop over them and add them again when the style changes. |
#4006 has some proposals and workarounds. |
Satellite view removed an existing layer(line or geojson) from street view v-9
mapbox-gl-js version:
browser:
Steps to Trigger Behavior
1.street view
2.draw line layer
3.change to Satellite
Link to Demonstration
https://jsbin.com/
Expected Behavior in Satellite
Actual Behavior
The text was updated successfully, but these errors were encountered: