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
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgetCrs()ReturnsCRSused in the WMS.Returns format for the map output.getId()Returns layers to display on a map.intReturns maximum layer zoom level.intReturns minimum layer zoom level.Returns comma-separated list of WMS styles.Returns service version.booleanWhether the layer is to be editable on a map.booleanWhether the map background is transparent.booleanWhether the layer is to be visible on a map.voidrefresh()Notify clients that the layer has changed and need to be redrawn.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidSetsCRSto be used in the WMS.voidsetEditable(boolean editable) Sets whether the layer is to be editable on a map.voidFormats for the map output.voidSpecifies layers to display on a map.voidsetMinZoom(int minZoom) Sets minimum zoom level down to which the layer is visible (inclusive).voidSets styles in which layers are to be rendered.voidsetTransparent(boolean transparent) Sets whether the map background is to be transparent.voidsetVersion(String version) Sets service version.voidsetVisible(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, setUrlMethods 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
ReturnsCRSused in the WMS.- Returns:
- CRS
-
setCrs
SetsCRSto 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-Stringwhich is a comma-separated list of layer names
-
getStyles
Returns comma-separated list of WMS styles.- Returns:
Stringwhich 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:
trueif the map background is transparent;falseotherwise
-
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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
getMaxZoom
public int getMaxZoom()Description copied from interface:LayerReturns maximum layer zoom level.- Specified by:
getMaxZoomin interfaceLayer- Returns:
- maximum layer zoom level
-
setMinZoom
public void setMinZoom(int minZoom) Description copied from interface:LayerSets minimum zoom level down to which the layer is visible (inclusive).Default value: 0.
- Specified by:
setMinZoomin interfaceLayer- Parameters:
minZoom- minimum layer zoom level
-
getMinZoom
public int getMinZoom()Description copied from interface:LayerReturns minimum layer zoom level.- Specified by:
getMinZoomin interfaceLayer- Returns:
- minimum layer zoom level
-
getId
-
setVisible
public void setVisible(boolean visible) Description copied from interface:LayerSets whether the layer should be visible on a map.Default value:
true.- Specified by:
setVisiblein interfaceLayer- Parameters:
visible- true/false
-
isVisible
public boolean isVisible()Description copied from interface:LayerWhether the layer is to be visible on a map. -
setEditable
public void setEditable(boolean editable) Description copied from interface:LayerSets whether the layer is to be editable on a map.Default value:
false.- Specified by:
setEditablein interfaceLayer- Parameters:
editable- true/false
-
isEditable
public boolean isEditable()Description copied from interface:LayerWhether the layer is to be editable on a map.- Specified by:
isEditablein interfaceLayer- Returns:
trueif the layer is set to be editable; otherwisefalse
-
fireLayerChangedEvent
-
refresh
public void refresh()Description copied from interface:LayerNotify clients that the layer has changed and need to be redrawn. -
toString
-