<?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: Event when content of a layer is fully loaded in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68607#M202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sven,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; To save current map view as an image&amp;nbsp; I use &lt;EM&gt;exportMapImage &lt;/EM&gt;method on JMap. Also, I add &lt;EM&gt;addMapEventListener &lt;/EM&gt;to JMap and wait for &lt;EM&gt;mapReady &lt;/EM&gt;event. This is pretty much my workflow. &lt;/P&gt;&lt;P&gt;Hope, you find it useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Feb 2016 06:09:55 GMT</pubDate>
    <dc:creator>nita14</dc:creator>
    <dc:date>2016-02-08T06:09:55Z</dc:date>
    <item>
      <title>Event when content of a layer is fully loaded</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68606#M201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new to the development of ArcGIS for JAVA. Currently, I've got an application which creates a map and loads 3 layers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. ArcGISTiledMapServiceLayer (World_Imagery)&lt;/P&gt;&lt;P&gt;2. ArcGISTiledMapServiceLayer (World_Transportation)&lt;/P&gt;&lt;P&gt;3. Some GPS-Points as Polylines (from a JSON-file)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When all the map content is fully loaded, I want to save the map as an image. At the moment this is done by writing a bufferedImage. Because in future the application should run automatically in backgorund, without showing the JFrame, I need some sort of event, signalizing when all content is loaded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any chance to get the correct moment, when all the work is done? Is there a more elegant way to save the map as an image?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Feb 2016 07:26:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68606#M201</guid>
      <dc:creator>SvenPaulsen</dc:creator>
      <dc:date>2016-02-05T07:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Event when content of a layer is fully loaded</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68607#M202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sven,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; To save current map view as an image&amp;nbsp; I use &lt;EM&gt;exportMapImage &lt;/EM&gt;method on JMap. Also, I add &lt;EM&gt;addMapEventListener &lt;/EM&gt;to JMap and wait for &lt;EM&gt;mapReady &lt;/EM&gt;event. This is pretty much my workflow. &lt;/P&gt;&lt;P&gt;Hope, you find it useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Feb 2016 06:09:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68607#M202</guid>
      <dc:creator>nita14</dc:creator>
      <dc:date>2016-02-08T06:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Event when content of a layer is fully loaded</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68608#M203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your answer.&lt;/P&gt;&lt;P&gt;I tried your workflow, but unfortunately it seems that &lt;EM&gt;mapReady &lt;/EM&gt;is fired before all the map content, i.e. the image tiles, is fully loaded. So, after calling the &lt;EM&gt;exportMapImage &lt;/EM&gt;method the saved image only shows the GPS-points.&lt;/P&gt;&lt;P&gt;Do you know about any other event which is fired after the loading process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Sven&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 07:27:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68608#M203</guid>
      <dc:creator>SvenPaulsen</dc:creator>
      <dc:date>2016-02-09T07:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: Event when content of a layer is fully loaded</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68609#M204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sven,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; the only thing that comes to my mind is to add &lt;EM&gt;addLayerInitializeCompleteListener &lt;/EM&gt;to all layers in your map. See the ArcGIS Runtime Samples - Layer Tree for sample usage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Feb 2016 08:21:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68609#M204</guid>
      <dc:creator>nita14</dc:creator>
      <dc:date>2016-02-09T08:21:15Z</dc:date>
    </item>
    <item>
      <title>Re: Event when content of a layer is fully loaded</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68610#M205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for all people encountering the same problem, there is an event &lt;STRONG&gt;ProgressEvent&lt;/STRONG&gt; "which is fired by the map and indicates the draw progress of the Map's layer collection"&lt;/P&gt;&lt;P&gt;Therefore, saving the map as an image is possible, when the progress has reached 100 %:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;jMap.addProgressEventListener(new ProgressEventListener() 
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void progress(ProgressEvent event) 
&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; System.out.println(event.getProgress());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(event.getProgress() == 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; SaveMap((JComponent) appWindow.getComponent(0));
&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;P&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/459537"&gt;@Adam&lt;/a&gt;: thanks for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:37:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/event-when-content-of-a-layer-is-fully-loaded/m-p/68610#M205</guid>
      <dc:creator>SvenPaulsen</dc:creator>
      <dc:date>2021-12-10T22:37:45Z</dc:date>
    </item>
  </channel>
</rss>

