psiclopz

Image Overlay question

Discussion created by psiclopz on Nov 30, 2011
Latest reply on Oct 31, 2013 by dlednik-esristaff
Hi,

We're adding image overlays to our map to display weather patterns.  We're using the images from Weather.gov which provides a set of images that show the pattern over a period of time (15-30 minutes).  So to simulate a "doppler radar" animation effect we're using a timer to switch out the images every second or two.  The issue I'm seeing is that when I remove an image from a layer and add a new image, the old image disappears and then new one takes almost a second to appear.  I have also tried adding the new image to the layer first and then removing the old image but the same behavior occurs.  This leads me to think that maybe the layers refresh on their own schedule in the runtime and incorporate all new changes?  Is there anyway to make the adding/removing of images to a layer smoother?  Below are the two methods I tried with the same behavioral result.

Method 1:
if (_weatherOverlaysLayer.Graphics.Count != 0)
   _weatherOverlaysLayer.Graphics.Clear();

_weatherOverlaysLayer.Graphics.Add(graphic);


Method 2:
_weatherOverlaysLayer.Graphics.Add(graphic);

if (_weatherOverlaysLayer.Graphics.Count > 1)
   _weatherOverlaysLayer.Graphics.RemoveAt(0);


Thanks,

James

Outcomes