Describe your motivation
The current Viewport implementation in vaadin-map allows configuring center, zoom, and rotation, as introduced in issue vaadin/platform#2499 .
However, the underlying OpenLayers View also supports minZoom and maxZoom, which are not yet exposed through the component API.
These properties are important for controlling the allowed zoom range and preventing users from zooming too far in or out.
Adding support for them would make the component more flexible and align it better with the capabilities of OpenLayers.
Describe the solution you'd like
Extend the existing Viewport API so that minZoom and maxZoom can be configured.
The values should be forwarded to the OpenLayers View instance and applied immediately when changed.
This request builds directly on the initial viewport functionality implemented in #2499 .
Describe alternatives you've considered
Implementing custom zoom‑limiting logic (MapViewMoveEndEvent) in application code.
This is more complex and less reliable than using the built‑in OpenLayers properties.
Additional context
OpenLayers View API reference:
https://openlayers.org/en/latest/apidoc/module-ol_View-View.html
Adding these properties would improve consistency with the rest of the Viewport configuration options and support common map‑interaction use cases.
Describe your motivation
The current Viewport implementation in vaadin-map allows configuring center, zoom, and rotation, as introduced in issue vaadin/platform#2499 .
However, the underlying OpenLayers View also supports minZoom and maxZoom, which are not yet exposed through the component API.
These properties are important for controlling the allowed zoom range and preventing users from zooming too far in or out.
Adding support for them would make the component more flexible and align it better with the capabilities of OpenLayers.
Describe the solution you'd like
Extend the existing Viewport API so that minZoom and maxZoom can be configured.
The values should be forwarded to the OpenLayers View instance and applied immediately when changed.
This request builds directly on the initial viewport functionality implemented in #2499 .
Describe alternatives you've considered
Implementing custom zoom‑limiting logic (MapViewMoveEndEvent) in application code.
This is more complex and less reliable than using the built‑in OpenLayers properties.
Additional context
OpenLayers View API reference:
https://openlayers.org/en/latest/apidoc/module-ol_View-View.html
Adding these properties would improve consistency with the rest of the Viewport configuration options and support common map‑interaction use cases.