[mapserver-users] change outline color programmatically

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Mon Feb 7 09:13:34 EST 2011


Try updating the class from string, not the layer, e.g.:

getLayer => getClass => class.updateFromString

Steve
________________________________________
From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] On Behalf Of ahmettemiz88 at gmail.com [ahmettemiz88 at gmail.com]
Sent: Monday, February 07, 2011 6:33 AM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] change outline color  programmatically

hello

I tried to change outline color of the polygons programmatically.
But nothing happens.

here is my map file's fragment.
~~~~~~~~
NAME "DAIRESEL-AKMA"
EXPRESSION "Dairesel+Akma"
SIZE 1
OUTLINECOLOR 0 0 0
SYMBOL 'CIRCLE'
COLOR 123 0 255
LABEL
MINFEATURESIZE 30
MINDISTANCE 150
POSITION CC
#SIZE TINY
SIZE MEDIUM
OUTLINECOLOR 247 234 168
COLOR 1 1 1
END
~~~~~~~~

and

my java code fragment concerned:

~~~~~~~~~
layerObj heyLayer = new layerObj(map0);
heyLayer = map0.getLayerByName("hey_layer");
String upstring = "LAYER CLASS NAME \"DAIRESEL-AKMA\" OUTLINECOLOR 255 255 255 END END";
heyLayer.updateFromString(upstring);
heyLayer.setStatus(1);
~~~~~~~~~

what do I have to do ?

regards



More information about the mapserver-users mailing list