ThinkGeo.com    |     Documentation    |     Premium Support

Multiple Overlays Redraw at one ONE time

Hi,
I am trying to redraw multiple overlays at one time,. but i couldn’t.

Code:
((LayerOverlay)wfMap.CustomOverlays[“AircraftOverlay”]).Redraw();
((LayerOverlay)wfMap.CustomOverlays[“RouteOverlay”]).Redraw();

Is it possible to Redraw both overlays at one time, Pls suggest me.

Thanks,
Riyaz

Hi Riyaz,

Event you call map.refresh, the overlay will be refreshed one by one, but you cannot watched that because double buffering.

We have another API:

public void Refresh(IEnumerable redrawOverlays)

Please try it and see whether that works for you.

Regards,

Ethan

Hi Ethan,
I am not getting properly. I observe , we can write refresh for multiple overlays in Desktop Edition.
Code:
wfMap.Refresh(new Overlay[2] { wfMap.Overlays[“AircraftOverlay1”], wfMap.Overlays[“AircraftOverlay2”] });

But same Refresh functionality not there in Web edition. So I have Redraw Each overlay one by one.

Code:
((LayerOverlay)wfMap.CustomOverlays[“AircraftOverlay1”]).Redraw();
((LayerOverlay)wfMap.CustomOverlays[“AircraftOverlay2”]).Redraw();

So is it possible to redraw more than one overlay at single Line.

Thanks,
Riyaz

Hi Riyaz,

For web edition, the client side API is supported by OpenLayers, I think it don’t have related API to refresh multiply layers at the same time. And for JavaScript, even we have this API it still be works one by one, because it don’t have really multithreading.

Regards,

Ethan