Re: [mapserver-users] Dynamic LabelItem

2009-07-01 Thread stretch


Upgraded to 5.4.1 with no problems and now performing dynamic labelling.

Thanks for the help!
-- 
View this message in context: 
http://n2.nabble.com/Dynamic-LabelItem-tp3174574p3190607.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Dynamic LabelItem

2009-06-30 Thread Dan Little

Upgrade...


- Original Message 
 From: stretch andrew.dekl...@gmail.com
 To: mapserver-users@lists.osgeo.org
 Sent: Monday, June 29, 2009 2:13:29 PM
 Subject: Re: [mapserver-users] Dynamic LabelItem
 
 
 ok - thanks for the response. If I try
 map.layer[Compartments]=labelitem%20Age 
 i get
 getSymbol(): Symbol definition error. Parsing error near ():(line 1)
 
 I am using Mapserver 5, I guess I should be using 5.4?? If that is the case,
 is there a solution I could use with  version 5 or will I need to upgrade
 
 Thanks
 -- 
 View this message in context: 
 http://n2.nabble.com/Dynamic-LabelItem-tp3174574p3176452.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users



  
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Dynamic LabelItem

2009-06-30 Thread Steve Lime
That particular portion of MapServer has undergone a lot of change. At first I 
removed too much
functionality in 5.0, then exposed a bit more in 5.2 and probably got a lot 
closer to right in 5.4.

You're safest with 5.4.1 if you can afford to upgrade. What version exactly are 
you using?

Steve

 On 6/29/2009 at 2:13 PM, in message 
 1246302809284-3176452.p...@n2.nabble.com,
stretch andrew.dekl...@gmail.com wrote:

 ok - thanks for the response. If I try
 map.layer[Compartments]=labelitem%20Age 
 i get
 getSymbol(): Symbol definition error. Parsing error near ():(line 1)
 
 I am using Mapserver 5, I guess I should be using 5.4?? If that is the case,
 is there a solution I could use with  version 5 or will I need to upgrade
 
 Thanks

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Dynamic LabelItem

2009-06-30 Thread stretch

I know, and I want all that new functionality :)

I am using 5.0.0

I did try an upgrade a couple of weeks ago, but we had hassles with existing
application running with openlayers as the frontend, where it displayed the
the whole map file image in each map tile as opposed to cutting it up (if
that makes sense!). also, our getLegendGraphic requests didnt work after the
upgrade. We therefore quickly restored back to 5.0.0. 

The straight mapserv request was working fine, so it is more a openlayers
issue - however - we could not go through and sort out all our existing
apps, so thats why we downgraded again. I have just downloaded the 5.4.1
beta MS4W from maptools and will try that tonight, and see If i can get my
openlayers resolutions correct

Andrew


Steve Lime wrote:
 
 That particular portion of MapServer has undergone a lot of change. At
 first I removed too much
 functionality in 5.0, then exposed a bit more in 5.2 and probably got a
 lot closer to right in 5.4.
 
 You're safest with 5.4.1 if you can afford to upgrade. What version
 exactly are you using?
 
 Steve
 
 On 6/29/2009 at 2:13 PM, in message
 1246302809284-3176452.p...@n2.nabble.com,
 stretch andrew.dekl...@gmail.com wrote:
 
 ok - thanks for the response. If I try
 map.layer[Compartments]=labelitem%20Age 
 i get
 getSymbol(): Symbol definition error. Parsing error near ():(line 1)
 
 I am using Mapserver 5, I guess I should be using 5.4?? If that is the
 case,
 is there a solution I could use with  version 5 or will I need to upgrade
 
 Thanks
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 

-- 
View this message in context: 
http://n2.nabble.com/Dynamic-LabelItem-tp3174574p3183671.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Dynamic LabelItem

2009-06-29 Thread stretch

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-tp3174574p3174574.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Dynamic LabelItem

2009-06-29 Thread stretch

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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


RE: [mapserver-users] Dynamic LabelItem

2009-06-29 Thread Fawcett, David
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.
mapmode=mapmap.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-boun...@lists.osgeo.org
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of stretch
Sent: Monday, June 29, 2009 1:08 PM
To: mapserver-users@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Dynamic LabelItem

2009-06-29 Thread Steve Lime
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 
 1246298901193-3176090.p...@n2.nabble.com,
stretch andrew.dekl...@gmail.com 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
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Dynamic LabelItem

2009-06-29 Thread stretch

ok - thanks for the response. If I try
map.layer[Compartments]=labelitem%20Age 
i get
getSymbol(): Symbol definition error. Parsing error near ():(line 1)

I am using Mapserver 5, I guess I should be using 5.4?? If that is the case,
is there a solution I could use with  version 5 or will I need to upgrade

Thanks
-- 
View this message in context: 
http://n2.nabble.com/Dynamic-LabelItem-tp3174574p3176452.html
Sent from the Mapserver - User mailing list archive at Nabble.com.

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users