Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] programmatically changing the layer style

That's basically how you have to do it. The setSelected is usually not required but it is good practice.

Jesse

On 5-Jun-08, at 2:59 PM, Jürgen Jacob wrote:

I've created a temporary layer according to [1] and want to change the style of this layer. Is this the correct way or to complicated?

Style style = MyStyleFactory.getStyle();
layer.getStyleBlackboard().put(SLDContent.ID, style);
layer.getStyleBlackboard().setSelected(new String[]{SLDContent.ID});

[1] http://svn.refractions.net/udig/udig/branches/1.1.x/udig/tutorials/net.refractions.udig.tutorials.examples/src/net/refractions/udig/tutorials/examples/CreateTemporaryLayer.java


Thanks,
Jürgen

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



Back to the top