<?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: Onscreen button to toggle layers in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526848#M13763</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brain,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you are just looking for a widget template then just copy the&lt;/P&gt;&lt;P&gt;[install Dir]\client\stemapp\widgets\samplewidgets\CustomWidgetTemplate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2015 14:37:59 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2015-08-07T14:37:59Z</dc:date>
    <item>
      <title>Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526847#M13762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm looking to create an onscreen button that when clicked simply toggles certain layers on and off. I'm able to get the layer via the &lt;SPAN class="kwd" style="color: #333333; font-weight: bold;"&gt;var&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt; OutageLayer &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt; map&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;getLayer&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #dd1144;"&gt;"Outages"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;); and then set to show or hide, but what else needs to be in the widget.js?&amp;nbsp; Is there any other widgets that i could copy the guts out of to use? The idea is that during an storm our dispatch folks and click the "Storm Mode" button and the layers will be set to a predetermined visibility to avoid search through layers.&amp;nbsp; Any help is appreciated.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;Thanks,&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;Brian&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 14:12:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526847#M13762</guid>
      <dc:creator>BrianWilson3</dc:creator>
      <dc:date>2015-08-07T14:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526848#M13763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brain,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you are just looking for a widget template then just copy the&lt;/P&gt;&lt;P&gt;[install Dir]\client\stemapp\widgets\samplewidgets\CustomWidgetTemplate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 14:37:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526848#M13763</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-08-07T14:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526849#M13764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert, I'm familiar with flex and i can see similarities between the two but am still learning the new system.&amp;nbsp; Ill dig into the sample a little more and see if I can figure it out.&amp;nbsp; Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Aug 2015 15:21:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526849#M13764</guid>
      <dc:creator>BrianWilson3</dc:creator>
      <dc:date>2015-08-10T15:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526850#M13765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I seem to be making some progress thanks to &lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;​.&amp;nbsp; I have however run into a bit of a road block.&amp;nbsp; I am able to use the this.map.getLayer() method to grab layers by their ID but cannot figure out how to reference sublayers.&amp;nbsp; I have a number of sublayers in groups that i need to grab in order to turn them on/off on click.&amp;nbsp; Any help is appreciated!&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Aug 2015 19:38:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526850#M13765</guid>
      <dc:creator>BrianWilson3</dc:creator>
      <dc:date>2015-08-18T19:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526851#M13766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brain,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; An ArcGISDynamicMapServiceLayer does have sublayers but they are not actual layers that you can get from the map. You would just get the parent ArcGISDynamicMapServiceLayer and then set the ArcGISDynamicMapServiceLayer visibleLayers &lt;A href="https://developers.arcgis.com/javascript/jsapi/arcgisdynamicmapservicelayer-amd.html#visiblelayers"&gt;property&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 11:57:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526851#M13766</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-08-19T11:57:23Z</dc:date>
    </item>
    <item>
      <title>Re: Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526852#M13767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did the trick!  I'm noticing now that when I change layer visibility&lt;/P&gt;&lt;P&gt;it doesn't update the layerlist, is there a way for force a layerlist&lt;/P&gt;&lt;P&gt;refresh?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 14:15:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526852#M13767</guid>
      <dc:creator>BrianWilson3</dc:creator>
      <dc:date>2015-08-19T14:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526853#M13768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Brain,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Unfortunately the Layer List Widget is not listening for programmatic changes to layer visibility.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to mark this thread as answered&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Aug 2015 14:34:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526853#M13768</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-08-19T14:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526854#M13769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you able to provide the code you are using on a custom button to toggle layer visibility? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2016 17:13:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526854#M13769</guid>
      <dc:creator>MichaelRobb</dc:creator>
      <dc:date>2016-04-05T17:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526855#M13770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to get the button to toggle visibility but was never able to get&lt;/P&gt;&lt;P&gt;it to check or unchecked the layer list to show the current visibility.&lt;/P&gt;&lt;P&gt;I'll see if I can package it up and send it to you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 15:57:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526855#M13770</guid>
      <dc:creator>BrianWilson3</dc:creator>
      <dc:date>2016-04-08T15:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526856#M13771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I manage to get the current visibility refresh going Ill let you know...(cross fingers for newer releases) If Robert says not possible, then... shrug&lt;/P&gt;&lt;P&gt;Greatly appreciated! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2016 22:46:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526856#M13771</guid>
      <dc:creator>MichaelRobb</dc:creator>
      <dc:date>2016-04-08T22:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: Onscreen button to toggle layers</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526857#M13772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;Anything you can provide would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Apr 2016 16:07:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/onscreen-button-to-toggle-layers/m-p/526857#M13772</guid>
      <dc:creator>MichaelRobb</dc:creator>
      <dc:date>2016-04-19T16:07:07Z</dc:date>
    </item>
  </channel>
</rss>

