Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Remove z index from hover layer and add/move hover layer one step above hovered layer.
Add addInternalLayer method for mapmodule which sets z index for layer to keep internal layer above 'normal' layers. Mapmodule has method for ordering layers by z index which is used AfterRearrangeSelectedMapLayerEvent.
https://github.com/oskariorg/oskari-frontend/blob/develop/bundles/mapping/mapmodule/MapModuleClass.ol.js#L971
Don't know if z indexes were used but at least didn't find current usage. Maybe it could be removed or order layers also on addLayer. Layers could be also added directly to ol map which isn't handled by mapmodule. So the order in map's layer collection/array may vary (even mapmodule addLayer sorts array by z index).
"At rendering time, the layers will be ordered, first by Z-index and then by position"
Removed bringToTop from vectorlayerplugin because it was used only after addLayer which already adds it on top.