[mapserver-users] Dynamic LabelItem
Fawcett, David
David.Fawcett at state.mn.us
Mon Jun 29 11:44:52 PDT 2009
Searching revealed that it is possible to change a labelitem by
substitution.
Have you had a look at this page?
http://mapserver.org/cgi/controls.html
Scroll down to the header 'Using MapServer version >=5'
In the below example, the layer name is 'aqiAreas' and I am changing the
column to be used to 'NAMESAFE'.
I am referencing the layer by name and then after the '=' sign, you put
the property that you want to change (labelitem), a space, and then the
name of the new column to be used.
http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/imap/labelitem-test.
map&mode=map&map.layer[aqiAreas]=labelitem%20NAMESAFE
David.
PS. If this question was about whether OpenLayers passes on your custom
URL vars to MapServer in a WMS call, I am not so sure about that. I
believe that more recent versions to, but that would be a question for
the OpenLayers list.
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of stretch
Sent: Monday, June 29, 2009 1:08 PM
To: mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] Dynamic LabelItem
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
>
--
View this message in context:
http://n2.nabble.com/Dynamic-LabelItem-tp3174574p3176090.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list