| java.lang.Object com.vividsolutions.wms.MapRequest
MapRequest | public class MapRequest (Code) | | Represents all of the parameters of a getMap request from a WMS server.
author: Chris Hodgson chodgson@refractions.net |
Method Summary | |
public BoundingBox | getBoundingBox() Gets the BoundingBox of the image being requested. | public String | getFormat() Returns the format of this request.
This may be a string such as GIF, JPEG, or PNG for a WMS 1.0 server, or
a mime-type string in the case of a WMS 1.1 server. | public Image | getImage() Connect to the service and get an Image of the map. | public int | getImageHeight() Gets the height of the requested image, in pixels. | public int | getImageWidth() Gets the width of the requested image, in pixels. | public List | getLayers() Returns the list of layers to be requested. | public WMService | getService() Gets the WMService that this object will make requests from. | public boolean | getTransparent() Gets whether or not a transparent image is being requested. | public URL | getURL() | public static String | listToString(List list) Returns a String containing the string representations of each item in the
list (as provided by toString()), separated by commas. | public void | setBoundingBox(BoundingBox bbox) Sets the BoundingBox of the image being requested. | public void | setFormat(String format) Sets the format of this request. | public void | setImageHeight(int imageHeight) Sets the height of the image being requested. | public void | setImageSize(int imageWidth, int imageHeight) Sets the width and height of the image being requested. | public void | setImageWidth(int imageWidth) Sets the width of the image being requested. | public void | setLayers(List layerList) Sets the layers to be requested. | public void | setTransparent(boolean transparent) Sets whether or not to request an image with a transparent background.
Requesting a transparent background doesn't guarantee that the resulting
image will actually have a transparent background. | public void | setVersion(String ver) |
MapRequest | public MapRequest(WMService service)(Code) | | Creates a new MapRequest.
Parameters: service - the WMService which this MapRequest will use |
getBoundingBox | public BoundingBox getBoundingBox()(Code) | | Gets the BoundingBox of the image being requested.
the BoundingBox of the image being requested |
getFormat | public String getFormat()(Code) | | Returns the format of this request.
This may be a string such as GIF, JPEG, or PNG for a WMS 1.0 server, or
a mime-type string in the case of a WMS 1.1 server. It may also be null if
the format has not yet been set.
the string representing the format of this request |
getImageHeight | public int getImageHeight()(Code) | | Gets the height of the requested image, in pixels.
The default image height is 100.
the height of the requested image |
getImageWidth | public int getImageWidth()(Code) | | Gets the width of the requested image, in pixels.
The default image width is 100.
the width of the requested image |
getLayers | public List getLayers()(Code) | | Returns the list of layers to be requested. Each item in the
list should be a String which is the name of a layer.
the list of layer names to be requested |
getService | public WMService getService()(Code) | | Gets the WMService that this object will make requests from.
the WMService that this object will make requests from |
getTransparent | public boolean getTransparent()(Code) | | Gets whether or not a transparent image is being requested.
true if a transparent image is being requested, false otherwise |
listToString | public static String listToString(List list)(Code) | | Returns a String containing the string representations of each item in the
list (as provided by toString()), separated by commas.
Parameters: list - the list to be returned as a coma-separated String a comma-separted String of the items in the list |
setBoundingBox | public void setBoundingBox(BoundingBox bbox)(Code) | | Sets the BoundingBox of the image being requested.
Parameters: bbox - the BoundingBox of the image being requested |
setFormat | public void setFormat(String format) throws IllegalArgumentException(Code) | | Sets the format of this request. The format must be a string which is in
the list of supported formats as provided by getSupportedFormatList()
(not necessarily the same String object, but the same sequence of characters).
This will be an unformatted string for a WMS 1.0 server (GIF, JPEG, PNG) or
a mime-type string for a WMS 1.1 server (image/gif, image/jpeg, image/png).
If the format specified is not in the list, an IllegalArgumentException
will be thrown.
Parameters: format - a format string which is in the list of supported formats throws: IllegalArgumentException - if the specified format isn't in the list of supported formats See Also: MapImageFormatChooser |
setImageHeight | public void setImageHeight(int imageHeight)(Code) | | Sets the height of the image being requested.
Parameters: imageHeight - the height of the image being requested |
setImageSize | public void setImageSize(int imageWidth, int imageHeight)(Code) | | Sets the width and height of the image being requested.
Parameters: imageWidth - the width of the image being requested Parameters: imageHeight - the height of the image being requested |
setImageWidth | public void setImageWidth(int imageWidth)(Code) | | Sets the width of the image being requested.
Parameters: imageWidth - the width of the image being requested |
setLayers | public void setLayers(List layerList)(Code) | | Sets the layers to be requested. Each item in the list should be a string
which corresponds to the name of a layer. The order of the list is
important as the layers are rendered in the same order they are listed.
Parameters: layerList - an ordered List of the names of layers to be displayed |
setTransparent | public void setTransparent(boolean transparent)(Code) | | Sets whether or not to request an image with a transparent background.
Requesting a transparent background doesn't guarantee that the resulting
image will actually have a transparent background. Not all servers
support transparency, and not all formats support transparency.
Parameters: transparent - true to request a transparent background, false otherwise. |
|
|