Fix: make sure the background is always below the rendered layers

This commit is contained in:
Pieter Vander Vennet 2023-10-08 19:02:41 +02:00
parent 93630bd1db
commit 2769747737
2 changed files with 2 additions and 1 deletions

View file

@ -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,