remove custom layer import only if present
This commit is contained in:
parent
a3dc17d780
commit
96836228db
1 changed files with 5 additions and 1 deletions
|
@ -256,7 +256,11 @@
|
|||
}
|
||||
$customOverlayOrder = $customOverlayOrder.filter((id) => id !== layerId);
|
||||
|
||||
if ($map) {
|
||||
if (
|
||||
$currentOverlays.overlays['custom'] &&
|
||||
$currentOverlays.overlays['custom'][layerId] &&
|
||||
$map
|
||||
) {
|
||||
try {
|
||||
$map.removeImport(layerId);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Reference in a new issue