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 was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Readded style layers lose all paint properties #7437
If you remove a layer from a style and add it back in, all its former paint properties are reset to the default values.
To reproduce this issue in macosapp:
Change the style to Streets.
In the Layers sidebar, right-click a symbol layer such as country-layer-lg and go to Delete.
Go to Edit ‣ Undo.
The layer comes back with the right layout properties but the wrong paint properties. For example, the readded symbol layer has the right textField, textSize, textFont, etc. but the wrong textHaloBlur:
Essentially what macosapp does is to hold onto the selected layers for later insertion before removing them from the style. Given that the layout properties are persisted, I’d imagine the problem lies in core rather than at the SDK or application level.
-[MGLStyle layerFromMBGLLayer:] calls [MGL*StyleLayer initWithIdentifier:source:], which sets _pendingLayer to a new mbgl::style::*Layer. This seems like a bug. Among other things rawLayer and _pendingLayer will wind up pointing to different objects, which appears to be the cause of this bug.
Activity
1ec5 commentedon Jan 24, 2017
Moving to v3.5.0 because mbgl changes are needed.
jfirebaugh commentedon Apr 3, 2017
-[MGLStyle layerFromMBGLLayer:]calls[MGL*StyleLayer initWithIdentifier:source:], which sets_pendingLayerto a newmbgl::style::*Layer. This seems like a bug. Among other thingsrawLayerand_pendingLayerwill wind up pointing to different objects, which appears to be the cause of this bug.1ec5 commentedon Apr 3, 2017
Basically
mapbox-gl-native/platform/darwin/src/MGLStyle.mm
Line 356 in dfb737e
mapbox-gl-native/platform/darwin/src/MGLStyle.mm
Line 168 in dfb737e