<?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: Enable Pop-up in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/enable-pop-up/m-p/812829#M6619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I am using same concept as the local layer widget to load the layer. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 May 2015 13:09:09 GMT</pubDate>
    <dc:creator>RickeyFight</dc:creator>
    <dc:date>2015-05-29T13:09:09Z</dc:date>
    <item>
      <title>Enable Pop-up</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/enable-pop-up/m-p/812827#M6617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am adding a layer when a widget loads. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to have popups enabled when it loads. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot find the script to enable popup on load.&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/104498_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is an easy option. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 21:45:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/enable-pop-up/m-p/812827#M6617</guid>
      <dc:creator>RickeyFight</dc:creator>
      <dc:date>2015-05-28T21:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Pop-up</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/enable-pop-up/m-p/812828#M6618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;​typically you configure and enable pop ups through AGOL web map. I am assuming you are adding this layer after the map is loaded?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Stan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 22:30:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/enable-pop-up/m-p/812828#M6618</guid>
      <dc:creator>StanMcShinsky</dc:creator>
      <dc:date>2015-05-28T22:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Pop-up</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/enable-pop-up/m-p/812829#M6619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I am using same concept as the local layer widget to load the layer. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 May 2015 13:09:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/enable-pop-up/m-p/812829#M6619</guid>
      <dc:creator>RickeyFight</dc:creator>
      <dc:date>2015-05-29T13:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Pop-up</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/enable-pop-up/m-p/812830#M6620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rickey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // require('jimu/LayerInfos/LayerInfos')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // testCode funciton is in Windget's context;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; testCode: function() {&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var url = "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver6.arcgisonline.com/arcgis/rest" rel="nofollow" target="_blank"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest&lt;/A&gt;&lt;SPAN&gt;" +&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; "/services/CommercialDamageAssessment/FeatureServer/0";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var featureLayer = new FeatureLayer(url);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.map.addLayer(featureLayer);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayer.on('load', lang.hitch(this, function() {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LayerInfos.getInstance(this.map, this.map.itemInfo).then(lang.hitch(this, function(layerInfos) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var featureLayerInfo = layerInfos.getLayerInfoById(featureLayer.id);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featureLayerInfo.loadInfoTemplate().then(lang.hitch(this, function() {&lt;/P&gt;&lt;P&gt;&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; featureLayerInfo.enablePopup();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LayerInfos is data structure of WAB that reflects the relationships of all operational layers of map. After add a layer to the map, you can get its 'LayerInfo' using layerId by layerInfos.getLayerInfoById(), and then using layerInfo to control popup(loadInfoTempalte and enable popup).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 14:34:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/enable-pop-up/m-p/812830#M6620</guid>
      <dc:creator>XiaodongWang</dc:creator>
      <dc:date>2015-06-01T14:34:24Z</dc:date>
    </item>
  </channel>
</rss>

