|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.plugin.AbstractPlugIn com.bbn.openmap.plugin.WebImagePlugIn com.bbn.openmap.plugin.wms.WMSPlugIn
public class WMSPlugIn
This class asks for an image from an OpenGIS compliant Web Map Server (WMS). Make sure that OpenMap is using the LLXY projection, because this plugin is only asking for images that are in the Spatial Reference System EPS 4326 projection, and anything else won't match up. This class will be growing to be more interactive with the WMS. It has some properties that you can set in the openmap.properties file:
#For the plugin layer, add wms_plugin to openmap.layers list wms_plugin=com.bbn.openmap.plugin.wms.WMSPlugIn wms_plugin.wmsserver=A URL for the WMS server (eg. http://host.domain.name/servlet/com.esri.wms.Esrimap) wms_plugin.wmsversion=OpenGIS WMS version number (eg. 1.1.1) wms_plugin.format=image format (eg. image/jpeg, image/png) wms_plugin.transparent=true or false, depends on imageformat wms_plugin.backgroundcolor=RGB hex string (RRGGBB) wms_plugin.layers=comma separated list of map layer names (eg. SDE.SASAUS_BND_COASTL,SDE.SASAUS_BND_POLBNDL) wms_plugin.styles=comma separated list of layer rendering styles corresponding to the layers listed wms_plugin.vendorspecificnames=comma separated list of vendor specific parameter names in order (eg. SERVICENAME) wms_plugin.vendorspecificvalues=comma separated list of vendor specific parameter values in order (eg. default)
One of the best demo WMS servers can be found at: http://demo.cubewerx.com/demo/cubeserv/cubeserv.cgi
Field Summary | |
---|---|
protected java.lang.String |
backgroundColor
Specify the color for non-data areas of the image in r,g,b |
static java.lang.String |
BackgroundColorProperty
|
protected java.lang.String |
errorHandling
Keyword for error handling. |
protected java.lang.String |
imageFormat
GIF, PNG, JPEG, etc. |
static java.lang.String |
ImageFormatProperty
|
protected java.lang.String |
imageQuality
If using a lossy image format, such as jpeg, set this to high, medium or low |
protected java.lang.String |
layers
Comma-separated list of layer names |
static java.lang.String |
LayersProperty
|
static int |
LOSSY_IMAGE_QUALITY_HIGH
integer identifier for high image quality |
static int |
LOSSY_IMAGE_QUALITY_LOW
integer identifier for low image quality |
static int |
LOSSY_IMAGE_QUALITY_MEDIUM
integer identifier for medium image quality |
protected java.lang.String |
mapRequestName
Keyword for map request. |
protected java.lang.String |
queryHeader
Same as wmsServer |
protected java.lang.String |
styles
Comma-separated list of style names |
static java.lang.String |
StylesProperty
|
protected java.lang.String |
transparent
true=make the backgroundColor transparent |
static java.lang.String |
TransparentProperty
|
protected java.lang.String |
vendorSpecificNames
Comma-separated list of vendor specific parameter names |
static java.lang.String |
VendorSpecificNamesProperty
|
protected java.lang.String |
vendorSpecificValues
Comma-separated list of vendor specific parameter values |
static java.lang.String |
VendorSpecificValuesProperty
|
static java.lang.String |
WMSNameProperty
|
protected java.lang.String |
wmsServer
URL to the server script that responds to WMS map requests |
static java.lang.String |
WMSServerProperty
|
protected java.lang.String |
wmsVersion
version of the Web map server spec the server supports |
static java.lang.String |
WMSVersionProperty
|
Fields inherited from class com.bbn.openmap.plugin.WebImagePlugIn |
---|
currentProjection, layer, logger, messageWindow, redrawButton |
Fields inherited from class com.bbn.openmap.plugin.AbstractPlugIn |
---|
addToBeanContext, component, mml, name, prefix, removable, RemovableProperty |
Fields inherited from interface com.bbn.openmap.image.ImageServerConstants |
---|
AZIMUTH, LAT, LAYERMASK, LAYERS, LON, PAN, PROJTYPE, QUERY, RECENTER, SCALE, X, Y |
Fields inherited from interface com.bbn.openmap.image.WMTConstants |
---|
BBOX, BGCOLOR, CAPABILITIES, CRS, EXCEPTIONS, FORMAT, GETCAPABILITIES, GETFEATUREINFO, GETLEGENDGRAPHIC, GETMAP, HEIGHT, IMAGEFORMAT_GEOTIFF, IMAGEFORMAT_GIF, IMAGEFORMAT_JPEG, IMAGEFORMAT_PNG, IMAGEFORMAT_PPM, IMAGEFORMAT_SVG, IMAGEFORMAT_TIFF, IMAGEFORMAT_WBMP, INFO_FORMAT, LAYER, MAP, QUERY_LAYERS, REQUEST, SERVICE, SRS, STYLE, STYLES, TRANSPARENT, VERSION, WIDTH, WMTVER |
Fields inherited from interface com.bbn.openmap.PropertyConsumer |
---|
EditorProperty, initPropertiesProperty, LabelEditorProperty, ScopedEditorProperty |
Constructor Summary | |
---|---|
WMSPlugIn()
|
Method Summary | |
---|---|
void |
addLayers(java.lang.String[] ls)
Add new layers to the server request, using the default style. |
void |
addLayers(java.lang.String[] ls,
java.lang.String[] st)
Add new layers to the server request, using specified styles. |
java.lang.String |
createQueryString(Projection p)
Create the query to be sent to the server, based on current settings. |
java.lang.String |
getBackgroundColor()
|
java.lang.String |
getErrorHandling()
|
java.lang.String |
getImageFormat()
|
java.lang.String |
getImageQuality()
|
java.lang.String |
getLayers()
|
java.lang.String |
getMapRequestName()
|
java.util.Properties |
getProperties(java.util.Properties props)
Method to fill in a Properties object, reflecting the current values of the PropertyConsumer. |
java.util.Properties |
getPropertyInfo(java.util.Properties props)
Method to fill in a Properties object with values reflecting the properties able to be set on this PropertyConsumer. |
java.lang.String |
getQueryHeader()
|
java.lang.String |
getServerName()
|
java.lang.String |
getStyles()
|
java.lang.String |
getTransparent()
|
java.lang.String |
getVendorSpecificNames()
|
java.lang.String |
getVendorSpecificValues()
|
java.lang.String |
getWmsServer()
|
java.lang.String |
getWmsVersion()
|
void |
setBackgroundColor(java.lang.String backgroundColor)
|
void |
setErrorHandling(java.lang.String errorHandling)
|
void |
setImageFormat(java.lang.String newImageFormat)
|
void |
setImageQuality(int newImageQuality)
|
void |
setImageQuality(java.lang.String imageQuality)
|
void |
setLayers(java.lang.String layers)
|
void |
setMapRequestName(java.lang.String mapRequestName)
|
void |
setProperties(java.lang.String prefix,
java.util.Properties setList)
Method to set the properties in the PropertyConsumer. |
void |
setQueryHeader(java.lang.String queryHeader)
|
void |
setStyles(java.lang.String styles)
|
void |
setTransparent(java.lang.String transparent)
|
void |
setVendorSpecificNames(java.lang.String vendorSpecificNames)
|
void |
setVendorSpecificValues(java.lang.String vendorSpecificValues)
|
void |
setWmsServer(java.lang.String wmsServer)
|
void |
setWmsVersion(java.lang.String wmsVer)
Does more than just set the version, it also adjusts other parameters based on version. |
Methods inherited from class com.bbn.openmap.plugin.WebImagePlugIn |
---|
fetchImageAndAddToList, getGUI, getRectangle, handleMessage, setComponent |
Methods inherited from class com.bbn.openmap.plugin.AbstractPlugIn |
---|
dispose, doPrepare, getAddToBeanContext, getComponent, getMapMouseListener, getMouseModeServiceList, getName, getPropertyPrefix, isRemovable, mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseMoved, mousePressed, mouseReleased, removed, repaint, setAddToBeanContext, setMapMouseListener, setName, setProperties, setPropertyPrefix, setRemovable |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String wmsServer
protected java.lang.String imageFormat
protected java.lang.String imageQuality
protected java.lang.String backgroundColor
protected java.lang.String transparent
protected java.lang.String wmsVersion
protected java.lang.String layers
protected java.lang.String styles
protected java.lang.String vendorSpecificNames
protected java.lang.String vendorSpecificValues
protected java.lang.String queryHeader
protected java.lang.String mapRequestName
protected java.lang.String errorHandling
public static final java.lang.String WMSNameProperty
public static final java.lang.String WMSServerProperty
public static final java.lang.String ImageFormatProperty
public static final java.lang.String BackgroundColorProperty
public static final java.lang.String TransparentProperty
public static final java.lang.String WMSVersionProperty
public static final java.lang.String LayersProperty
public static final java.lang.String StylesProperty
public static final java.lang.String VendorSpecificNamesProperty
public static final java.lang.String VendorSpecificValuesProperty
public static final int LOSSY_IMAGE_QUALITY_HIGH
public static final int LOSSY_IMAGE_QUALITY_MEDIUM
public static final int LOSSY_IMAGE_QUALITY_LOW
Constructor Detail |
---|
public WMSPlugIn()
Method Detail |
---|
public void addLayers(java.lang.String[] ls)
public void addLayers(java.lang.String[] ls, java.lang.String[] st)
public java.lang.String createQueryString(Projection p)
createQueryString
in class WebImagePlugIn
public void setProperties(java.lang.String prefix, java.util.Properties setList)
setProperties
in interface PropertyConsumer
setProperties
in class AbstractPlugIn
prefix
- a String used by the PropertyConsumer to prepend to each
property value it wants to look up -
setList.getProperty(prefix.propertyKey). If the prefix had already
been set, then the prefix passed in should replace that previous
value.setList
- a Properties object that the PropertyConsumer can use to
retrieve expected properties it can use for configuration.public java.util.Properties getProperties(java.util.Properties props)
AbstractPlugIn
getProperties
in interface PropertyConsumer
getProperties
in class AbstractPlugIn
props
- a Properties object to load the PropertyConsumer
properties into. If getList equals null, then a new Properties
object should be created.
public java.util.Properties getPropertyInfo(java.util.Properties props)
AbstractPlugIn
getPropertyInfo
in interface PropertyConsumer
getPropertyInfo
in class AbstractPlugIn
props
- a Properties object to load the PropertyConsumer properties
into. If getList equals null, then a new Properties object should
be created.
public java.lang.String getImageFormat()
public void setImageFormat(java.lang.String newImageFormat)
public void setImageQuality(int newImageQuality)
public java.lang.String getImageQuality()
public void setImageQuality(java.lang.String imageQuality)
public java.lang.String getTransparent()
public void setTransparent(java.lang.String transparent)
public java.lang.String getBackgroundColor()
public void setBackgroundColor(java.lang.String backgroundColor)
public java.lang.String getErrorHandling()
public void setErrorHandling(java.lang.String errorHandling)
public java.lang.String getLayers()
public void setLayers(java.lang.String layers)
public java.lang.String getMapRequestName()
public void setMapRequestName(java.lang.String mapRequestName)
public java.lang.String getQueryHeader()
public void setQueryHeader(java.lang.String queryHeader)
public java.lang.String getStyles()
public void setStyles(java.lang.String styles)
public java.lang.String getVendorSpecificNames()
public void setVendorSpecificNames(java.lang.String vendorSpecificNames)
public java.lang.String getVendorSpecificValues()
public void setVendorSpecificValues(java.lang.String vendorSpecificValues)
public java.lang.String getWmsServer()
public void setWmsServer(java.lang.String wmsServer)
public java.lang.String getServerName()
getServerName
in class WebImagePlugIn
public java.lang.String getWmsVersion()
public void setWmsVersion(java.lang.String wmsVer)
wmsVer
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |