[mapserver-users] Changing map file parameter (Label Color) via URL

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Wed Nov 24 13:25:49 EST 2010


Try map.layer[resultlabel].class[0]=LABEL+COLOR+255+0+0+END instead...

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of myOpenLayersUName
Sent: Wednesday, November 24, 2010 11:04 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Changing map file parameter (Label Color) via URL


Hello,

Can someone help me out with the proper syntax for the following? Or, tell
me outright that it is not possible?

I've been trying to apply the documentation found on the MapServer CGI
Controls page
(http://www.mapserver.org/cgi/controls.html#changing-map-file-parameters-via-a-form-or-a-url)
under the "Changing map file parameters via a form or a URL" section but
have not had any luck applying it to change the colour of the label text. 

I have a basic URL in which I pass the coordinates for a point and provide
the label text as follows:
http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/wms/dynamicWms/map/dynamicWms.map&map.layer[resultlabel]=FEATURE
POINTS -749340.32786036 180081.55026124 END TEXT 'Fence 1'
END&LAYERS=resultlabel&FORMAT=image/png&SRS=EPSG:42304&TRANSPARENT=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&BBOX=-910537.6366469,102726.53880899,-587878.43588336,261873.32786947&WIDTH=1219&HEIGHT=601

I would further like to set the colour of the point symbol and its label
text within the URL. 

At this point, I am able to set the point symbol's colour by adding
"&map.layer[resultlabel].class[0]=COLOR 255 0 0"; but I can't seem to change
the label text's colour. It is always black. I've tried adding
"&map.layer[resultlabel].class[0].label[0]=COLOR 255 0 0" and
"&map.layer[resultlabel].class[0].label=COLOR 255 0 0" to no avail. 

If it matters, my map layer is defined as follows:
  LAYER
    NAME "resultlabel"
    STATUS ON
    TYPE point
    PROJECTION
      "init=epsg:42304"
    END
    METADATA
      "wms_title"       "Result Label"
    END
    CLASS
      SYMBOL "thickcrosshair"
      SIZE 9
      COLOR 0 0 0
      LABEL
        TYPE truetype
        FONT arial-bold
        SIZE 10
        COLOR 0 0 0
        OUTLINECOLOR 255 255 255
        POSITION ur
        FORCE ON
      END
    END
  END


Does anyone know if this is this just a syntax problem that I am having or
if changing the label text's colour is just not supported?

Cheers,
jtm

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Changing-map-file-parameter-Label-Color-via-URL-tp5771138p5771138.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