MapServer 5.4 does open up this possibility. It's not done via substitution but 
rather by passing
a bit of mapfile syntax. For example, 

  ...&map.layer[foo]=LABELITEM+newitem&...

However, you must set a validation pattern for MapServer to compare the new 
value against before
it will change it. So your layer definition might look like:

LAYER
  NAME 'foo'
  ...
  VALIDATION
    'labelitem' '^item1|item2|item3$'
  END
  ...
  LABELITEM 'item1'
END

In this case you could dynamically change LABELITEM to item1, item2 or item3 
but item4 would throw
an error. Hope this helps.

Steve

>>> On 6/29/2009 at 1:08 PM, in message 
>>> <[email protected]>,
stretch <[email protected]> wrote:

> Anyone have any ideas?
> 
> stretch wrote:
>> 
>> Hi All
>> 
>> We are using mapserv cgi to generate WMS and access via openlayers.
>> 
>> Searching reveals that it is not possible to dynamically change the
>> labelitem by substitution i.e
>> LABELITEM='%LABELFIELD%'
>> 
>> Is it possible however to do it via &map_layername_labelitem="labelfield"
>> in your url, or any other such method. Any help would be really
>> appreciated, because otherwise it means creating different layers for each
>> labelling option.
>> 
>> Thanks
>> Andrew 
>> 

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to