public class MapRequest
extends java.lang.Object
Constructor and Description |
---|
MapRequest(WMService service)
Creates a new MapRequest.
|
Modifier and Type | Method and Description |
---|---|
BoundingBox |
getBoundingBox()
Gets the BoundingBox of the image being requested.
|
java.lang.String |
getFormat()
Returns the format of this request.
|
java.awt.Image |
getImage()
Connect to the service and get an Image of the map.
|
int |
getImageHeight()
Gets the height of the requested image, in pixels.
|
int |
getImageWidth()
Gets the width of the requested image, in pixels.
|
java.util.List |
getLayerNames()
Returns the list of layers to be requested.
|
WMService |
getService()
Gets the WMService that this object will make requests from.
|
boolean |
getTransparent()
Gets whether or not a transparent image is being requested.
|
java.net.URL |
getURL() |
static java.lang.String |
listToString(java.util.List<java.lang.String> list)
Returns a String containing the string representations of each item in the
list (as provided by toString()), separated by commas.
|
void |
setBoundingBox(BoundingBox bbox)
Sets the BoundingBox of the image being requested.
|
void |
setFormat(java.lang.String format)
Sets the format of this request.
|
void |
setImageHeight(int imageHeight)
Sets the height of the image being requested.
|
void |
setImageSize(int imageWidth,
int imageHeight)
Sets the width and height of the image being requested.
|
void |
setImageWidth(int imageWidth)
Sets the width of the image being requested.
|
void |
setLayerNames(java.util.List<java.lang.String> layerNames)
Sets the layers to be requested.
|
void |
setTransparent(boolean transparent)
Sets whether or not to request an image with a transparent background.
|
void |
setVersion(java.lang.String ver) |
public MapRequest(WMService service)
service
- the WMService which this MapRequest will usepublic WMService getService()
public java.lang.String getFormat()
public int getImageWidth()
public int getImageHeight()
public java.util.List getLayerNames()
public BoundingBox getBoundingBox()
public boolean getTransparent()
public void setFormat(java.lang.String format) throws java.lang.IllegalArgumentException
format
- a format string which is in the list of supported formatsjava.lang.IllegalArgumentException
- if the specified format isn't in the list of supported formatsMapImageFormatChooser
public void setImageWidth(int imageWidth)
imageWidth
- the width of the image being requestedpublic void setImageHeight(int imageHeight)
imageHeight
- the height of the image being requestedpublic void setImageSize(int imageWidth, int imageHeight)
imageWidth
- the width of the image being requestedimageHeight
- the height of the image being requestedpublic void setLayerNames(java.util.List<java.lang.String> layerNames)
layerNames
- an ordered List of the names of layers to be displayedpublic void setBoundingBox(BoundingBox bbox)
bbox
- the BoundingBox of the image being requestedpublic void setTransparent(boolean transparent)
transparent
- true to request a transparent background, false otherwise.public static java.lang.String listToString(java.util.List<java.lang.String> list)
list
- the list to be returned as a coma-separated Stringpublic java.net.URL getURL() throws java.net.MalformedURLException
java.net.MalformedURLException
- if there is a problem building the URL for some reasonpublic java.awt.Image getImage() throws java.io.IOException
java.io.IOException
public void setVersion(java.lang.String ver)