Package io.jmix.mapsui.component.layer
Class WMSTileLayer
java.lang.Object
io.jmix.mapsui.component.layer.RasterLayer
io.jmix.mapsui.component.layer.TileLayer
io.jmix.mapsui.component.layer.WMSTileLayer
- All Implemented Interfaces:
Layer
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
A class containing information about WMS service along with parameters
needed for GetMap operation requests to download tiles.
For more information about parameters format see WMS reference.
To find out information about capabilities of a WMS service (for example, available layers) request GetCapabilities operation.
It is convenient to use software like QGIS for the purpose.
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
getCrs()
ReturnsCRS
used in the WMS.Returns format for the map output.getId()
Returns layers to display on a map.int
Returns maximum layer zoom level.int
Returns minimum layer zoom level.Returns comma-separated list of WMS styles.Returns service version.boolean
Whether the layer is to be editable on a map.boolean
Whether the map background is transparent.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
SetsCRS
to be used in the WMS.void
setEditable
(boolean editable) Sets whether the layer is to be editable on a map.void
Formats for the map output.void
Specifies layers to display on a map.void
setMinZoom
(int minZoom) Sets minimum zoom level down to which the layer is visible (inclusive).void
Sets styles in which layers are to be rendered.void
setTransparent
(boolean transparent) Sets whether the map background is to be transparent.void
setVersion
(String version) Sets service version.void
setVisible
(boolean visible) Sets whether the layer should be visible on a map.toString()
Methods inherited from class io.jmix.mapsui.component.layer.TileLayer
getAttributionString, getSubDomains, getUrl, setAttributionString, setMaxZoom, setSubDomains, setUrl
Methods inherited from class io.jmix.mapsui.component.layer.RasterLayer
getOpacity, setOpacity
-
Field Details
-
SERVICE_NAME
- See Also:
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext
-
-
Constructor Details
-
WMSTileLayer
-
WMSTileLayer
-
-
Method Details
-
getCrs
ReturnsCRS
used in the WMS.- Returns:
- CRS
-
setCrs
SetsCRS
to be used in the WMS.- Parameters:
crs
- CRS to be used in the WMS
-
getLayers
Returns layers to display on a map.- Returns:
- a comma-separated list of layer names
-
setLayers
Specifies layers to display on a map.To find out information about available layers of the WMS service, you can request GetCapabilities operation.
It's easier to use software like QGIS for the purpose.
- Parameters:
layers
-String
which is a comma-separated list of layer names
-
getStyles
Returns comma-separated list of WMS styles.- Returns:
String
which is a comma-separated list of WMS styles
-
setStyles
Sets styles in which layers are to be rendered.- Parameters:
styles
- a comma-separated list of WMS styles
-
getFormat
Returns format for the map output.- Returns:
- format for the map output
-
setFormat
Formats for the map output. See WMS output formats for supported values.- Parameters:
format
- String parameter
-
isTransparent
public boolean isTransparent()Whether the map background is transparent.- Returns:
true
if the map background is transparent;false
otherwise
-
setTransparent
Sets whether the map background is to be transparent. Default value isfalse
.- Parameters:
transparent
- true/false
-
getVersion
Returns service version.- Returns:
- service version
-
setVersion
@StudioProperty(type=ENUMERATION, options={"1.0.0","1.1.0","1.1.1","1.3.0"}, defaultValue="1.1.1") public void setVersion(String version) Sets service version.Value is one of: 1.0.0, 1.1.0, 1.1.1, 1.3.0. Default value is 1.1.1.
- Parameters:
version
- String parameter
-
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
-