Select to view content in your preferred language

Slow Graphic Updates on Map

5758
11
04-03-2021 06:35 AM
TimothyReed1
Emerging Contributor

I have been working on a JavaFX application using the ArcGIS Java runtime and I am having issues with graphics updating on the map.  The premise is we are trying to track an aircraft as it flys, so we get location updates 1 per second.  When this update is received I search through the graphics on the graphics layer to find the corresponding graphics.  I have three graphics per aircraft (aircraft icon, text, and a tail).  Each graphic is updated during each location update.  With one aircraft the update is very jittery, it appears that the map updates every 2-3 seconds as I get a stepping motion in the graphic (see attachment) as it moves as opposed to a smooth motion.  If I turn on the tails then the lag is even higher and there are times when the poly line does not fully display.  The more aircraft that are being tracked the worse the display gets.  Currently I am not doing the graphic updates in a separate thread (Platform.runLater) as I found that did not improve performance.  The graphics layer is set to dynamic rendering mode, and the map is in 3D. Currently the aircraft graphics are 2D.  Removing the display of the tail (blue line) does not improve the performance.

The flight plan that was being flown is below in the screen shots to show that the aircraft was flying a straight line and not a step.

I can post code if needed.  Thoughts?

Thanks,

Tim

 

 

0 Kudos
11 Replies
TimothyReed1
Emerging Contributor

Mark,

  Thank you!  That makes the tail much better looking and reactive to what is going on.  With the database query there was always a lag, this has greatly reduced I/O and CPU utilization.

 

Thank you again.  I think I'm good for now I appreciate the assistance.

0 Kudos
MarkBaird
Esri Regular Contributor

@TimothyReed1 as I've had a few questions similar to this recently, I've written a blog post which you may find useful for future reference.  There is a git repository containing the demo too.

0 Kudos