Package gov.nasa.worldwind.ogc
Class WmsLayer
- java.lang.Object
-
- gov.nasa.worldwind.layer.AbstractLayer
-
- gov.nasa.worldwind.layer.RenderableLayer
-
- gov.nasa.worldwind.ogc.WmsLayer
-
- All Implemented Interfaces:
Layer
,java.lang.Iterable<Renderable>
- Direct Known Subclasses:
BlueMarbleLayer
,LandsatLayer
public class WmsLayer extends RenderableLayer
Displays imagery from OGC Web Map Service (WMS) layers.
WMSLayer's configuration may be specified at construction or by callingsetConfiguration
, and must include the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.
WmsLayer defaults to retrieving imagery in the PNG format. This may be configured by callingsetImageFormat
.
-
-
Constructor Summary
Constructors Constructor Description WmsLayer()
Constructs an empty Web Map Service (WMS) layer that displays nothing.WmsLayer(Sector sector, double metersPerPixel, WmsLayerConfig config)
Constructs a Web Map Service (WMS) layer with specified WMS layer configuration values.WmsLayer(Sector sector, Globe globe, double metersPerPixel, WmsLayerConfig config)
Constructs a Web Map Service (WMS) layer with specified WMS layer configuration values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setConfiguration(Sector sector, double metersPerPixel, WmsLayerConfig config)
Specifies this Web Map Service (WMS) layer's configuration.void
setConfiguration(Sector sector, Globe globe, double metersPerPixel, WmsLayerConfig config)
Specifies this Web Map Service (WMS) layer's configuration.-
Methods inherited from class gov.nasa.worldwind.layer.RenderableLayer
addAllRenderables, addAllRenderables, addRenderable, addRenderable, clearRenderables, count, getRenderable, indexOfRenderable, indexOfRenderableNamed, indexOfRenderableWithProperty, iterator, removeAllRenderables, removeRenderable, removeRenderable, setRenderable
-
Methods inherited from class gov.nasa.worldwind.layer.AbstractLayer
getDisplayName, getMaxActiveAltitude, getMinActiveAltitude, getOpacity, getUserProperty, hasUserProperty, isEnabled, isPickEnabled, isWithinActiveAltitudes, putUserProperty, removeUserProperty, render, setDisplayName, setEnabled, setMaxActiveAltitude, setMinActiveAltitude, setOpacity, setPickEnabled
-
-
-
-
Constructor Detail
-
WmsLayer
public WmsLayer()
Constructs an empty Web Map Service (WMS) layer that displays nothing.
-
WmsLayer
public WmsLayer(Sector sector, double metersPerPixel, WmsLayerConfig config)
Constructs a Web Map Service (WMS) layer with specified WMS layer configuration values. The configuration must specify the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.- Parameters:
sector
- the geographic region in which to display the WMS layermetersPerPixel
- the desired resolution in meters on Earthconfig
- the WMS layer configuration values- Throws:
java.lang.IllegalArgumentException
- If any argument is null, if the resolution is not positive, or if any configuration value is invalid
-
WmsLayer
public WmsLayer(Sector sector, Globe globe, double metersPerPixel, WmsLayerConfig config)
Constructs a Web Map Service (WMS) layer with specified WMS layer configuration values. The configuration must specify the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.- Parameters:
sector
- the geographic region in which to display the WMS layermetersPerPixel
- the desired resolution in meters on the specified globeconfig
- the WMS layer configuration values- Throws:
java.lang.IllegalArgumentException
- If any argument is null, if the resolution is not positive, or if any configuration value is invalid
-
-
Method Detail
-
setConfiguration
public void setConfiguration(Sector sector, double metersPerPixel, WmsLayerConfig config)
Specifies this Web Map Service (WMS) layer's configuration. The configuration must specify the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.- Parameters:
sector
- the geographic region in which to display the WMS layermetersPerPixel
- the desired resolution in meters on Earthconfig
- the WMS layer configuration values
-
setConfiguration
public void setConfiguration(Sector sector, Globe globe, double metersPerPixel, WmsLayerConfig config)
Specifies this Web Map Service (WMS) layer's configuration. The configuration must specify the following values: service address, WMS protocol version, layer names, coordinate reference system, sector and resolution. All other WMS configuration values may be unspecified, in which case a default value is used.- Parameters:
sector
- the geographic region in which to display the WMS layermetersPerPixel
- the desired resolution in meters on the specified globeconfig
- the WMS layer configuration values
-
-