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

getLayer => getClass => class.updateFromString

Steve
________________________________________
From: [email protected] 
[[email protected]] On Behalf Of [email protected] 
[[email protected]]
Sent: Monday, February 07, 2011 6:33 AM
To: [email protected]
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

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

Reply via email to