Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CADENZA-37531 and CADENZA-38242: #71

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -700,15 +700,18 @@
"type":"Polygon"
}
}</pre></li>
<li><pre>{"type": "locationFinder", "query": "Hamburg"}</pre></li>
<li><pre>{
"type": "locationFinder",
"query": "Hamburg"
}</pre></li>
<li><pre>{
"type": "static",
"extent": [9.585571,53.38169,10.483704,53.859007]
}</pre></li>
<li><pre>{"type": "layerData"}</pre></li>
<li><pre>{
"type": "layerData",
"layers": ["Messstellen", "Gewässer"]
"layers": ["Messstellen", ["Gewässer", "Gewässername"]]
}</pre></li>
</ul>
</p>
Expand Down
4 changes: 3 additions & 1 deletion src/cadenza.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down Expand Up @@ -1469,6 +1469,8 @@ function sanitizeExtentStrategy({
return { type: 'geometry', geometry };
}
break;
default:
return extentStrategy;
}
}
if (mapExtent) {
Expand Down