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 Apr 10, 2018. It is now read-only.
Right now, changes to a layer's source, source-layer, or typeproduce a correspondingsetLayerProperty` operation from diffStyles. On the GL JS side, I am pretty sure that the way to handle this will be to remove the layer and create/add a new one.
Does it make more sense for this to happen here or downstream where the change operations are being applied?
Doing it here bakes in the assumption that these properties of a style layer are immutable; doing it downstream means there might be some unweildy logic to watch for cases where one of these operations happens in conjunction with other changes to the layer.
The text was updated successfully, but these errors were encountered:
Two cases:
- Fix#570 - remove/re-add layer when `source`, `source-layer`, or
`type` properties are changed.
- Remove all dependent layers before removing a source; if the source is
being removed and re-added, then the corresponding layers are also
added again afterward. (See mapbox/mapbox-gl-js#3621 (comment))
* Remove/re-add layers when source-related properties change
Two cases:
- Fix#570 - remove/re-add layer when `source`, `source-layer`, or
`type` properties are changed.
- Remove all dependent layers before removing a source; if the source is
being removed and re-added, then the corresponding layers are also
added again afterward. (See mapbox/mapbox-gl-js#3621 (comment))
* Add explainer comment
* Fix lint
* Slightly better readability
* One more comment
Right now, changes to a layer's
source
, source-layer, or
typeproduce a corresponding
setLayerProperty` operation from diffStyles. On the GL JS side, I am pretty sure that the way to handle this will be to remove the layer and create/add a new one.Does it make more sense for this to happen here or downstream where the change operations are being applied?
Doing it here bakes in the assumption that these properties of a style layer are immutable; doing it downstream means there might be some unweildy logic to watch for cases where one of these operations happens in conjunction with other changes to the layer.
The text was updated successfully, but these errors were encountered: