Custom code (map.apply-layer-preset) gives error
I have the following custom command:
[
{
"name": "map.apply-layer-preset",
"arguments": {
"layerPreset": [
"item://layer-preset/c3bafe77-0757-4c8d-9bee-b34c5e11fa23"
]
}
}
]
When I run it I get the error: e.layerPreset.applyTo is not a function
Can anyone tell me what is wrong with the code? The code-editor doesn't show any errors.
-
Hi @Atze Witteveen? , In this case the command "map.apply-layer-preset" is expecting a single layer preset. If you change your command to:
[
{
"name": "map.apply-layer-preset",
"arguments": {
"layerPreset":
"item://layer-preset/c3bafe77-0757-4c8d-9bee-b34c5e11fa23"
}
}
]
I believe it should work.
0 -
@Scott Anderson? Thank you! That did the trick 😀
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare