[Chameleon] Dynamic SLD - variable passing problem
Paul Spencer
pagameba at magma.ca
Mon Sep 27 09:51:41 EDT 2004
Timothy,
I don't see anything wrong with this approach in general. Do you mean
that the value of %study_id% is not being put into the map file? Or
that the sld url is not used when requesting the wms layer?
If the value of %study_id% is not being correctly replaced, I think that
has to do with how mapscript processes the map file ... variable
replacement in mapfiles is not something that I know a lot about and
specifically I don't know if it will work the way you seem to be trying
it. My approach to this would be to write a widget that would fix up
the metadata on selected layers ...
If the wms_sld_url metadata is not being passed along with the WMS
request, then that is a different problem (perhaps Assefa can comment on
this?)
Cheers,
Paul
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
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
--
-----------------------------------------------------------------
|Paul Spencer pspencer at dmsolutions.ca |
|-----------------------------------------------------------------|
|Applications & Software Development |
|DM Solutions Group Inc http://www.dmsolutions.ca/|
-----------------------------------------------------------------
More information about the Chameleon
mailing list