Dynamic SLD - variable passing problem

Pascoe,Tim [Burlington] Tim.Pascoe at EC.GC.CA
Mon Sep 20 14:05:51 PDT 2004


I'm working on setting up a dynamically generated SLD, in order to provide user-defined filtering for my application. The SLD is being applied to a virtual OGR layer, from my database. I can do it with a raw request to mapserver by including the SLD= tag, and a path to my php scrip which returns the SLD document. However, when I include the SLD in the metadata for the layer, it seems as if the variable is not passed into the SLD script from the CGI forms. The source for the layer is an OGR/VRT being served as a WMS.

My layer is set up as follows:

  LAYER
    NAME "CABINPoints"
    GROUP "Sample Points"
    STATUS ON
    TYPE RASTER
    TOLERANCE 5
    TOLERANCEUNITS PIXELS
    TEMPLATE "tt.html"
    CONNECTIONTYPE WMS
    CONNECTION "http://localhost/scripts/mapserv.exe?map=C:/Documents%20and%20Settings/TimP/My%20Documents/CABIN/Maps/map/pointswms.map"
    METADATA
          "wms_onlineresource" "http://localhost/scripts/mapserv.exe?"
          "wms_sld_url" "http://localhost/CABIN/Maps/map/study_sld_script.php?study_id=%study_id%"
        "wms_title" "CABIN Points test layer"
        "wms_abstract" "Test Access to CABIN SQL-Server Database on ECBURAS1"
        "wms_srs" "EPSG:42304"
        "wms_name" "CABINPoints"  # Eventually change this to the name of the Project being mapped
        "wms_formatlist" "image/png,image/gif,image/jpeg,image/wbmp"
        "wms_format" "image/png"
        "selected" "0"
        "wms_server_version" "1.1.1"
        "wms_title" "Site Location"
    END
    PROJECTION
      "init=epsg:4326"
    END
    DUMP TRUE
  END

Thanks...

Timothy Pascoe

Environment Canada / Environnement Canada
Canada Centre for Inland Waters / Centre Canadien des Eaux Intérieures
867 Lakeshore Road / 867, chemin Lakeshore
Burlington, Ontario / Burlington (Ontario)
L7R 4A6

Tel/Tél: (905) 336-6239
Fax/Téléc: (905) 336-4699
E-mail/C. élec: tim.pascoe at ec.gc.ca
Government of Canada/Gouvernement du Canada

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20040920/e3c1981f/attachment.htm>


More information about the MapServer-users mailing list