Dynamic SLD - variable passing problem

Yewondwossen Assefa assefa at DMSOLUTIONS.CA
Tue Sep 21 10:30:10 EDT 2004


Not sure what the problem is. Quick suggestions/questions :
   - which version of mapserver are you using. This addition
(wms_sld_url) was done around Feb 2004 and is available in the latest
realses.

    - can you subtitute wms_sld_url with wms_sld_body (the value for
this metadata is the content of the sld document). Does this work ?

  If none of these work and the sld is valid, you could maybe send me a
sample of your data,sld,... and I could do some testing here.

Later,

Pascoe,Tim [Burlington] wrote:

> 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_ <mailto:tim.pascoe at ec.gc.ca>
> Government of Canada/Gouvernement du Canada
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: assefa at dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------



More information about the mapserver-users mailing list