Fix: make sure the background is always below the rendered layers
This commit is contained in:
parent
93630bd1db
commit
2769747737
2 changed files with 2 additions and 1 deletions
|
@ -422,6 +422,7 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
|
|||
map.addSource(background.id, MapLibreAdaptor.prepareWmsSource(background))
|
||||
}
|
||||
if (!map.getLayer(background.id)) {
|
||||
addLayerBeforeId ??= map.getStyle().layers.find(l => l.id.startsWith("mapcomplete_"))?.id
|
||||
console.log(
|
||||
"Adding background layer",
|
||||
background.id,
|
||||
|
|
|
@ -515,7 +515,7 @@ export default class ShowDataLayer {
|
|||
const l = new LineRenderingLayer(
|
||||
map,
|
||||
features,
|
||||
this._options.layer.id + "_linerendering_" + i,
|
||||
"mapcomplete_"+this._options.layer.id + "_linerendering_" + i,
|
||||
lineRenderingConfig,
|
||||
doShowLayer,
|
||||
fetchStore,
|
||||
|
|
Loading…
Reference in a new issue