Skip to content

Commit

Permalink
Merge pull request #1041 from openlayers/background-first
Browse files Browse the repository at this point in the history
Add background as first layer
  • Loading branch information
ahocevar committed Nov 29, 2023
2 parents de6e3ad + 6523290 commit 31023b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/apply.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,9 @@ function setFirstBackground(mapOrLayer, glStyle, options) {
return true;
}
if (mapOrLayer instanceof Map || mapOrLayer instanceof LayerGroup) {
mapOrLayer.getLayers().push(setupBackgroundLayer(layer, options, {}));
mapOrLayer
.getLayers()
.insertAt(0, setupBackgroundLayer(layer, options, {}));
return true;
}
}
Expand Down

0 comments on commit 31023b0

Please sign in to comment.