Package org.mapfish.print.map.tiled
Class AbstractWMXLayerParams
java.lang.Object
org.mapfish.print.map.AbstractLayerParams
org.mapfish.print.map.tiled.AbstractTiledLayerParams
org.mapfish.print.map.tiled.AbstractWMXLayerParams
- Direct Known Subclasses:
WmsLayerParam
,WMTSLayerParam
An abstract layers params class for WM* layers (e.g. WMS or WMTS).
-
Field Summary
FieldsModifier and TypeFieldDescriptionCustom query parameters to use when making http requests.Custom query parameters that can be merged if multiple layers are merged together into a single request.Fields inherited from class org.mapfish.print.map.tiled.AbstractTiledLayerParams
rasterStyle
Fields inherited from class org.mapfish.print.map.AbstractLayerParams
failOnError, name, opacity
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor.protected
Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreate a URL that is common to all image requests for this layer.Read thecustomParams
into a Multimap.Read themergeableParams
into a Multimap.final void
setCustomParam
(String name, String value) Set a custom parameter.boolean
Validates the provided base url.Methods inherited from class org.mapfish.print.map.tiled.AbstractTiledLayerParams
getBaseUrl
-
Field Details
-
customParams
Custom query parameters to use when making http requests. These are related tomergeableParams
except they are the parameters that will prevent two layers from the same server from being merged into a single request with both layers. SeemergeableParams
for a more detailed example of the difference betweenmergeableParams
andcustomParams
.The json should look something like:
{ "param1Name": "value", "param2Name": ["value1", "value2"] }
-
mergeableParams
Custom query parameters that can be merged if multiple layers are merged together into a single request.The json should look something like:
For example in WMS the style parameter can be merged. If there are several wms layers that can be merged except they have different style parameters they can be merged because the style parameter can be merged.{ "param1Name": "value", "param2Name": ["value1", "value2"] }
Compare that to DPI parameter (for QGIS wms mapserver). if two layers have different DPI then the layers cannot be merged. In this case the DPI should NOT be one of the
mergeableParams
it should be one of thecustomParams
.
-
-
Constructor Details
-
AbstractWMXLayerParams
protected AbstractWMXLayerParams()Constructor. -
AbstractWMXLayerParams
Copy constructor.- Parameters:
other
- the object to copy
-
-
Method Details
-
getCustomParams
Read thecustomParams
into a Multimap. -
getMergeableParams
Read themergeableParams
into a Multimap. -
createCommonUrl
Description copied from class:AbstractTiledLayerParams
Create a URL that is common to all image requests for this layer. It will take the base url and append all mergeable and custom params to the base url.- Specified by:
createCommonUrl
in classAbstractTiledLayerParams
- Throws:
URISyntaxException
-
setCustomParam
Set a custom parameter.- Parameters:
name
- the parameter namevalue
- the parameter value
-
validateBaseUrl
public boolean validateBaseUrl()Description copied from class:AbstractTiledLayerParams
Validates the provided base url.- Specified by:
validateBaseUrl
in classAbstractTiledLayerParams
- Returns:
- True, if the url is valid.
-