<?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 Map.onLayersAddResult only fires if use Map.addLayers in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39819#M3408</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems that the Map's onLayersAddResult gets fired only if you've added layers to the map using addLayers. The function I've set for onLayersAddResult does not get called if I add layers one at a time with the addLayer method. If this is by design, the documentation for onLayersAddResult should say that it only works for layers added with addLayers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Mar 2011 20:49:43 GMT</pubDate>
    <dc:creator>BryanBaker</dc:creator>
    <dc:date>2011-03-21T20:49:43Z</dc:date>
    <item>
      <title>Map.onLayersAddResult only fires if use Map.addLayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39819#M3408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems that the Map's onLayersAddResult gets fired only if you've added layers to the map using addLayers. The function I've set for onLayersAddResult does not get called if I add layers one at a time with the addLayer method. If this is by design, the documentation for onLayersAddResult should say that it only works for layers added with addLayers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2011 20:49:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39819#M3408</guid>
      <dc:creator>BryanBaker</dc:creator>
      <dc:date>2011-03-21T20:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Map.onLayersAddResult only fires if use Map.addLayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39820#M3409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Indeed, glad I stumbled on your post!&amp;nbsp; I was struggling to figure out why the heck the onLayersAddResult event was not firing in my app.&amp;nbsp; This should definitely be documented better.&amp;nbsp; It is entirely unobviously that it would behave this way, and I would have been stuck on this much longer had I not seen this post.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2011 19:23:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39820#M3409</guid>
      <dc:creator>PaulAngelino</dc:creator>
      <dc:date>2011-03-25T19:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Map.onLayersAddResult only fires if use Map.addLayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39821#M3410</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would say that this is documented, but could probably be improved. If you look at the documentation for &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayers"&gt;map.addLayers()&lt;/A&gt;&lt;SPAN&gt;, it says:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The onLayerAddResult event fires for each layer that is added. Once all the layers are added to the map the onLayersAddResult fires.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the documentation for &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayer"&gt;map.addLayer()&lt;/A&gt;&lt;SPAN&gt; makes no mention of firing the onLayersAddResult.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2011 19:53:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39821#M3410</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2011-03-25T19:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Map.onLayersAddResult only fires if use Map.addLayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39822#M3411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I would say that this is documented, but could probably be improved. If you look at the documentation for &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayers"&gt;map.addLayers()&lt;/A&gt;, it says:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But the documentation for &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/map.htm#addLayer"&gt;map.addLayer()&lt;/A&gt; makes no mention of firing the onLayersAddResult.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, I used to write documentation at ESRI, and I would say that the mention of it in addLayers doesn't really qualify as helpful. The doc for onLayersAddResult simply says:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"Fires after all layers are added to the map. (As of v2.0)"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It doesn't say it only fires after you call one specific method and not any others, just that it fires after all layers are added. That two of us took the trouble to write about this suggests that the documentation should be clearer.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2011 20:51:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39822#M3411</guid>
      <dc:creator>BryanBaker</dc:creator>
      <dc:date>2011-03-25T20:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Map.onLayersAddResult only fires if use Map.addLayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39823#M3412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks everyone for pointing out this deficiency in the documentation. It definitely could be clearer and we'll get it updated soon.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Mar 2011 22:23:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39823#M3412</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2011-03-25T22:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Map.onLayersAddResult only fires if use Map.addLayers</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39824#M3413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please use the following syntax while adding the layer on the map. The method will definitely be fired.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayers([operational]);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2012 05:25:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/map-onlayersaddresult-only-fires-if-use-map/m-p/39824#M3413</guid>
      <dc:creator>MohmmadBhat</dc:creator>
      <dc:date>2012-12-19T05:25:04Z</dc:date>
    </item>
  </channel>
</rss>

