Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [udig-devel] Directional Symbology

Ramachandran

Have a look at the following code, this allows the use of custom/user
symbols.

Thanks
Andy


MapContext context = new DefaultMapContext(); 
			
StyleBuilder styleBuilder = new StyleBuilder();

ExternalGraphic icon =
styleBuilder.createExternalGraphic("FILE:///C:/temp/tutorials72.gif",
"image/gif");
			
Graphic graphic = styleBuilder.createGraphic(icon, null, null, 1, 60, 45);

PointSymbolizer pointSymbolizer=
styleBuilder.createPointSymbolizer(graphic);

Style style = styleBuilder.createStyle(pointSymbolizer);
			
Map map = (Map)ApplicationGIS.getActiveMap();
Layer layer = (Layer)map.getEditManager().getSelectedLayer();
				           
StyleBlackboard bb = (StyleBlackboard)layer.getStyleBlackboard();
bb.put(SLDContent.ID, style);

Layer writeableLayer = (Layer)layer;
writeableLayer.setStyleBlackboard(bb);
 
layer.getMap().getRenderManager().refresh(context.getAreaOfInterest());


-----Original Message-----
From: udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx
[mailto:udig-devel-bounces@xxxxxxxxxxxxxxxxxxxxx] On Behalf Of Ramachandran
Sent: 20 August 2007 08:19
To: udig-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: [udig-devel] Directional Symbology


I would like to use arrow symbols to road features which has directional
properties.
I have tried this in uDIG, but it's not available,
how can we add our own symbols?, Is it possible on RC11a.

by
Ramachandran

-- 
View this message in context:
http://www.nabble.com/Directional-Symbology-tf4297067.html#a12231197
Sent from the udig-devel mailing list archive at Nabble.com.

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



Back to the top