Package org.mapfish.print.map.image.wms
Class WmsUtilities
java.lang.Object
org.mapfish.print.map.image.wms.WmsUtilities
A few methods to help make wms requests for all types of wms layers.
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.springframework.http.client.ClientHttpRequest
createWmsRequest
(MfClientHttpRequestFactory httpRequestFactory, URI uri, org.springframework.http.HttpMethod method) Create a WMS request putting the params in the URL (GET) or in the body (POST).static URI
makeWmsGetLayerRequest
(WmsLayerParam wmsLayerParam, URI commonURI, Dimension imageSize, double dpi, double angle, org.geotools.geometry.jts.ReferencedEnvelope bounds) Make a WMS getLayer request and return the image read from the server.
-
Method Details
-
makeWmsGetLayerRequest
public static URI makeWmsGetLayerRequest(WmsLayerParam wmsLayerParam, URI commonURI, Dimension imageSize, double dpi, double angle, org.geotools.geometry.jts.ReferencedEnvelope bounds) throws org.geotools.api.referencing.FactoryException, URISyntaxException, IOException Make a WMS getLayer request and return the image read from the server.- Parameters:
wmsLayerParam
- the wms request parameterscommonURI
- the uri to use for the requests (excepting parameters of course.)imageSize
- the size of the image to requestdpi
- the dpi of the image to requestangle
- the angle of the image to requestbounds
- the area and projection of the request on the world.- Throws:
org.geotools.api.referencing.FactoryException
URISyntaxException
IOException
-
createWmsRequest
public static org.springframework.http.client.ClientHttpRequest createWmsRequest(MfClientHttpRequestFactory httpRequestFactory, URI uri, org.springframework.http.HttpMethod method) throws IOException Create a WMS request putting the params in the URL (GET) or in the body (POST).- Parameters:
httpRequestFactory
- the request factoryuri
- the URI, including the parametersmethod
- the HTTP method- Returns:
- The request
- Throws:
IOException
-