java.lang.Object | |||
↳ | com.esri.android.map.Layer | ||
↳ | com.esri.android.map.DynamicLayer | ||
↳ | com.esri.android.map.ogc.WMSLayer |
A layer for OGC Web Map Services (WMS). This class searches for its default spatial reference and extent from root to bottom in its layer hierarchy. It allows users to specify the default spatial references in the constructor too if users want to do that.
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.esri.android.map.DynamicLayer
| |||||||||||
From class
com.esri.android.map.Layer
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
WMSLayer(String url)
This constructor is used if you're instantiating the WMSLayer using a URL.
| |||||||||||
WMSLayer(String url, String[] visibleLayers)
This constructor is used if you're instantiating the WMSLayer using a URL and visible layer names.
| |||||||||||
WMSLayer(String url, SpatialReference sr)
This constructor is used if you're instantiating the WMSLayer using a URL and default spatial reference.
| |||||||||||
WMSLayer(String url, boolean checkSupportedSRs)
This constructor is used if you're instantiating the WMSLayer using a URL and checkSupportedSRs flag.
| |||||||||||
WMSLayer(String url, SpatialReference sr, boolean checkSupportedSRs, String[] visibleLayers, UserCredentials credentials, boolean initLayer)
This constructor is used if you're instantiating the WMSLayer using a URL, default spatial reference,
checkSupportedSRs flag, visible layer names, user credential and initLayer flag.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getImageFormat()
Returns the image format.
| ||||||||||
WMSLayerInfo[] |
getLayers()
Gets all layer information available in the service.
| ||||||||||
String[] |
getSupportedImageFormats()
Gets the supported image formats.
| ||||||||||
SpatialReference[] |
getSupportedSpatialReferences()
Gets supported spatial references.
| ||||||||||
String |
getVersion()
Gets the WMS service's version.
| ||||||||||
String[] |
getVisibleLayers()
Gets visible layer names.
| ||||||||||
boolean |
isTransparent()
True if the image background is transparent.
| ||||||||||
void |
setImageFormat(String format)
Sets the image format as a string('image/png', etc.).
| ||||||||||
void |
setTransparent(boolean transparent)
Sets the image background to be transparent or not.
| ||||||||||
void |
setVisibleLayer(String[] layerNames)
Sets visible layers by specifying the layer names.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
byte[] | getImage(int width, int height, Envelope extent) | ||||||||||
void |
initLayer()
Initializes the layer.
| ||||||||||
void |
updateSpatialReferenceStatus(int SRStatus)
The callback method is invoked when the layer is added to map.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.esri.android.map.DynamicLayer
| |||||||||||
From class
com.esri.android.map.Layer
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.esri.android.map.popup.PopupLayer
|
This constructor is used if you're instantiating the WMSLayer using a URL.
url | URL string to the WMS layer. |
---|
This constructor is used if you're instantiating the WMSLayer using a URL and visible layer names.
url | URL string to the WMS layer. |
---|---|
visibleLayers | names of sub-layers to be included in the image rendered(EPSG:3857, etc.). |
This constructor is used if you're instantiating the WMSLayer using a URL and default spatial reference. A WMSLayer may support several spatial references. Users can specify a default spatial reference instead of asking WMSLayer to choose one automatically.
url | URL string to the WMS layer. |
---|---|
sr | default spatial reference of the layer. |
This constructor is used if you're instantiating the WMSLayer using a URL and checkSupportedSRs flag. If checkSupportedSRs is false, it assumes that WMS layer can be projected to any spatial reference and it will not check if map's spatial reference is in the supported spatial reference list of the WMS layer. Users can set this flag to false if some spatial reference is supported by WMS service but not declared in its capability response.
url | URL string to the WMS layer. |
---|---|
checkSupportedSRs | a flag which indicate to check if map's spatial reference is in the WMSLayer's supported spatial reference list or not. |
This constructor is used if you're instantiating the WMSLayer using a URL, default spatial reference, checkSupportedSRs flag, visible layer names, user credential and initLayer flag.
url | URL string to the WMS layer. |
---|---|
sr | default spatial reference. |
checkSupportedSRs | true if map's spatial reference is checked against spatial reference list supported by the WMS service when layer is added into map. |
visibleLayers | names of sub-layers to be included in the image rendered. |
credentials | user credential |
initLayer | true if layer initialization happens immediately. |
Returns the image format. Default is 'image/png'.
Gets all layer information available in the service.
Gets the supported image formats.
Gets supported spatial references.
Gets visible layer names. If not set, all the layers are visible and a null is returned.
True if the image background is transparent. Please ensure that the WMS service supports this property. Default is true.
Sets the image format as a string('image/png', etc.). Please ensure that the WMS service supports the requested image format.
format | image format in string. |
---|
Sets the image background to be transparent or not. Please ensure that the WMS service supports this property.
transparent | true if image background is set to transparent. |
---|
Sets visible layers by specifying the layer names.
layerNames | visible ayer name array. |
---|
Initializes the layer. The implementation should submit the OnStatusChangedListener.STATUS
event accordingly.
The callback method is invoked when the layer is added to map. 0 - Spatial Reference Invalid 1 - Spatial Reference NotNeeded 2 - Spatial Reference Projected 3 - Spatial Reference Good
SRStatus | an integer indicating the spatial reference status of layer |
---|