setting STYLE with CGI parameters

Brock Anderson banders at REFRACTIONS.NET
Fri Mar 31 18:22:21 EST 2006


Thanks Paul.

Near the bottom of this page:

    http://mapserver.gis.umn.edu/docs/reference/cgi/controls

it says if there is only one class, then omit the index.  I actually 
have the CGI parameters working to set outlinecolor directly within the 
class.  I use a query string parameter like this:

    &map_mylayer_class_outlinecolor=...

I just can't seem to get into the STYLE elemen to set WIDTH.

Brock

Paul Ramsey wrote:

> I think you have to enumerate all the unnameable elements for which  
> there are potentially more than one entry. (Not sure if we count from  
> 0 or 1)
>
> &map_mylayer_class_0_style_0_width=3
>
> P
>
> On 31-Mar-06, at 2:57 PM, Brock Anderson wrote:
>
>> Hi All,
>>
>> I am trying to use CGI parameters to dynamically set the WIDTH and  
>> OUTLINECOLOR within a STYLE tag.  I've tried various formats for  the 
>> CGI parameters, including something like:
>>
>>    &map_mylayer_class_style_1_width=3
>>
>> ... but the parameters are being ignored.  Is it possible to use  CGI 
>> parameters to set values within a STYLE element?  How?
>>
>> Brock
>>
>> I'm using Mapserver 4.6.2.  A piece of my map file:
>>
>> LAYER
>>  NAME "mylayer"
>>  CONNECTIONTYPE postgis
>>  CONNECTION "..."
>>  DATA "..."
>>
>>  CLASS
>>    EXPRESSION ([pop] > 5000)
>>    NAME "above 5000"
>>    STYLE
>>      COLOR 0 197 255
>>    END #end style
>>    STYLE
>>      OUTLINECOLOR 0 197 255
>>      WIDTH 5
>>    END #end style
>>  END #end class
>>
>>  TYPE polygon
>>  STATUS DEFAULT
>>  PROJECTION
>>    "init=epsg:4269"
>>  END #projection
>> END #LAYER
>
>



More information about the mapserver-users mailing list