[mapserver-users] Python MapScript updating map.web.metadata

Even Rouault even.rouault at spatialys.com
Fri Nov 17 03:09:07 PST 2017


On vendredi 10 novembre 2017 20:54:09 CET Kralidis, Tom (EC) wrote:
> Hi all: our (OWS) application (via Python MapScript/mod_wsgi) is provided
> as both HTTP and HTTPS, and our mapfile's
> map.web.metadata.ows_onlineresource is set to 'http://example.org/ows', for
> example.
> 
> We would like to update map.web.metadata.ows_onlineresource at request
> time (by checking 'wsgi.url_scheme') so that when a user does a
> GetCapabilities request the Capabilities XML provided emits the appropriate
> URL based on the request.
> 
> I see in the MapScript Python API that map.web is immutable?  Are there
> other potential approaches?
> 

Tom,

digging into mapscript/swiginc/map.i, I found :
mapfile.setMetaData('ows_onlineresource', 'https://example.org')

Seems to work from a quick test

Evn

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20171117/f659efcd/attachment.html>


More information about the mapserver-users mailing list