<?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: Make layer visible after LayerList widget has opened in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846588#M10485</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I just realized it's your widget, the eSearch widget, that I'm communicating to the LayerList widget with. In your code ---&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 myObject = this.getUrlParams();&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; if (myObject.esearch) {&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;&amp;nbsp;&amp;nbsp; this._queryFromURL(myObject.esearch, myObject.slayer, myObject.exprnum);&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;&amp;nbsp;&amp;nbsp; this.publishData({&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message: myObject.slayer&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;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;---communicates to the LayerList.js ---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onReceiveData: function (name, widgetId, data, historyData) {&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;&amp;nbsp; dijit.byId("jimu_dijit_CheckBox_7").setValue(true);&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;I check a Subdivisions layer checkbox. And also need to make the Subdivisions layer visible, since it is not visible by default. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Jul 2015 15:15:34 GMT</pubDate>
    <dc:creator>RyanStrain</dc:creator>
    <dc:date>2015-07-10T15:15:34Z</dc:date>
    <item>
      <title>Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846584#M10481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a subLayer, "Parcels_9562_6",&amp;nbsp; within a group layer that I need to programmatically make visible, after the LayerList has already opened.&amp;nbsp; Another widget communicates with the LayerList widget during user interaction. I've had no success while fiddling around with the LayerList widget's, Widget.js and LayerListView.js files. Does someone know how this can be accomplished? Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 21:52:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846584#M10481</guid>
      <dc:creator>RyanStrain</dc:creator>
      <dc:date>2015-07-09T21:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846585#M10482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So are you saying that you have already figured out the part of how to make the sublayer visible in the map and that the LayerList widget is just not updating?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 22:28:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846585#M10482</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-09T22:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846586#M10483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No I haven't figured out how to make the sublayer visible in the map yet. It should be easy right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 22:31:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846586#M10483</guid>
      <dc:creator>RyanStrain</dc:creator>
      <dc:date>2015-07-09T22:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846587#M10484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So what do you have so far?&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Another widget communicates with the LayerList widget during user interaction&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You can control sub layer visibility using the ImageParameters class in the JS API:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/imageparameters-amd.html" title="https://developers.arcgis.com/javascript/jsapi/imageparameters-amd.html"&gt;ImageParameters | API Reference | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2015 22:58:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846587#M10484</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-09T22:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846588#M10485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry I just realized it's your widget, the eSearch widget, that I'm communicating to the LayerList widget with. In your code ---&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 myObject = this.getUrlParams();&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; if (myObject.esearch) {&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;&amp;nbsp;&amp;nbsp; this._queryFromURL(myObject.esearch, myObject.slayer, myObject.exprnum);&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;&amp;nbsp;&amp;nbsp; this.publishData({&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message: myObject.slayer&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;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;---communicates to the LayerList.js ---&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onReceiveData: function (name, widgetId, data, historyData) {&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;&amp;nbsp; dijit.byId("jimu_dijit_CheckBox_7").setValue(true);&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;I check a Subdivisions layer checkbox. And also need to make the Subdivisions layer visible, since it is not visible by default. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 15:15:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846588#M10485</guid>
      <dc:creator>RyanStrain</dc:creator>
      <dc:date>2015-07-10T15:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846589#M10486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Do you mean the LayerListView.js is where you have your onReceiveData function?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 15:24:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846589#M10486</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-07-10T15:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846590#M10487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I currently have it in LayerList's Widget.js. If it needs to be in the LayerListView.js. I think I could place it there. I'm just struggling to figure out how to make it work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 15:28:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846590#M10487</guid>
      <dc:creator>RyanStrain</dc:creator>
      <dc:date>2015-07-10T15:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846591#M10488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ryan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Well this took some work to figure out. Keep the onRecieveData function in the widget.js and here is what it will look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//RJS Add
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; onReceiveData: function (name, widgetId, data, historyData) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //this makes sure that it is your event that you are reacting to and not another
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(name === 'eSearch' &amp;amp;&amp;amp; data.hasOwnProperty('message')){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //my layer is called Parcel Data so Parcel Data_0 is the first layer or group
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //these next lines cause the map to set that layer as not visible
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.operLayerInfos.getLayerInfoById('Parcel Data_0').setTopLayerVisible(false);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.operLayerInfos.getLayerInfoById('Parcel Data_83').setTopLayerVisible(false);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //this causes the layer list widget to redraw and show that the layers are turned off
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._clearLayers();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.showLayers();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },
//RJS End Add&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:23:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846591#M10488</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T10:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846592#M10489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Beauty! Thanks for your work. I owe you a beer next time you're in Boise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jul 2015 19:27:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846592#M10489</guid>
      <dc:creator>RyanStrain</dc:creator>
      <dc:date>2015-07-10T19:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846593#M10490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is exactly what I need, now just to get it to work. I need to fire this off from when the Edit widget launches. What do I need to add in the Widget.js of the edit widget to get it to work. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2017 05:15:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846593#M10490</guid>
      <dc:creator>AlistairFox</dc:creator>
      <dc:date>2017-06-30T05:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Make layer visible after LayerList widget has opened</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846594#M10491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Allistair,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;In the edit widget you add this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.publishData({&lt;BR /&gt;&amp;nbsp; message:&amp;nbsp;Some var you want to send&lt;BR /&gt;});&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jul 2017 13:39:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/make-layer-visible-after-layerlist-widget-has/m-p/846594#M10491</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-07-05T13:39:25Z</dc:date>
    </item>
  </channel>
</rss>

