Skip to content

Commit

Permalink
Merge pull request openlayers#16260 from ahocevar/no-layerstate
Browse files Browse the repository at this point in the history
Let isVisible() return false for layers that are not yet rendered
  • Loading branch information
ahocevar authored Oct 10, 2024
2 parents c7993ba + df714e7 commit 26f7490
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ol/layer/Layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ class Layer extends BaseLayer {
layerState = frameState.layerStatesArray.find(
(layerState) => layerState.layer === this,
);
if (!layerState) {
return false;
}
} else {
layerState = this.getLayerState();
}
Expand Down

0 comments on commit 26f7490

Please sign in to comment.