diff --git a/CHANGELOG.md b/CHANGELOG.md index 237739d8..0464ac0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,12 @@ This project uses a version scheme based on the Cadenza main version in the form ## Unreleased ### Added - `additionalLayers` option for `CadenzaClient#showMap` -- Improved sandbox additionalLayers and geometry coordinates examples +- `LayerDataExtentZoomTarget`, `LocationFinderZoomTarget` and `StaticZoomTarget` added +- Added the 'ZoomTarget' also to the sandbox +- Improved sandbox 'additionalLayers' and 'geometry' examples + +### Deprecated +- The optional zooming parameters `locationFinder` and `mapExtent` in `CadenzaClient#showMap`, `CadenzaClient#createGeometry` and `CadenzaClient#editGeometry` ## 10.2.3 - 2024-11-08 ### Added diff --git a/sandbox.html b/sandbox.html index c04c337d..f87a3f52 100644 --- a/sandbox.html +++ b/sandbox.html @@ -39,6 +39,7 @@ display: flex; flex-direction: column; gap: var(--gap); + overflow: scroll; } fieldset > div { display: flex; @@ -121,7 +122,7 @@ settingsContainer.append( document.createElement('hr'), commonSettingsTemplate.content.cloneNode(true)); - }) + }); } const data = localStorage.getItem(`cadenzajs-sandbox-${action}`); @@ -193,7 +194,7 @@ localStorage.setItem(`cadenzajs-sandbox-${action}`, JSON.stringify(data)); }; - actionSelect.classList.toggle('show-unpublished', urlParams.has('showUnpublished')) + actionSelect.classList.toggle('show-unpublished', urlParams.has('showUnpublished')); actionSelect.value = urlParams.get('action') || 'show'; actionSelect.onchange(); @@ -221,15 +222,13 @@ highlightGlobalId, requestAsPdf, labelSet, - locationFinder, - mapExtent, minScale, parts, layers, simplifiedOperationMode, useMapSrs, fullGeometries, - zoomToGeometry, + zoomTarget, distance, lengthUnit, additionalLayers @@ -245,15 +244,13 @@ highlightGlobalId, ...(requestAsPdf === 'on' && { dataType: 'pdf' }), labelSet, - locationFinder, - mapExtent: mapExtent && mapExtent.split(',').map(Number), minScale: minScale && Number(minScale), parts: parts && parts.split(','), operationMode: (simplifiedOperationMode === 'on' ? 'simplified' : 'normal' ), layers: layers ? JSON.parse(layers) : undefined, useMapSrs: useMapSrs === 'on', fullGeometries: fullGeometries === 'on', - zoomTarget: zoomToGeometry === 'on' ? { type: 'geometry' } : undefined, + zoomTarget: zoomTarget && JSON.parse(zoomTarget), buffer: distance ? { value: Number(distance), lengthUnit: lengthUnit ? lengthUnit : 'm' } : undefined, additionalLayers: additionalLayers && JSON.parse(additionalLayers) }; @@ -399,14 +396,6 @@ Use map SRS -
- - -
-
- - -
-