<?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 Read from config file in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821534#M7446</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to modify the script below to capture only a specific layer from the config file, let's the first one (index:0).&lt;/P&gt;&lt;P&gt;So instead of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.layerListView = new LayerListView({&lt;BR /&gt; layers: this.config.layers&lt;BR /&gt; }).placeAt(this.layerListBody);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use&lt;/P&gt;&lt;P&gt;this.layerListView = new LayerListView({&lt;BR /&gt; layers: this.config.layers[0]&lt;BR /&gt; }).placeAt(this.layerListBody);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the "layers" does not store anything.&lt;/P&gt;&lt;P&gt;The first one will store all layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Feb 2017 16:46:51 GMT</pubDate>
    <dc:creator>LefterisKoumis</dc:creator>
    <dc:date>2017-02-15T16:46:51Z</dc:date>
    <item>
      <title>Read from config file</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821534#M7446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to modify the script below to capture only a specific layer from the config file, let's the first one (index:0).&lt;/P&gt;&lt;P&gt;So instead of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this.layerListView = new LayerListView({&lt;BR /&gt; layers: this.config.layers&lt;BR /&gt; }).placeAt(this.layerListBody);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use&lt;/P&gt;&lt;P&gt;this.layerListView = new LayerListView({&lt;BR /&gt; layers: this.config.layers[0]&lt;BR /&gt; }).placeAt(this.layerListBody);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the "layers" does not store anything.&lt;/P&gt;&lt;P&gt;The first one will store all layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 16:46:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821534#M7446</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2017-02-15T16:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Read from config file</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821535#M7447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lefteris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;What version of WAB LayerList widget are you working with? The&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;LayerListView contructor does not have a layers property.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 17:02:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821535#M7447</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-02-15T17:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Read from config file</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821536#M7448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using v. 2.3.&lt;/P&gt;&lt;P&gt;I am trying to modify the &lt;A href="https://community.esri.com/docs/DOC-7629"&gt;AddLayer Widget&lt;/A&gt;&amp;nbsp; widget so it includes only layers that meet certain criteria.&lt;/P&gt;&lt;P&gt;like below. If you use&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;layers: this.config.layer it works but it captures all layers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;array.forEach(this.config.layers, function (layer) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;layer.isSelected = false;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if (layer.name === "climate"){&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.layerListView = new LayerListView({&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;layers: this.config.layer[0]&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}).placeAt(this.layerListBody);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/P&gt;&lt;P&gt;}, this);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 17:15:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821536#M7448</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2017-02-15T17:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Read from config file</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821537#M7449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah. The AddLayer Widget that is helpful information. The LayerListView in that widget is expecting an array for the layers property, not just a single layer. you you need to create a new array with just the layer you want inside it then.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 17:47:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821537#M7449</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-02-15T17:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Read from config file</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821538#M7450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Feb 2017 18:11:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/read-from-config-file/m-p/821538#M7450</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2017-02-15T18:11:21Z</dc:date>
    </item>
  </channel>
</rss>

