GetImageUrl called twice

905
0
01-26-2012 04:46 PM
CoreyAlix
Occasional Contributor
PROBLEM:
GetImageUrl called twice resulting in two trips to the server if caching is off.

QUESTION:
How can this be prevented?

HOW TO REPRODUCE:
Go to any sample with a dynamic layer (e.g. http://help.arcgis.com/en/webapi/javascript/arcgis/demos/layout/layout_mapcontainersplitinthree.html)
Run a tool like fiddler2 to monitor IP traffic
Resize the browser
Notice that two identical requests are sent

http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Daytime_Population/MapServer/ex...

http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Daytime_Population/MapServer/ex...

A single call to map._resize results in getImageUrl being called twice (once for the resize and once for the change of extent).
0 Kudos
0 Replies