-
Notifications
You must be signed in to change notification settings - Fork 142
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
bug: changeing style messes up z-index with other layers #43
Comments
Hi, Markers and other layers added at runtime become part of the style object, and setStyle diffs the old and new style, so markers/other custom layers not present in the "new" style will be removed; you'll need to preserve the markers and re-add them to the modified map (see here, and here for discussion). As a workaround in my project I'm using a boolean variable (mapIsLoading) to temporary remove Example:
|
(Sorry for being late on this, I took a little break on ngx-mapbox-gl + followed by some small holidays) This is something my buddy at react-mapbox-gl noticed (https://github.com/alex3165/react-mapbox-gl/blob/master/src/layer.ts#L194), but when I started ngx-mapbox-gl I didn't reproduce the issue somehow... |
Hey,
when you change the mgl-map style and you have a layer with markers p.e. the markers get lost. I could bet that this is a z-index issue. I will try to find a bugfix.
You can reproduce the issue be adapting the "change a maps style" demo according to this:
The text was updated successfully, but these errors were encountered: