<?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: Layer visibility on/off whit onclick event in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761758#M70605</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;second map layer. if i change "false" to "true" (or "hide" to "show") by typing it in to code, i got what i expected, but i need to make button on map, that after onClick event gona change layer visibility on/off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var ortofotokarte = new Tiled("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1/MapServer" rel="nofollow" target="_blank"&gt;http://127.0.0.1/MapServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;map.addLayer(ortofotokarte);&lt;/P&gt;&lt;P&gt;ortofotokarte&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;.setVisibility(false);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;//ortofotokarte.hide();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jun 2015 06:22:26 GMT</pubDate>
    <dc:creator>RaimondsVerpejs</dc:creator>
    <dc:date>2015-06-02T06:22:26Z</dc:date>
    <item>
      <title>Layer visibility on/off whit onclick event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761755#M70602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How to turn visibility on/off using js onclick event:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layerName.setVisibility(false);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 08:29:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761755#M70602</guid>
      <dc:creator>RaimondsVerpejs</dc:creator>
      <dc:date>2015-06-01T08:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Layer visibility on/off whit onclick event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761756#M70603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you explain a bit more what you are looking for? Would one of these sample help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/map_explicitlayerlist.html" title="https://developers.arcgis.com/javascript/jssamples/map_explicitlayerlist.html"&gt;Toggle layer visibility | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/map_dynamiclayerlist.html" title="https://developers.arcgis.com/javascript/jssamples/map_dynamiclayerlist.html"&gt;Dynamically create layer list | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 14:17:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761756#M70603</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2015-06-01T14:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Layer visibility on/off whit onclick event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761757#M70604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;are you building a custom js method or are you using an open source method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 14:41:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761757#M70604</guid>
      <dc:creator>MikeCrook</dc:creator>
      <dc:date>2015-06-01T14:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Layer visibility on/off whit onclick event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761758#M70605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;second map layer. if i change "false" to "true" (or "hide" to "show") by typing it in to code, i got what i expected, but i need to make button on map, that after onClick event gona change layer visibility on/off.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var ortofotokarte = new Tiled("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://127.0.0.1/MapServer" rel="nofollow" target="_blank"&gt;http://127.0.0.1/MapServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;map.addLayer(ortofotokarte);&lt;/P&gt;&lt;P&gt;ortofotokarte&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;.setVisibility(false);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;//ortofotokarte.hide();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 06:22:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761758#M70605</guid>
      <dc:creator>RaimondsVerpejs</dc:creator>
      <dc:date>2015-06-02T06:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Layer visibility on/off whit onclick event</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761759#M70606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like a timing issue.&amp;nbsp; You are trying to set the visibility before the layer is loaded. Try setting the visiibility property or setting the visibility after the load event.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var ortofotokarte = new Tiled("&lt;A class="jive-link-external-small" href="http://127.0.0.1/MapServer" rel="nofollow" target="_blank"&gt;http://127.0.0.1/MapServer&lt;/A&gt;,{&lt;A href="https://developers.arcgis.com/javascript/jsapi/tiledmapservicelayer-amd.html#visible"&gt;visible&lt;/A&gt;:false});&lt;/P&gt;&lt;P&gt;map.addLayer(ortofotokarte);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var ortofotokarte = new Tiled("&lt;A class="jive-link-external-small" href="http://127.0.0.1/MapServer" rel="nofollow" target="_blank"&gt;http://127.0.0.1/MapServer&lt;/A&gt;");&lt;/P&gt;&lt;P&gt;ortofotokarte.on('load',function(){&lt;/P&gt;&lt;P&gt;&amp;nbsp; ortofotokarte&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;.setVisibility(false);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;map.addLayer(ortofotokarte);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jun 2015 15:12:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-visibility-on-off-whit-onclick-event/m-p/761759#M70606</guid>
      <dc:creator>BillDaigle</dc:creator>
      <dc:date>2015-06-02T15:12:44Z</dc:date>
    </item>
  </channel>
</rss>

