Frederico a écrit :
I have a layer with a vehicle ( a point with an external graphic ), when i change the position of the vehicle ( change de feature collection (fc) ), im deleting and adding this layer again
(
    ...
    map.removeLayer( layerViatura );
    layerViatura = new DefaultMapLayer( fc, style, viatura.toString() );
    map.addLayer( layerViatura );
)
Is this correct? or there is a better way to do that..


Are you using the J2D-renderer or the streaming (a.k.a. lite) one? With the J2D renderer, if you know the RenderedLayer that contains the vehicule, invoking RenderedLayer.repaint() should be much more efficient.

        Martin.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to