Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Setting new style programmatically



On Fri, Nov 28, 2008 at 2:10 AM, Jürgen Jacob <zoid.berg@xxxxxx> wrote:
Dear all,

I'm changing the style of a shapefile layer programmatically like this:

layer.getStyleBlackboard().put(SLDContent.ID,style);
layer.refresh(map.getBounds(null));

During this the maps flickers since:
1. Map is rendered without affected layer
2. Map is rendered with new style

The time between is less than one second but this is a bit disturbing. I thought all layers are rendered in the background, merged and then the map is drawn. Like double buffering.

No you can watch the layers draw; we considered treating it like double buffering after the layer has been drawn the first time - but since it can take a while to draw people ended up just hitting the refresh button multiple times. If you try out the tile renderer on trunk perhaps it will be closer to what you want?

Do I have to set a certain parameter or is it a normal behaviour?

It is behaving as expected.

Jody


Back to the top