| java.lang.Object org.geoserver.wms.util.WMSRequests
WMSRequests | public class WMSRequests (Code) | | Utility class for creating wms requests.
author: Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org See Also: Requests |
Method Summary | |
static String | encode(Envelope box) Helper method to encode an envelope to be used in a wms request. | static String | encode(String baseUrl, Map kvp) Helper method for encoding a baseurl and some kvp params into a single
url.
Parameters: baseUrl - The base url of the encoded request. Parameters: kvp - The key value pairts of the request. | public static String | encodeFormatOptions(Map formatOptions) Encodes a map of formation options to be used as the value in a kvp.
Parameters: formatOptions - The map of formation options. | public static String | getBaseUrl(HttpServletRequest request, GeoServer geoServer) Returns the base url for a wms request, something of the form:
<protocol>://<server>:<port>/<context>/wms
Parameters: request - The request. Parameters: geoServer - GeoServer configuration. | public static String | getBaseUrl(WMSRequest request) Returns the base url for a wms request, something of the form:
<protocol>://<server>:<port>/<context>/wms
Parameters: req - The wms request. | public static String | getBaseUrl(WMSMapContext map) Returns the base url for a wms request, something of the form:
<protocol>://<server>:<port>/<context>/wms
Parameters: map - A wms map context. | public static String | getGetLegendGraphicUrl(WMSRequest req, MapLayer layer, String[] kvp) Encodes the url of a GetLegendGraphic request. | public static String | getGetMapUrl(GetMapRequest req, MapLayer layer, Envelope bbox, String[] kvp) Encodes the url of a GetMap request.
If the layer argument is null , the request is
made including all layers in the mapContexT.
If the bbox argument is null . | public static String | getGetMapUrl(GetMapRequest req, String layer, String style, Envelope bbox, String[] kvp) Encodes the url of a GetMap request.
If the layer argument is null , the request is
made including all layers in the mapContexT.
If the style argument is not null and the layer
argument is null , then the default style for that layer
is used.
If the bbox argument is null . | static String | getGetMapUrl(String baseUrl, GetMapRequest req, String layer, String style, Envelope bbox, String[] kvp) Helper method for encoding GetMap request. | public static String | getTiledGetMapUrl(GetMapRequest req, MapLayer layer, Envelope bbox, String[] kvp) Encodes the url of a GetMap request pointing to a tile cache if one
exists.
The tile cache location is determined from
GeoServer.getTileCache .
If the above method returns null this method falls back to the behaviour
of
WMSRequests.getGetMapUrl(WMSMapContext,MapLayer,Envelope,String[]) .
If the layer argument is null , the request is
made including all layers in the mapContexT.
If the bbox argument is null . |
encode | static String encode(Envelope box)(Code) | | Helper method to encode an envelope to be used in a wms request.
|
encode | static String encode(String baseUrl, Map kvp)(Code) | | Helper method for encoding a baseurl and some kvp params into a single
url.
Parameters: baseUrl - The base url of the encoded request. Parameters: kvp - The key value pairts of the request. The full request url. |
encodeFormatOptions | public static String encodeFormatOptions(Map formatOptions)(Code) | | Encodes a map of formation options to be used as the value in a kvp.
Parameters: formatOptions - The map of formation options. A string of the form 'key1:value1,value2;key2:value1;...' |
getBaseUrl | public static String getBaseUrl(HttpServletRequest request, GeoServer geoServer)(Code) | | Returns the base url for a wms request, something of the form:
<protocol>://<server>:<port>/<context>/wms
Parameters: request - The request. Parameters: geoServer - GeoServer configuration. The base for wms requests. |
getBaseUrl | public static String getBaseUrl(WMSRequest request)(Code) | | Returns the base url for a wms request, something of the form:
<protocol>://<server>:<port>/<context>/wms
Parameters: req - The wms request. The base for wms requests. |
getBaseUrl | public static String getBaseUrl(WMSMapContext map)(Code) | | Returns the base url for a wms request, something of the form:
<protocol>://<server>:<port>/<context>/wms
Parameters: map - A wms map context. The base for wms requests. |
getGetLegendGraphicUrl | public static String getGetLegendGraphicUrl(WMSRequest req, MapLayer layer, String[] kvp)(Code) | | Encodes the url of a GetLegendGraphic request.
Parameters: req - The wms request. Parameters: layer - The Map layer, may not be null . Parameters: kvp - Additional or overidding kvp parameters, may be null The full url for a getMap request. |
getGetMapUrl | public static String getGetMapUrl(GetMapRequest req, MapLayer layer, Envelope bbox, String[] kvp)(Code) | | Encodes the url of a GetMap request.
If the layer argument is null , the request is
made including all layers in the mapContexT.
If the bbox argument is null .
WMSMapContext.getAreaOfInterest is used for the bbox parameter.
Parameters: req - The getMap request Parameters: layer - The Map layer, may be null . Parameters: bbox - The bounding box of the request, may be null . Parameters: kvp - Additional or overidding kvp parameters, may be null The full url for a getMap request. |
getGetMapUrl | public static String getGetMapUrl(GetMapRequest req, String layer, String style, Envelope bbox, String[] kvp)(Code) | | Encodes the url of a GetMap request.
If the layer argument is null , the request is
made including all layers in the mapContexT.
If the style argument is not null and the layer
argument is null , then the default style for that layer
is used.
If the bbox argument is null .
WMSMapContext.getAreaOfInterest is used for the bbox parameter.
Parameters: req - The getMap request Parameters: layer - The layer name, may be null . Parameters: style - The style name, may be null Parameters: bbox - The bounding box of the request, may be null . Parameters: kvp - Additional or overidding kvp parameters, may be null The full url for a getMap request. |
getTiledGetMapUrl | public static String getTiledGetMapUrl(GetMapRequest req, MapLayer layer, Envelope bbox, String[] kvp)(Code) | | Encodes the url of a GetMap request pointing to a tile cache if one
exists.
The tile cache location is determined from
GeoServer.getTileCache .
If the above method returns null this method falls back to the behaviour
of
WMSRequests.getGetMapUrl(WMSMapContext,MapLayer,Envelope,String[]) .
If the layer argument is null , the request is
made including all layers in the mapContexT.
If the bbox argument is null .
WMSMapContext.getAreaOfInterest is used for the bbox parameter.
Parameters: req - The getMap request. Parameters: layer - The Map layer, may be null . Parameters: bbox - The bounding box of the request, may be null . Parameters: kvp - Additional or overidding kvp parameters, may be null The full url for a getMap request. |
|
|