[geotk] Redraw layer

sorel johann johann.sorel at geomatys.fr
Sun Dec 11 11:12:02 EST 2011


Hi,

It's more complicated. internally there are several image created.
and they are progressively merged together when each one is ready.
The labels are painted at the end over everything.
Repainting a layer would imply repainting the label 'calque' too (assuming
all labels texts and position have been stored, which is not the case).

Some layer use caches like wms and other tiled source layers, those layers
will only requiere a very very short time to repaint.

At this time you can create two types of canvas, statefull and stateless.
(when you create a J2DCanvas) the main different are in caches, the 
statefull
mode will try to cache more datas and stateless won't keep anything and 
will only use
a single image to paint which makes it a bit slower but requiere less 
memory.

It is possible to make another mode and have each layer in separate images,
if you want to try to make it you can start by looking at the J2DCanvas.


I don't know if you are in swing or something else, another approach is 
to use the
DefaultPortrayalService do generate one image for each layer and then 
reaggregate them
the way you wish.

johann



On 11/12/2011 14:31, Arnaud Vandecasteele wrote:
> Hi all,
>
> I would like to know if it's possible to repaint a specific layer.
> I know there is a getCanvas().repaint() method but it applies to all layers.
>
> Also, can you let me know how geotoolkit works to draw the image.
> Is it a global image for all the map (all the layers) or differents
> images for each layers.
>
> Best regards
>
> Arnaud
>
>
> --
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit



More information about the Geotoolkit mailing list