public class WMSLayer extends GridReaderLayer
Layer
for interactive rendering usage TODO: expose a
GetFeatureInfo that returns a feature collection TODO: expose the list of named styles and allow
choosing which style to useparams, reader
source
style
Constructor and Description |
---|
WMSLayer(WebMapServer wms,
Layer layer)
Builds a new WMS layer
|
WMSLayer(WebMapServer wms,
Layer layer,
String style)
Builds a new WMS layer
|
WMSLayer(WebMapServer wms,
Layer layer,
String style,
String imageFromat) |
Modifier and Type | Method and Description |
---|---|
void |
addLayer(Layer layer)
Allows to add another WMS layer into the GetMap requests
|
void |
addLayer(Layer layer,
String style)
Allows to add another WMS layer into the GetMap requests
|
ReferencedEnvelope |
getBounds()
The bounds of the Layer content (if known).
|
CoordinateReferenceSystem |
getCoordinateReferenceSystem()
Returns the CRS used to make requests to the remote WMS
|
InputStream |
getFeatureInfo(DirectPosition2D pos,
String infoFormat,
int featureCount)
Retrieves the feature info as a generic input stream, it's the duty of the caller to
interpret the contents and ensure the stream is closed feature info format)
|
InputStream |
getFeatureInfo(ReferencedEnvelope bbox,
int width,
int height,
int x,
int y,
String infoFormat,
int featureCount)
Allows to run a standalone GetFeatureInfo request, without the need to have previously run a
GetMap request on this layer.
|
String |
getFeatureInfoAsText(DirectPosition2D pos,
int featureCount)
Retrieves the feature info as text (assuming "text/plain" is a supported feature info format)
|
GetMapRequest |
getLastGetMap()
Returns last GetMap request performed by this layer
|
WMSCoverageReader |
getReader()
Reader used for efficient access to raster content.
|
WebMapServer |
getWebMapServer()
Returns the
WebMapServer used by this layer |
List<Layer> |
getWMSLayers()
Returns the WMS
Layer s used by this layer |
List<String> |
getWMSStyles()
return the names of the styles used by this layer.
|
boolean |
isNativelySupported(CoordinateReferenceSystem crs)
Returns true if the specified CRS can be used directly to perform WMS requests.
|
dispose, getParams, toFeatureCollection
getFeatureSource
getStyle, setStyle
addMapLayerListener, connectDataListener, finalize, fireMapLayerListenerLayerChanged, fireMapLayerListenerLayerDeselected, fireMapLayerListenerLayerHidden, fireMapLayerListenerLayerPreDispose, fireMapLayerListenerLayerSelected, fireMapLayerListenerLayerShown, getQuery, getTitle, getUserData, isSelected, isVisible, preDispose, removeMapLayerListener, setSelected, setTitle, setVisible, toString
public WMSLayer(WebMapServer wms, Layer layer)
public WMSLayer(WebMapServer wms, Layer layer, String style)
public WMSLayer(WebMapServer wms, Layer layer, String style, String imageFromat)
public WMSCoverageReader getReader()
GridReaderLayer
getReader
in class GridReaderLayer
public ReferencedEnvelope getBounds()
Layer
The returned bounds are a ReferencedEnvelope using the same CoordinateReferenceSystem as the layers contents.
getBounds
in class GridReaderLayer
public String getFeatureInfoAsText(DirectPosition2D pos, int featureCount) throws IOException
pos
- the position to be checked, in real world coordinatesIOException
public InputStream getFeatureInfo(DirectPosition2D pos, String infoFormat, int featureCount) throws IOException
pos
- the position to be checked, in real world coordinatesinfoFormat
- The INFO_FORMAT parameter in the GetFeatureInfo requestIOException
public InputStream getFeatureInfo(ReferencedEnvelope bbox, int width, int height, int x, int y, String infoFormat, int featureCount) throws IOException
infoFormat
- The INFO_FORMAT parameter in the GetFeatureInfo requestIOException
public WebMapServer getWebMapServer()
WebMapServer
used by this layerpublic CoordinateReferenceSystem getCoordinateReferenceSystem()
public GetMapRequest getLastGetMap()
public void addLayer(Layer layer)
public void addLayer(Layer layer, String style)
public boolean isNativelySupported(CoordinateReferenceSystem crs)
Copyright © 1996–2022 Geotools. All rights reserved.