Use configured zIndex for unmanaged layers

This commit is contained in:
ahocevar
2018-08-15 10:58:33 +02:00
parent a94dff2c06
commit 95533e2425
3 changed files with 42 additions and 6 deletions
+3 -1
View File
@@ -191,7 +191,9 @@ class Layer extends BaseLayer {
this.mapPrecomposeKey_ = listen(map, RenderEventType.PRECOMPOSE, function(evt) {
const layerState = this.getLayerState();
layerState.managed = false;
layerState.zIndex = Infinity;
if (this.getZIndex() === undefined) {
layerState.zIndex = Infinity;
}
evt.frameState.layerStatesArray.push(layerState);
evt.frameState.layerStates[getUid(this)] = layerState;
}, this);