Skip to content

Commit

Permalink
Small fix that closes #1301:
Browse files Browse the repository at this point in the history
It turns out that we can keep the inserting order as before and fix this by just supplying the original layer's zIndex.
I go with layer.getZIndex() right away as it a) exists on all types of Layers in OL and b) always returns a Number according to the API.
  • Loading branch information
jacobwod committed Mar 28, 2023
1 parent bca49bc commit ba33524
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions new-client/src/plugins/Print/PrintModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ export default class PrintModel {
const imageLayer = new ImageLayer({
opacity: layerOpacity,
source: imageSource,
zIndex: layer.getZIndex(),
});
// Finally we add the new layer to the map... First we have to check where
// the original layer was placed (so that it keeps its draw-order).
Expand Down

0 comments on commit ba33524

Please sign in to comment.