You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changed type of zoom properties from Integer to Double.
For VectorLayer, TileLayer, ImageLayer layers the following methods are affected:
getMinZoom()
setMinZoom()
withMinZoom()
getMaxZoom()
setMaxZoom()
withMaxZoom()
For GeoMapView the following methods are affected:
getMinZoom()
setMinZoom()
withMinZoom()
getMaxZoom()
setMaxZoom()
withMaxZoom()
setZoom() - note, takes primitive double
getZoom() - note, returns primitive double
In XML according attributes changed to double type.
Breaking Changes
Due to changed type to Double, methods that work with zoom/minZoom/maxZoom are affected.
For instance, if you programmatically change the zoom properties of VectorLayer, TileLayer, ImageLayer or GeoMapView, the following code will not be compiled:
VectorLayer layer = new VectorLayer(); // any layer from above
layer.setMinZoom(5); // layer.withMinZoom(5);
layer.setMaxZoom(10); // layer.withMaxZoom(10);
Integer minZoom = layer.getMinZoom();
Integer maxZoom = layer.getMaxZoom();
GeoMapView mapView = new GeoMapView();
mapView.setMaxZoom(10);
mapView.setMinZoom(2);
Integer maxZoom = mapView.getMaxZoom();
Integer minZoom = mapView.getMinZoom();
int zoom = mapView.getZoom();
You should change integer values to double to fix a compilation.
Values defined in XML are loaded in correct way, thus using integer in XML does not break application.
Note, XyzSource and OsmSource takes Integer type for minZoom/maxZoom, otherwise component does not work.
The text was updated successfully, but these errors were encountered:
Feature Description
The
zoom
attribute from View object in OpenLayers can be non-integer. It is configured by theconstrainResolution
option (see View :: docs).Also, see https://openlayers.org/en/latest/apidoc/module-ol_View-View.html#getZoom.
For instance, Vaadin add-on applies only double type for zoom level (see https://vaadin.com/docs/latest/components/map#events).
Changes
Changed type of zoom properties from
Integer
to Double.For VectorLayer, TileLayer, ImageLayer layers the following methods are affected:
For GeoMapView the following methods are affected:
In XML according attributes changed to double type.
Breaking Changes
Due to changed type to Double, methods that work with zoom/minZoom/maxZoom are affected.
For instance, if you programmatically change the zoom properties of VectorLayer, TileLayer, ImageLayer or GeoMapView, the following code will not be compiled:
You should change integer values to double to fix a compilation.
Values defined in XML are loaded in correct way, thus using integer in XML does not break application.
Note,
XyzSource
andOsmSource
takes Integer type for minZoom/maxZoom, otherwise component does not work.The text was updated successfully, but these errors were encountered: