<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.esri.com/Dev/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx</link><description>Rex Hansen contributed this post about how to use some of the enhanced JavaScript in Service Pack 2 to track pending tiles and display a busy indicator (such as an animated "Loading" graphic) over the Web ADF's Map control: As a Web ADF developer working</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Debug Build: 61120.2)</generator><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#182</link><pubDate>Tue, 01 May 2007 22:07:53 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:182</guid><dc:creator>David</dc:creator><description>This is good.  It solves almost all of the lack of 'working' indicators in 9.2, that existed prior in 9.1 and in ArcIMS.</description></item><item><title>Showing busy indication on ESRI Web Map control</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#183</link><pubDate>Wed, 02 May 2007 03:34:46 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:183</guid><dc:creator>Community Blogs</dc:creator><description>&lt;p&gt;A quick note to all people using GIS from ESRI or the Map control. Rex Hansen, one of the top software&lt;/p&gt;
</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#196</link><pubDate>Fri, 04 May 2007 15:52:44 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:196</guid><dc:creator>stephenmau</dc:creator><description>I'm doing some testing on this "busy indicator" stuff now. However, the error message always shows up complaining about a javascript error: "map.pendingTiles is null or not an object".

Already installed the ArcGis Server 9.2 for .net service pack 2. Tried to set the "UseDefaultWebResources" to ture, or false(set the "WebResourceLoation" to "/aspnet_client/ESRI/WebADF/") but it doesn't help. I could find the "pendingTiles" properties inside the javascript file "display_map.js". However, it seems the old version of javascript is still loading instead of the new one which comes with the SP2. Any help will be appreciated.</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#198</link><pubDate>Fri, 04 May 2007 18:23:36 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:198</guid><dc:creator>Rex Hansen</dc:creator><description>This error is usually associated with an incorrect Map id.  The sample above assumes the id is "Map1" when it gets the JavaScript Map object from the Maps array:

map = Maps["Map1"];

Let me know if the problem persists.</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#252</link><pubDate>Tue, 08 May 2007 20:27:08 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:252</guid><dc:creator>sterlingdq</dc:creator><description>&lt;p&gt;From stephenmau on May 8, 2007: Rex, My bad! I put the javascript code inside the form tag by mistake. Appreciate your help.:)&lt;/p&gt;
</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#273</link><pubDate>Thu, 10 May 2007 21:19:53 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:273</guid><dc:creator>lvo2006</dc:creator><description>&lt;p&gt;Simple yet works so efficiently. Thanks so much for this.&lt;/p&gt;
</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#291</link><pubDate>Mon, 28 May 2007 08:52:12 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:291</guid><dc:creator>Michael</dc:creator><description>where is image CircleThickbox?</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#461</link><pubDate>Thu, 13 Sep 2007 02:01:51 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:461</guid><dc:creator>aaron</dc:creator><description>I install sp3 and I can not see the busy indicator?</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#465</link><pubDate>Thu, 13 Sep 2007 18:47:57 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:465</guid><dc:creator>Rex Hansen</dc:creator><description>This should still work in sp3.  

Are any errors returned?  

Do you see information in the status bar to indicate the showBusyIndicator or showPendingTiles functions are being called?  

Is the script tag that contains these functions outside the form tag in the page?  

In the custom JavaScript added for this scenario, is the map id correct when referencing the Maps array?</description></item><item><title>Busy indicator when custom tool bar action underway?</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#468</link><pubDate>Fri, 14 Sep 2007 19:53:54 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:468</guid><dc:creator>Eric</dc:creator><description>Rex, your code works wonderfully! I'd like to learn how to extend it in this way:

I have a custom tool bar tool that when clicked on the map it performs a spatial query (before the map refreshes), then refreshes the map with a circle on it.  How do I get a "busy indicator" to display when the spatial query is launched and before the map.Refresh() event is fired?

Thanks!</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#475</link><pubDate>Mon, 17 Sep 2007 21:53:28 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:475</guid><dc:creator>Rex Hansen</dc:creator><description>Eric, 

You'll need to trigger the busy indicator when the initial callback is sent to the server. If this happens when using a tool in a Web ADF Toolbar control, the callback is sent when the tool interacts with the Map. Depending on the tools ClientAction, this may occur during an onclick, onmouseup, etc. event on the div object that contains the map. So one easy way to implement this is to listen for the appropriate event in the browser, check the mode on the map to determine which tool is active, then choose to show the busy indicator. In the server implementation of the tool you'll need to create a custom CallbackResult using JavaScript to locate and hide the busy indicator. Add the CallbackResult to the callback response (via the Map). Two code snippets are provided below. The name of the custom tool is "CustomTool".  

1) Custom client code to listen for an event on the map div (same location as the custom JavaScript for the pending tiles example).

&lt;PRE&gt;
. . .
var map = Maps['Map1'];

map.divObject.onmouseup = function() {
if (map.mode == 'CustomTool')
{    
   document.getElementById('BusyIndicator').style.visibility = 'visible';                         
}
}    
. . .
&lt;/PRE&gt;


2) Custom CallbackResult to use in the tool implementation on the server.

&lt;PRE&gt;
Map adfMap = (Map)args.Control;
. . . 

string jsHideLoading = "document.getElementById('BusyIndicator').style.visibility = 'hidden'";
CallbackResult hideLoadingCallbackResult = new CallbackResult(null, null, "javascript", jsHideLoading);
adfMap.CallbackResults.Add(hideLoadingCallbackResult);
&lt;/PRE&gt;

Hope this helps,
-Rex</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#481</link><pubDate>Wed, 19 Sep 2007 19:32:05 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:481</guid><dc:creator>Eric</dc:creator><description>Thanks Rex, that worked perfectly!</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#505</link><pubDate>Thu, 27 Sep 2007 14:41:19 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:505</guid><dc:creator>Tommy</dc:creator><description>Thanks Rex, I have a little problem with the function showLayer("ProcessingNow") and hideLayer("ProcessingNow"). They are not working, and after I replaced them by my own code, I can see the gif image now. I'm using IE7.
Actually I have another question for you. I want to add coordinate grids for my map and label the degree numbers on the left and bottom border. Could you please tell me how I can get the handler after the map extent is changed? I'm thinking to use the functions you posted here, do you know any easier way?

Thanks!
Tommy</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#508</link><pubDate>Tue, 02 Oct 2007 01:14:27 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:508</guid><dc:creator>Jian Huang</dc:creator><description>For those who want to apply this method into a custom command, you could 
1). set the ClientAction as:
showBusyIndicator(); postBack('Toolbar1',&lt;CommandName&gt;);

2). On the server side, add the code below to hide the busy indicator:
        CallbackResult hideLoading = new CallbackResult(null, null, "JavaScript", "window.setTimeout('hideBusyIndicator();', 500)");
        mapCtrl.CallbackResults.Add(hideLoading);
</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#589</link><pubDate>Wed, 07 Nov 2007 22:06:37 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:589</guid><dc:creator>Jeff</dc:creator><description>Can this be done while using master pages and contentplaceholders? If so, how?</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#614</link><pubDate>Wed, 14 Nov 2007 09:00:07 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:614</guid><dc:creator>secondflying</dc:creator><description>&lt;p&gt;I got a bug with the code.If I identified map &amp;nbsp;some times and then click &amp;quot;Clear All&amp;quot; link in TaskResults Control,the BusyIndicator don't disappear.&lt;/p&gt;
&lt;p&gt;Is there anyone face the same problem and How to resove this bug??&lt;/p&gt;
&lt;p&gt;thanks?&lt;/p&gt;
</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#814</link><pubDate>Wed, 26 Dec 2007 22:44:15 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:814</guid><dc:creator>abakhtiyarov</dc:creator><description>&lt;p&gt;Rex,&lt;/p&gt;
&lt;p&gt;It is a useful code, but sometimes image does not even show up but I can see the status bar message is there, so I know it is working, in your original code I try to set a timeout on java script in showPendingTiles(sender) method: at the end of if statement i put this: setTimeout('hideLayer(&amp;quot;BusyIndicator&amp;quot;);', 10000);&lt;/p&gt;
&lt;p&gt;and it is not working, still doing the same thing. I have 9.2 sp3. Any help would be greatly appreciated.&lt;/p&gt;
</description></item><item><title>re: How to track pending tiles and display a busy indicator in a Web mapping application</title><link>http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2007/05/01/How-to-track-pending-tiles-and-display-a-busy-indicator-in-a-Web-mapping-application.aspx#820</link><pubDate>Mon, 31 Dec 2007 20:13:39 GMT</pubDate><guid isPermaLink="false">b60b3f0a-e2bd-4be5-8a18-822c697649ab:820</guid><dc:creator>abakhtiyarov</dc:creator><description>&lt;p&gt;In other words, I want the client to detect the last “expected?” message from the server, so I can display an animated “Loading…” message until the last “data packet?” is received and processed. &amp;nbsp;My application appears to be receiving/expecting data even after the pending tiles collection has no more items, so my best guess, which is limited by my level of web development experience, is that I need to monitor some other collection variable and await its depletion. &amp;nbsp;How are web browsers able to show their waiting icon/message? &amp;nbsp;In my opinion, the web browser’s default wait notification is unfortunately not apparent to the end user, but that is what I want to monitor, so that is what I am trying to enhance.&lt;/p&gt;
&lt;p&gt;Any help will be greatly appreciated.&lt;/p&gt;
</description></item></channel></rss>