When starting vidi with a layer in the url, like #ForvaltningskortDF/11/8.8162/56.0933/fjelstervangvand.ledninger_hovedledning the layer gets correctly parsed. However the layer is already added in the layerTree module, hence the resulting activeLayers ends up like this ['fjelstervangvand.ledninger_hovedledning','fjelstervangvand.ledninger_hovedledning'].
When toggling said layer off, only 1 entry is removed. Key persists in activeLayers - resulting in the layer beeing visible when printing.
A quick fix would be to allow layerTree to control the contents of activeLayers, and just returning result in the following line
When starting vidi with a layer in the url, like
#ForvaltningskortDF/11/8.8162/56.0933/fjelstervangvand.ledninger_hovedledning
the layer gets correctly parsed. However the layer is already added in the layerTree module, hence the resulting activeLayers ends up like this['fjelstervangvand.ledninger_hovedledning','fjelstervangvand.ledninger_hovedledning']
.When toggling said layer off, only 1 entry is removed. Key persists in activeLayers - resulting in the layer beeing visible when printing.
A quick fix would be to allow layerTree to control the contents of activeLayers, and just returning
result
in the following linehttps://github.com/mapcentia/vidi/blob/74cc90fba034c5c785da4ee4dd646bfd79b55f01/browser/modules/layerTree/index.js#L317
to reproduce: