[mapserver-users] POST support for GetMap requests

Richard Greenwood richard.greenwood at gmail.com
Wed May 3 08:57:13 PDT 2017


This might help:

https://gis.stackexchange.com/questions/232215/mapserver-wms-http-post-requests
As mentioned in one of the answers I was able to do a GetMap request via
POST using key=value. I did not try with XML.

Rich



On Tue, May 2, 2017 at 5:44 AM, Sushrut Shivaswamy <
sushrut.shivaswamy at gmail.com> wrote:

> Hey,
>
> I have a requirement to style a vector layer without polluting the layer
> definition
> in the map file with classobjects and such.
> The method I have adopted is to use the SLD_Body parameter of a WMS GetMap
> request
> to receive the styled images.
> This has worked so far but now the size of the SLD has grown so much that
> exceeds the maximum number of characters permitted in a url.
> So I can no longer send my SLD as a part of the GET request.
> My SLD request till now was as follows
>
> *http://localhost:8000/
> <http://localhost:8000/>cgi-bin/mapserv?service=wms&request=GetMap&version=1.0.0&layers=namespace:layer&sld_body=sld_as_string..*
>
>
> To overcome this problem I believe POST rquests are a good solution since
> the SLD can then be sent as a part of the request body.
>
> However, I am unable to execute a POST GetMap request.
>
> The request body is as follows.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ogc:GetMap xmlns:ogc="http://www.opengis.net/ows"
>             xmlns:gml="http://www.opengis.net/gml"
>    version="1.3.0" service="WMS">
>    <StyledLayerDescriptor version="1.0.0">
>       <NamedLayer>
>         <Name>world</Name>
>       </NamedLayer>
>    </StyledLayerDescriptor>
>    <BoundingBox srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
>       <gml:coord><gml:X>-130</gml:X><gml:Y>24</gml:Y></gml:coord>
>       <gml:coord><gml:X>-55</gml:X><gml:Y>50</gml:Y></gml:coord>
>    </BoundingBox>
>    <Output>
>       <Format>image/png</Format>
>       <Size>
>       <Width>64</Width>
>       <Height>64</Height>
>    </Size>
>    </Output>
> </ogc:GetMap>
>
>
> On sending this POST request to mapserver I get the error
> *msCalculateScale(): General error message. Invalid image width or height.*
>
> Even though the width and height has been specified in the XML.
> The above XML works with Geoserver.
> Does Mapserver support POST GetMap requests?
>
> Regards,
> Sushrut Shivaswamy
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
Richard W. Greenwood, PLS
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20170503/7cd0368c/attachment.htm>


More information about the MapServer-users mailing list