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()
int
Returns maximum layer zoom level.int
Returns minimum layer zoom level.boolean
Whether the layer is to be editable on a map.boolean
Whether the layer is to be visible on a map.void
refresh()
Notify clients that the layer has changed and need to be redrawn.void
setEditable
(boolean editable) Sets whether the layer is to be editable on a map.void
setMaxZoom
(int maxZoom) Sets maximum zoom level up to which the layer is visible (inclusive).void
setMinZoom
(int minZoom) Sets minimum zoom level down to which the layer is visible (inclusive).void
setVisible
(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:
true
if 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:
true
if the layer is set to be editable; otherwisefalse
-
refresh
void refresh()Notify clients that the layer has changed and need to be redrawn.
-