<?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 How do you fix checkboxes for layers in an ArcGISTiledMapServiceLayer?  in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-fix-checkboxes-for-layers-in-an/m-p/346255#M31967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So we have an&amp;nbsp;ArcGISTiledMapServiceLayer with different featureLayers that we want to showcase with checkboxes.&lt;/P&gt;&lt;P&gt;Currently the solution looks as follow:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Toggle.js&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;$(document).ready(function(){&lt;BR /&gt; $("#c1").click(function(){&lt;BR /&gt; $("#graphicsLayer1_layer").fadeToggle();&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Body.php&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="filter-checkbox custom-checkbox"&amp;gt;&lt;BR /&gt; &amp;lt;input type="checkbox" value="1" id="c1" name="chk_1" checked /&amp;gt;&lt;BR /&gt; &amp;lt;label for="c1"&amp;gt;&amp;lt;/label&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is when we toggle a checkbox, and zoom out in the map for an example it resets.&lt;/P&gt;&lt;P&gt;How do you prevent this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Mar 2017 14:46:57 GMT</pubDate>
    <dc:creator>VictorKniif</dc:creator>
    <dc:date>2017-03-14T14:46:57Z</dc:date>
    <item>
      <title>How do you fix checkboxes for layers in an ArcGISTiledMapServiceLayer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-fix-checkboxes-for-layers-in-an/m-p/346255#M31967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So we have an&amp;nbsp;ArcGISTiledMapServiceLayer with different featureLayers that we want to showcase with checkboxes.&lt;/P&gt;&lt;P&gt;Currently the solution looks as follow:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Toggle.js&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;$(document).ready(function(){&lt;BR /&gt; $("#c1").click(function(){&lt;BR /&gt; $("#graphicsLayer1_layer").fadeToggle();&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Body.php&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="filter-checkbox custom-checkbox"&amp;gt;&lt;BR /&gt; &amp;lt;input type="checkbox" value="1" id="c1" name="chk_1" checked /&amp;gt;&lt;BR /&gt; &amp;lt;label for="c1"&amp;gt;&amp;lt;/label&amp;gt;&lt;BR /&gt; &amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is when we toggle a checkbox, and zoom out in the map for an example it resets.&lt;/P&gt;&lt;P&gt;How do you prevent this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:46:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-fix-checkboxes-for-layers-in-an/m-p/346255#M31967</guid>
      <dc:creator>VictorKniif</dc:creator>
      <dc:date>2017-03-14T14:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do you fix checkboxes for layers in an ArcGISTiledMapServiceLayer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-fix-checkboxes-for-layers-in-an/m-p/346256#M31968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Victor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; What does this fadeToggle function look like?&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The problem is when we toggle a checkbox, and zoom out in the map for an example it resets.&lt;/BLOCKQUOTE&gt;&lt;P&gt;What resets the layers visibility or the checkbox state?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-fix-checkboxes-for-layers-in-an/m-p/346256#M31968</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-03-14T14:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do you fix checkboxes for layers in an ArcGISTiledMapServiceLayer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-fix-checkboxes-for-layers-in-an/m-p/346257#M31969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;FadeToggle is built in jquery&lt;/P&gt;&lt;P&gt;The layer is reloading when the map is zoomed. The checkbox state is still the same. It is just an onclick function on the checkbox.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This provides us with the bugg where you uncheck the checkbox and the layer is gone but when you zoom the map it shows again.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 15:14:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-fix-checkboxes-for-layers-in-an/m-p/346257#M31969</guid>
      <dc:creator>VictorKniif</dc:creator>
      <dc:date>2017-03-14T15:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do you fix checkboxes for layers in an ArcGISTiledMapServiceLayer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-fix-checkboxes-for-layers-in-an/m-p/346258#M31970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Victor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;OK, I see your issue then. You are using jQuery to fade the graphics layer dom object directly and not using the JS API to change the visible state of the GL. You need to set the GraphicsLayer Objects visible property to false so that the object know not to draw on map changes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 15:43:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-you-fix-checkboxes-for-layers-in-an/m-p/346258#M31970</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-03-14T15:43:10Z</dc:date>
    </item>
  </channel>
</rss>

