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

Tonton to.tonton at gmail.com
Thu Dec 1 07:43:30 EST 2011


hello
i try this

    awebdef = mapscript.webObj()
    awebdef.maxscaledenom = 1550000
    awebdef.minscaledenom = 1000
    awebdef.imagepath="/var/www/path/"
    awebdef.imageurl="../tmp/"
    awebdef.metadata = mapscript.hashTableObj()
    awebdef.metadata.set("ows_TITLE", atitle)

    mapServerUrl = u.sitepath_prm
    mapfilepath = u.mapfilepath_prm

    awebdef.metadata.set("ows_ONLINERESOURCE",
mapServerUrl+"map="+mapfilepath+layer.name_lyr+".map")

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

but the result still this in my mapfile

  WEB
  END # WEB

 someone knows why may be

T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20111201/11e96805/attachment.html


More information about the mapserver-users mailing list