<?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: Turn on layer when querywidget is opened. in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/turn-on-layer-when-querywidget-is-opened/m-p/339491#M9772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thomas,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Sure that would be as simple as adding a line to the widgetOpenedHandler function in the QueryWidget.mxml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;map.getLayer("yourlayerlabelintheconfig").visible = true;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't forget to &lt;/SPAN&gt;&lt;STRONG&gt;click the Mark as answer check&lt;/STRONG&gt;&lt;SPAN&gt; on this post and to &lt;/SPAN&gt;&lt;STRONG&gt;click the top arrow (promote)&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Follow the steps&lt;/STRONG&gt;&lt;SPAN&gt; as shown in the below graphic:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://gis.calhouncounty.org/FlexViewer2.5/Answer.jpg"&gt;&lt;IMG src="http://gis.calhouncounty.org/FlexViewer2.5/Answer.jpg" /&gt;&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Aug 2012 20:42:38 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2012-08-09T20:42:38Z</dc:date>
    <item>
      <title>Turn on layer when querywidget is opened.</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/turn-on-layer-when-querywidget-is-opened/m-p/339490#M9771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I know this is a simple question, but I can't seem to find the right answer. All I want to do is make the layer I'm running the QueryWidget against visible when the widget is opened. I'm querying a shaded polygon feature using the QueryWidget. It works fine, but it would be more user friendly if it would also turn on that layer as soon as the user clicked the QueryWidget. Any help would be appreciated. Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 20:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/turn-on-layer-when-querywidget-is-opened/m-p/339490#M9771</guid>
      <dc:creator>ThomasDyer</dc:creator>
      <dc:date>2012-08-09T20:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Turn on layer when querywidget is opened.</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/turn-on-layer-when-querywidget-is-opened/m-p/339491#M9772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thomas,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Sure that would be as simple as adding a line to the widgetOpenedHandler function in the QueryWidget.mxml&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;map.getLayer("yourlayerlabelintheconfig").visible = true;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't forget to &lt;/SPAN&gt;&lt;STRONG&gt;click the Mark as answer check&lt;/STRONG&gt;&lt;SPAN&gt; on this post and to &lt;/SPAN&gt;&lt;STRONG&gt;click the top arrow (promote)&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Follow the steps&lt;/STRONG&gt;&lt;SPAN&gt; as shown in the below graphic:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://gis.calhouncounty.org/FlexViewer2.5/Answer.jpg"&gt;&lt;IMG src="http://gis.calhouncounty.org/FlexViewer2.5/Answer.jpg" /&gt;&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Aug 2012 20:42:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/turn-on-layer-when-querywidget-is-opened/m-p/339491#M9772</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2012-08-09T20:42:38Z</dc:date>
    </item>
  </channel>
</rss>

