Package io.jmix.mapsui.component.layer
Interface Layer
- All Known Subinterfaces:
CanvasLayer
- All Known Implementing Classes:
HeatMapLayer,ImageLayer,RasterLayer,TileLayer,VectorLayer,WMSTileLayer
public interface Layer
Base interface for a map's layer.
Layer is an abstraction that describes a data that will be displayed on a map. Layers are structural units of maps. Map is built by superposing multiple layers.
-
Method Summary
Modifier and TypeMethodDescriptiongetId()intReturns maximum layer zoom level.intReturns minimum layer zoom level.booleanWhether the layer is to be editable on a map.booleanWhether the layer is to be visible on a map.voidrefresh()Notify clients that the layer has changed and need to be redrawn.voidsetEditable(boolean editable) Sets whether the layer is to be editable on a map.voidsetMaxZoom(int maxZoom) Sets maximum zoom level up to which the layer is visible (inclusive).voidsetMinZoom(int minZoom) Sets minimum zoom level down to which the layer is visible (inclusive).voidsetVisible(boolean visible) Sets whether the layer should be visible on a map.
-
Method Details
-
getId
- Returns:
- ID of a layer
-
setVisible
Sets whether the layer should be visible on a map.Default value:
true.- Parameters:
visible- true/false
-
isVisible
boolean isVisible()Whether the layer is to be visible on a map.- Returns:
trueif the layer is set to be visible; otherwisefalse
-
setMaxZoom
Sets maximum zoom level up to which the layer is visible (inclusive).- Parameters:
maxZoom- maximum layer zoom level
-
getMaxZoom
int getMaxZoom()Returns maximum layer zoom level.- Returns:
- maximum layer zoom level
-
setMinZoom
Sets minimum zoom level down to which the layer is visible (inclusive).Default value: 0.
- Parameters:
minZoom- minimum layer zoom level
-
getMinZoom
int getMinZoom()Returns minimum layer zoom level.- Returns:
- minimum layer zoom level
-
setEditable
Sets whether the layer is to be editable on a map.Default value:
false.- Parameters:
editable- true/false
-
isEditable
boolean isEditable()Whether the layer is to be editable on a map.- Returns:
trueif the layer is set to be editable; otherwisefalse
-
refresh
void refresh()Notify clients that the layer has changed and need to be redrawn.
-