[udig-devel] Directional Symbology
Jesse Eichar
jeichar at refractions.net
Mon Aug 20 08:54:38 PDT 2007
Hi
If you look at the SLD specification you can create an SLD document
for your layer that does the same thing as the code here. I think
there are examples in the archive of this list. I'll go take a look
to see if I can find it.
Jesse
On Aug 20, 2007, at 12:25 AM, Andy Cox wrote:
> 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 at lists.refractions.net
> [mailto:udig-devel-bounces at lists.refractions.net] On Behalf Of
> Ramachandran
> Sent: 20 August 2007 08:19
> To: udig-devel at lists.refractions.net
> 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
>
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel
More information about the udig-devel
mailing list