<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Map Progress event not firing in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127252#M3186</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried hooking up the event handler in the page.loaded or map.loaded event instead of in the constructor? map.Layers.LayersInitialized might also be a good time to do this. I believe the map progress is 100% when the map initially loads (before starting to initialize the layers where no data is "missing" yet)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Aug 2011 19:37:33 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2011-08-30T19:37:33Z</dc:date>
    <item>
      <title>Map Progress event not firing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127250#M3184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to get access to the Map Progress event so that I can turn off a custom splash screen after the map tiles have been downloaded.&amp;nbsp; This is similar to this previous forum posting:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/17132-Event-for-when-map-service-image-is-returned?highlight=map.progress" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/17132-Event-for-when-map-service-image-is-returned?highlight=map.progress&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I can't seem to get the Progress event to fire when I need it.&amp;nbsp; My code looks like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In MainPage.xaml.cs constructor (where Map is the name of the map object):&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Map.Progress += new EventHandler&amp;lt;ESRI.ArcGIS.Client.ProgressEventArgs&amp;gt;(Map_Progress);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the procedure Map_Progress:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void Map_Progress(object sender, ESRI.ArcGIS.Client.ProgressEventArgs e)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.Progress == 100)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; HtmlPage.Window.Invoke("hideSplashscreen", null);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can put the Invoke command in a handler for the Map.Loaded event, and that works, but it removes the splash screen before the map has finished loading the tiles.&amp;nbsp; Strangely, after the Map.Loaded event fires the Invoke command, the Map.Progress event will then fire.&amp;nbsp; Of course by then it is too late.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm really confused about this and would appreciate any help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:13:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127250#M3184</guid>
      <dc:creator>AndrewMurdoch</dc:creator>
      <dc:date>2021-12-11T07:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Map Progress event not firing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127251#M3185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried with this sample? &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MapProgressBar" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#MapProgressBar&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can update this sample by adding:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;XAML:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;lt;esri:Map x:Name="MyMap" WrapAround="True" Progress="MyMap_Progress"&amp;gt;
&amp;lt;!-- more code here --&amp;gt;
&amp;lt;TextBlock x:Name="ProgressTb" VerticalAlignment="Top" HorizontalAlignment="Center"/&amp;gt;
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Code-behind:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void MyMap_Progress(object sender, ESRI.ArcGIS.Client.ProgressEventArgs e)
{
 ProgressTb.Text = string.Format("Progress : {0}", e.Progress);
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice that when you navigate the map (zoom/pan), the progress bar changes as it requests for new tiles. See how your app is different from this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:13:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127251#M3185</guid>
      <dc:creator>JenniferNery</dc:creator>
      <dc:date>2021-12-11T07:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: Map Progress event not firing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127252#M3186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you tried hooking up the event handler in the page.loaded or map.loaded event instead of in the constructor? map.Layers.LayersInitialized might also be a good time to do this. I believe the map progress is 100% when the map initially loads (before starting to initialize the layers where no data is "missing" yet)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Aug 2011 19:37:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127252#M3186</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2011-08-30T19:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Map Progress event not firing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127253#M3187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for your replies.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried hooking up the Map.Progress event handler in Page.Load, Map.Load and also in Map.Layers.LayersInitialized events, but without success.&amp;nbsp; By stepping through the code, I can see that the Page.Load event is reached and the Map.Load event is reached, but Map.Layers.LayersInitialized and Map.Progress events never fire (at least while the ASP.NET splashscreen is still visible).&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I first turn off the ASP.NET splashscreen div using the javascript Invoke method in the Page.Load or Map.Load event handlers, then the Map.Layers.LayersInitialized and Map.Progress events start to fire.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm leaning toward putting up a separate Silverlight modal splashscreen to replace the ASP.NET splashscreen div when it is closed on Page.Load.&amp;nbsp; Then the Silverlight splashscreen would block out the page until the Map.Progress event reaches 100.&amp;nbsp; Not as elegant as I hoped, though, and I still don't understand what I'm doing wrong...&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW, I'm using Silverlight ESRI API 2.2.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2011 17:22:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127253#M3187</guid>
      <dc:creator>AndrewMurdoch</dc:creator>
      <dc:date>2011-08-31T17:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Map Progress event not firing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127254#M3188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try setting the DisableClientCaching = true on your dynamic layers.&amp;nbsp;&amp;nbsp; I figured out the progress event does not alway fire until you set this.&amp;nbsp;&amp;nbsp;&amp;nbsp; I think the layer becomes cached and then the event doesn't fire because there is nothing to report progress on (its already done as with the layers they are cache - you would think it would fire it anyway).&amp;nbsp;&amp;nbsp; I especially notice this behavior when the map extent remains the same and the layers turned on remain the same.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my situation I rebuild a seperate map to generate a PDF (I do a seperate map to rescale it the page size without messing up the screen map).&amp;nbsp;&amp;nbsp; Each time I do this I clear all the layer in the PDF map and rebuilt them from the screen map.&amp;nbsp;&amp;nbsp; The first time I generated the map everything worked fine.&amp;nbsp;&amp;nbsp; The second time I generated with the same extent/layers as before the progress does not fire dispite the fact I totally cleared the map.&amp;nbsp; I believe this is because its the webservive that is cached not so much the map object/Dynamic layers themselves.&amp;nbsp; Since I using the same webservice even with new Dynamic Layers (although with the same combo as the previous print) the map thinks its done already.&amp;nbsp;&amp;nbsp; I fixed the problem by setting the DisableClientCaching = true (overriding the map caching).&amp;nbsp;&amp;nbsp; At least I think that what was happening.&amp;nbsp;&amp;nbsp;&amp;nbsp; I still wish the progress event would fire with DisableClientCaching = false, as you really don't know that map is truely ready (to convert to bitmaps in my case) until the the progress event fires.&amp;nbsp;&amp;nbsp;&amp;nbsp; Maybe this is the wrong event to determine (its not the Load event I know that for sure) that the layers are all in a ready state.&amp;nbsp;&amp;nbsp; This is the only event I could find.&amp;nbsp;&amp;nbsp; I don't think there is one yet (&lt;/SPAN&gt;&lt;STRONG&gt;ESRI please give me one in 2.3 or point me to one&lt;/STRONG&gt;&lt;SPAN&gt;).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2011 14:12:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/map-progress-event-not-firing/m-p/127254#M3188</guid>
      <dc:creator>GregoryDillon</dc:creator>
      <dc:date>2011-09-23T14:12:34Z</dc:date>
    </item>
  </channel>
</rss>

