[mapserver-users] how generate web part of mapfile with python mapscript

Tonton to.tonton at gmail.com
Thu Dec 1 07:34:39 PST 2011


On Thu, Dec 1, 2011 at 2:51 PM, Frank Broniewski <brfr at metrico.lu> wrote:

> Am 01.12.2011 13:43, schrieb Tonton:
>
>> hello
>> i try this
>>
>> map_obj.web.metadata.set('foo'**, 'bar')
>
> hth
>
> Frank
>

Thanks it's a good way so it's work with no creation of webObj and there
metadata


    amapfile.web.maxscaledenom = 1550000
    amapfile.web.minscaledenom = 1000
    amapfile.web.imagepath="/var/www/tmp/"
    amapfile.web.imageurl="../tmp/"
    #aamapfile.webdef.metadata = mapscript.hashTableObj()
    amapfile.web.metadata.set("ows_TITLE", title)
    u = get_object_or_404(Param, libel_prm=settings.LIBELEDESPARAM)
    mapServerUrl = u.sitepath_prm #http://site/mapserv?
    mapfilepath = u.mapfilepath_prm #/media/mapfile/
    mapPathToWrite ="mapfile/"
    amapfile.web.metadata.set("ows_ONLINERESOURCE",
mapServerUrl+"map="+mapfilepath+layer.name_lyr+".map")

    amapfile.web.metadata.set("owsAbstract" , layer.libel_lyr)
    amapfile.web.metadata.set("owsSrs", "EPSG:"+str(projection))
    amapfile.web.metadata.set("ows_enable_request" ,  "*")
    amapfile.web.log = "../tmp/web.log"

regards
T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111201/06381e38/attachment.htm>


More information about the MapServer-users mailing list