diff --git a/sandbox.html b/sandbox.html
index 07451564..f25119c9 100644
--- a/sandbox.html
+++ b/sandbox.html
@@ -700,7 +700,10 @@
"type":"Polygon"
}
}
-
{"type": "locationFinder", "query": "Hamburg"}
+ {
+ "type": "locationFinder",
+ "query": "Hamburg"
+}
{
"type": "static",
"extent": [9.585571,53.38169,10.483704,53.859007]
@@ -708,7 +711,7 @@
{"type": "layerData"}
{
"type": "layerData",
- "layers": ["Messstellen", "Gewässer"]
+ "layers": ["Messstellen", ["Gewässer", "Gewässername"]]
}
diff --git a/src/cadenza.js b/src/cadenza.js
index df57ddf5..9895e247 100644
--- a/src/cadenza.js
+++ b/src/cadenza.js
@@ -800,7 +800,7 @@ export class CadenzaClient {
#setExtentStrategy(/** @type {ExtentStrategy | undefined} */ extentStrategy) {
const type = extentStrategy?.type;
// Other extent strategies are handled via URL parameters.
- if (type === 'geometry' || type === 'static') {
+ if (type === 'geometry' || type === 'layerData') {
this.#postEvent('setExtentStrategy', extentStrategy);
}
}
@@ -1469,6 +1469,8 @@ function sanitizeExtentStrategy({
return { type: 'geometry', geometry };
}
break;
+ default:
+ return extentStrategy;
}
}
if (mapExtent) {