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
rasterStyleFields inherited from class org.mapfish.print.map.AbstractLayerParams
failOnError, name, opacity -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedCopy constructor. -
Method Summary
Modifier and TypeMethodDescriptionCreate a URL that is common to all image requests for this layer.Read thecustomParamsinto a Multimap.Read themergeableParamsinto a Multimap.final voidsetCustomParam(String name, String value) Set a custom parameter.booleanValidates 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 tomergeableParamsexcept they are the parameters that will prevent two layers from the same server from being merged into a single request with both layers. SeemergeableParamsfor a more detailed example of the difference betweenmergeableParamsandcustomParams.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
mergeableParamsit should be one of thecustomParams.
-
-
Constructor Details
-
AbstractWMXLayerParams
protected AbstractWMXLayerParams()Constructor. -
AbstractWMXLayerParams
Copy constructor.- Parameters:
other- the object to copy
-
-
Method Details
-
getCustomParams
Read thecustomParamsinto a Multimap. -
getMergeableParams
Read themergeableParamsinto a Multimap. -
createCommonUrl
Description copied from class:AbstractTiledLayerParamsCreate 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:
createCommonUrlin classAbstractTiledLayerParams- Throws:
URISyntaxException
-
setCustomParam
Set a custom parameter.- Parameters:
name- the parameter namevalue- the parameter value
-
validateBaseUrl
public boolean validateBaseUrl()Description copied from class:AbstractTiledLayerParamsValidates the provided base url.- Specified by:
validateBaseUrlin classAbstractTiledLayerParams- Returns:
- True, if the url is valid.
-