Package io.jmix.mapsui.component.layer
Class TileLayer
java.lang.Object
io.jmix.mapsui.component.layer.RasterLayer
io.jmix.mapsui.component.layer.TileLayer
- All Implemented Interfaces:
Layer
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
WMSTileLayer
A class representing raster layer based on tiles.
This class contains parameters needed to connect to a tile service.
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
Returns attribution string.getId()
int
Returns maximum layer zoom level.int
Returns minimum layer zoom level.String[]
Returns explicitly defined subdomain values for the url pattern.getUrl()
Returns URL of a service.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
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setAttributionString
(String attributionString) Sets attribution string.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
setSubDomains
(String[] subDomains) Sets possible values for the {s} placeholder in the url pattern of xyz tiles.void
Sets URL of a service.void
setVisible
(boolean visible) Sets whether the layer should be visible on a map.toString()
Methods inherited from class io.jmix.mapsui.component.layer.RasterLayer
getOpacity, setOpacity
-
Field Details
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
TileLayer
-
TileLayer
-
-
Method Details
-
getUrl
Returns URL of a service.- Returns:
- String URL of a service
-
setUrl
Sets URL of a service.- Parameters:
url
- String URL of a service
-
getAttributionString
Returns attribution string.- Returns:
- attribution string
-
setAttributionString
Sets attribution string.- Parameters:
attributionString
- String parameter
-
getSubDomains
Returns explicitly defined subdomain values for the url pattern. -
setSubDomains
Sets possible values for the {s} placeholder in the url pattern of xyz tiles. These values are used sequentially to help with browser parallel requests per domain limitation.Can be omitted in most cases. By default: a, b, c.
-
setMaxZoom
public void setMaxZoom(int maxZoom) Sets maximum zoom level up to which the layer is visible (inclusive).Default value: 18.
- Specified by:
setMaxZoom
in interfaceLayer
- Parameters:
maxZoom
- maximum layer zoom level
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
getMaxZoom
public int getMaxZoom()Description copied from interface:Layer
Returns maximum layer zoom level.- Specified by:
getMaxZoom
in interfaceLayer
- Returns:
- maximum layer zoom level
-
setMinZoom
public void setMinZoom(int minZoom) Description copied from interface:Layer
Sets minimum zoom level down to which the layer is visible (inclusive).Default value: 0.
- Specified by:
setMinZoom
in interfaceLayer
- Parameters:
minZoom
- minimum layer zoom level
-
getMinZoom
public int getMinZoom()Description copied from interface:Layer
Returns minimum layer zoom level.- Specified by:
getMinZoom
in interfaceLayer
- Returns:
- minimum layer zoom level
-
getId
-
setVisible
public void setVisible(boolean visible) Description copied from interface:Layer
Sets whether the layer should be visible on a map.Default value:
true
.- Specified by:
setVisible
in interfaceLayer
- Parameters:
visible
- true/false
-
isVisible
public boolean isVisible()Description copied from interface:Layer
Whether the layer is to be visible on a map. -
setEditable
public void setEditable(boolean editable) Description copied from interface:Layer
Sets whether the layer is to be editable on a map.Default value:
false
.- Specified by:
setEditable
in interfaceLayer
- Parameters:
editable
- true/false
-
isEditable
public boolean isEditable()Description copied from interface:Layer
Whether the layer is to be editable on a map.- Specified by:
isEditable
in interfaceLayer
- Returns:
true
if the layer is set to be editable; otherwisefalse
-
fireLayerChangedEvent
-
refresh
public void refresh()Description copied from interface:Layer
Notify clients that the layer has changed and need to be redrawn. -
toString
-