[geotk] Objects animation/movement on map

johann sorel johann.sorel at geomatys.com
Thu Oct 13 01:24:16 PDT 2016


Hello,

The rendering engine is stateless by default, but we have some possible 
alternatives.

Solution 1 :
final JMap2D jmap = new JMap2D();
jmap.getCanvas().setRenderingHint(GO2Hints.KEY_BEHAVIOR_MODE, 
GO2Hints.BEHAVIOR_KEEP_TILE);
This will ask the swing widget to replace the image at the last moment 
when possible, it should reduce the flickering.
You can also try the 'GO2Hints.BEHAVIOR_ON_FINISH'

Solution 2 :
final JMap2D jmap = new JMap2D(true);
The boolean argument is for 'statefull', the engine will cache more 
informations and use separate buffers
for each layer. But it use more memory.

Solution 3 :
There is also the solution to create a custom decoration over the map,
A demo is available in the demo-samples module, package : 
org.geotoolkit.pending.demo.rendering.customdecoration
But it require a lot more work.



Johann Sorel



On 12/10/2016 06:51, Gopinath Asutosh wrote:
> Hi ,
> I want to show over 100 objects representing vehicles moving on GIS 
> map. The locations of vehicle change every 10 secs.
> I tried to create a circle with its center located on GPS coordinates 
> obtained from devices mounted on vehicles. Whenever new coordinates 
> are received I create a new circle and call store.updateFeatures. This 
> plots the circles on new location but it also simultaneously causes 
> the screen to flicker a lot due to which the animation effect is lost.
>
> It is possible to animate any object using geotoolkit without causing 
> the screen to flicker.
>
> Thanks and regards
> Asutosh Gopinath
>
>
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20161013/4e48caa7/attachment.html>


More information about the Geotoolkit mailing list