diff --git a/web/client/components/TOC/fragments/settings/VisibilityLimitsForm.jsx b/web/client/components/TOC/fragments/settings/VisibilityLimitsForm.jsx index 80c38f97d3..e51683cf7c 100644 --- a/web/client/components/TOC/fragments/settings/VisibilityLimitsForm.jsx +++ b/web/client/components/TOC/fragments/settings/VisibilityLimitsForm.jsx @@ -95,7 +95,7 @@ function SelectInput({ function VisibilityLimitsForm({ title, layer, - zoom, + zoom: zoomProp, projection, resolutions = getResolutions(), defaultLimitsType, @@ -104,6 +104,8 @@ function VisibilityLimitsForm({ onChange }) { + const zoom = Math.round(zoomProp || 0); + const [limitsType, setLimitsType] = useState(defaultLimitsType || limitsTypesOptions[0].value); const { diff --git a/web/client/components/map/openlayers/Map.jsx b/web/client/components/map/openlayers/Map.jsx index a90d3cdbc9..0dd1312a0f 100644 --- a/web/client/components/map/openlayers/Map.jsx +++ b/web/client/components/map/openlayers/Map.jsx @@ -505,7 +505,12 @@ class OpenlayersMap extends React.Component { projection: normalizeSRS(projection), center: [center.x, center.y], zoom: zoom, - minZoom: limits.minZoom + minZoom: limits.minZoom, + // allow to zoom to level 0 and see world wrapping + multiWorld: true, + // does not allow intermediary zoom levels + // we need this at true to set correctly the scale box + constrainResolution: true }, newOptions || {}); return new View(viewOptions); };