Remove broken dashArray-code, add check

This commit is contained in:
Pieter Vander Vennet 2024-05-30 20:11:57 +02:00
parent b4941ace8f
commit 5a93910b6e
6 changed files with 10 additions and 100 deletions

View file

@ -358,8 +358,13 @@ class LineRenderingLayer {
}
}
if (this._config.dashArray) {
try{
layer.paint["line-dasharray"] =
this._config.dashArray?.split(" ")?.map((s) => Number(s)) ?? null
}catch (e) {
console.error(`Invalid dasharray in layer ${this._layername}:`, this._config.dashArray)
}
}
map.addLayer(layer)