Class TLcdWMSDataSource.Builder
- Enclosing class:
TLcdWMSDataSource
TLcdWMSDataSource
instances.
By default, all values are null
. The default value for transparency is true
.
The default value for invertXYForEPSG4326
is true
to comply with the WMS 1.3.0 specification.
The class documentation of TLcdWMSDataSource
documents the minimum requirement for building a TLcdWMSDataSource
.
- Since:
- 2017.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdds a WMS layer to load.Adds a WMS layer to load.Adds a WMS layer to load.Adds a WMS layer to load.all
(TLcdWMSDataSource aDataSource) Initializes this builder to the values of the givenTLcdWMSDataSource
.build()
Create theTLcdWMSDataSource
instance that corresponds to the values in this builder.Specify the image format.invertXYForEPSG4326
(boolean aInvertXYForEPSG4326) Specify if the bounding box coordinates should be inverted for EPSG:4326.Deprecated.styledLayerDescriptor
(TLcdSLDStyledLayerDescriptor aStyledLayerDescriptor) Specify the styled layer descriptor.styledLayerDescriptor
(String aStyledLayerDescriptor) Specify the styled layer descriptor serialized as a string.transparent
(boolean aTransparent) Specify if the image should have a transparent background.Specify the URI of the WMS server.Specify the URI of the WMS server.
-
Method Details
-
uri
Specify the URI of the WMS server.If the URI's query parameters contain
layer
,style
orformat
parameters, those are set on this builder as well. For example,http://hostname:8080/Luciad/WMS?layer=myLayer
specifiesmyLayer
.- Parameters:
aUri
- The URI of the WMS- Returns:
- this
-
uri
Specify the URI of the WMS server.- Parameters:
aUri
- The URI of the WMS- Returns:
- this
-
addLayer
public TLcdWMSDataSource.Builder addLayer(String aLayerId, String aLayerStyle, boolean aVisible, boolean aQueryable) Adds a WMS layer to load. The layer is added on top of other added WMS layers.Use
ALcdOGCWMSCapabilities.getWMSRootNamedLayer(int)
to query the available layers.- Parameters:
aLayerId
- A WMS layer id.aLayerStyle
- The WMS layer style id. This refers to a published named layer style of the WMS capabilities. This argument is optional and may benull
.aVisible
- If the layer is visible.aQueryable
- If the layer should be queried.- Returns:
- this
-
addLayer
Adds a WMS layer to load. Is not queryable. The layer is added on top of other added WMS layers.Use
ALcdOGCWMSCapabilities.getWMSRootNamedLayer(int)
to query the available layers.- Parameters:
aLayerId
- A WMS layer id.aLayerStyle
- The WMS layer style id. This refers to a published named layer style of the WMS capabilities. This argument is optional and may benull
.aVisible
- If the layer is visible.- Returns:
- this
- Since:
- 2020.1.05
- See Also:
-
layer
Deprecated.Since 2020.1.05: useaddLayer(String, String, boolean)
instead.Adds a WMS layer to load. Is not queryable. The layer is added on top of other added WMS layers.Use
ALcdOGCWMSCapabilities.getWMSRootNamedLayer(int)
to query the available layers.- Parameters:
aLayerId
- A WMS layer id.aLayerStyle
- The WMS layer style id. This refers to a published named layer style of the WMS capabilities. This argument is optional and may benull
.aVisible
- If the layer is visible.- Returns:
- this
- See Also:
-
addLayer
Adds a WMS layer to load. Is visible, is not queryable. The layer is added on top of other added WMS layers.Use
ALcdOGCWMSCapabilities.getWMSRootNamedLayer(int)
to query the available layers.- Parameters:
aLayerId
- A WMS layer id.aLayerStyle
- The WMS layer style id. This refers to a published named layer style of the WMS capabilities. This argument is optional and may benull
.- Returns:
- this
- See Also:
-
addLayer
Adds a WMS layer to load. Uses the default layer style, is visible, is not queryable. The layer is added on top of other added WMS layers.Use
ALcdOGCWMSCapabilities.getWMSRootNamedLayer(int)
to query the available layers.- Parameters:
aLayerId
- A WMS layer id.- Returns:
- this
- See Also:
-
format
Specify the image format.Use
ALcdOGCWMSCapabilities.getSupportedMapFormat(int)
to query the available formats.- Parameters:
aFormat
- A format- Returns:
- this
-
transparent
Specify if the image should have a transparent background.- Parameters:
aTransparent
- if the image should have a transparent background.- Returns:
- this
-
styledLayerDescriptor
Specify the styled layer descriptor serialized as a string.- Parameters:
aStyledLayerDescriptor
- the styled layer descriptor string representation.- Throws:
IllegalArgumentException
- whenstyledLayerDescriptor(TLcdSLDStyledLayerDescriptor)
was already called before.
-
styledLayerDescriptor
public TLcdWMSDataSource.Builder styledLayerDescriptor(TLcdSLDStyledLayerDescriptor aStyledLayerDescriptor) Specify the styled layer descriptor.- Parameters:
aStyledLayerDescriptor
- the styled layer descriptor.- Throws:
IllegalArgumentException
- whenstyledLayerDescriptor(String)
was already called before. * @since 2023.1
-
invertXYForEPSG4326
Specify if the bounding box coordinates should be inverted for EPSG:4326.- Parameters:
aInvertXYForEPSG4326
- if the coordinates should be inverted to express the BBOX for the EPSG:4326 CRS.- Returns:
- this
-
all
Initializes this builder to the values of the givenTLcdWMSDataSource
.- Parameters:
aDataSource
- The data source instance to copy- Returns:
- this
-
build
Create theTLcdWMSDataSource
instance that corresponds to the values in this builder.You have to at least specify a
uri(java.net.URI)
and either one or more layers or a Styled Layer Descriptor before building the instance.- Returns:
- A new instance
- Throws:
IllegalArgumentException
- if the minimum requirements for building a TLcdWMSDataSource are not met.
-
addLayer(String, String, boolean)
instead.