public final class WmsDataSource extends Object implements AutoCloseable
The WMS data source requires as a minimum:
layers
.
By default the data source is configured to request images from the WMS server with a transparent background.
WmsCapabilities
Modifier and Type | Class and Description |
---|---|
static class |
WmsDataSource.Builder
A builder to create
WmsDataSource instances. |
static class |
WmsDataSource.Layer
Represents a WMS layer with an optional style.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
String |
getFormat()
Returns the image format that should be used when decoding the WMS layer.
|
List<WmsDataSource.Layer> |
getLayers()
Returns the list of WMS
layers to load. |
String |
getStyledLayerDescriptor()
Returns the Styled
Layer Descriptor to use or null if not set. |
String |
getStyledLayerDescriptorUrl()
Returns the Styled
Layer Descriptor URL to use or null if not set. |
String |
getUrl()
Returns the base URL of the WMS data source.
|
boolean |
isTransparent()
Returns whether the WMS is requested to return an image with a transparent background.
|
static WmsDataSource.Builder |
newBuilder()
Returns the builder class for creation of the WMS data source.
|
public void close()
close
in interface AutoCloseable
@NotNull public static WmsDataSource.Builder newBuilder()
@NotNull public String getUrl()
@NotNull public List<WmsDataSource.Layer> getLayers()
layers
to load.
The layers are ordered from bottom to top.
layers
to load.@Nullable public String getFormat()
A null
return value indicates the format should be auto-detected.
null
return value indicates the format should be auto-detected.public boolean isTransparent()
@Nullable public String getStyledLayerDescriptor()
Layer
Descriptor to use or null
if not set.Layer
Descriptor to use or null
if not set.