<?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: Call dojo/on in Web App builder in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799816#M5058</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;Juan,&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp; You use map.getLayer( layerid ). This is not the layer name but the layers id.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 May 2018 19:48:19 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2018-05-31T19:48:19Z</dc:date>
    <item>
      <title>Call dojo/on in Web App builder</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799811#M5053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys, i set this code line in the mapManager.js in the WAB Application&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_show2DWebMap: function(appConfig) {&lt;BR /&gt; //should use appConfig instead of this.appConfig, because appConfig is new.&lt;BR /&gt; // if (appConfig.portalUrl) {&lt;BR /&gt; // var url = portalUrlUtils.getStandardPortalUrl(appConfig.portalUrl);&lt;BR /&gt; // agolUtils.arcgisUrl = url + "/sharing/content/items/";&lt;BR /&gt; // }&lt;BR /&gt; &lt;BR /&gt; on(this.map, "load", lang.hitch(this, function() { &lt;BR /&gt; //do something to addedLayers &lt;BR /&gt; }));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but i get this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/410264_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;The big problem is that i have declare dojo on the define function, i dont know what is the error, thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2018 20:29:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799811#M5053</guid>
      <dc:creator>Juan_ManuelAngel_Cuartas</dc:creator>
      <dc:date>2018-05-30T20:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: Call dojo/on in Web App builder</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799812#M5054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You need to be inside the mapDeferred.then portion of the _show2dWebMap and then the map is already loaded so no need to watch for load event.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2018 21:30:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799812#M5054</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-30T21:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Call dojo/on in Web App builder</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799813#M5055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert i use this line in the mapDeferreded and nothing happends,&amp;nbsp;&amp;nbsp;on(map,"load", function() { alert("Hello !!"); });&lt;/P&gt;&lt;P&gt;But when i try with the event&amp;nbsp;layer-add they trigger the same times that layer i have in my web map but i just want to trigger once.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 13:51:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799813#M5055</guid>
      <dc:creator>Juan_ManuelAngel_Cuartas</dc:creator>
      <dc:date>2018-05-31T13:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Call dojo/on in Web App builder</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799814#M5056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert other question, do you know how to get the name of a featureLayer in WAB to&amp;nbsp; use the propertie&amp;nbsp;lyrQuakes.setDefinitionExpression("MAGNITUDE &amp;gt;= 2.0"); when the user load the WAB ??&lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 14:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799814#M5056</guid>
      <dc:creator>Juan_ManuelAngel_Cuartas</dc:creator>
      <dc:date>2018-05-31T14:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Call dojo/on in Web App builder</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799815#M5057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;Juan,&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp; As I mentioned the ma is already loaded when you are in the mapDeferred so listening for load will not work. If you only want to listen for an event once the you use on.once instead of just on.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 19:46:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799815#M5057</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-31T19:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Call dojo/on in Web App builder</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799816#M5058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;Juan,&lt;/P&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp; You use map.getLayer( layerid ). This is not the layer name but the layers id.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2018 19:48:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/call-dojo-on-in-web-app-builder/m-p/799816#M5058</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-05-31T19:48:19Z</dc:date>
    </item>
  </channel>
</rss>

