<?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: Inserting a checkbox to toggle MapImage display in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/inserting-a-checkbox-to-toggle-mapimage-display/m-p/652801#M60846</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try using setvisibility method on MapImageLayer to toggle the image visibility&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/mapimagelayer.html#setvisibility"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/mapimagelayer.html#setvisibility&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 May 2013 09:28:46 GMT</pubDate>
    <dc:creator>VinayBansal</dc:creator>
    <dc:date>2013-05-30T09:28:46Z</dc:date>
    <item>
      <title>Inserting a checkbox to toggle MapImage display</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/inserting-a-checkbox-to-toggle-mapimage-display/m-p/652800#M60845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been trying to insert a checkbox that, when checked, displays my MapImage on the basemap. I am using an if/else function to toggle the image display at the .MapImageLayer level. The two methods used are .addImage(MapImage) and .removeImage(MapImage). This does not seem to work and I am trying to understand why (I am new to javascript).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my code: &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;if(getElementById("chbx").checked=true)
{ 
init.map.mil.addImage(Tile);
}
else
{
init.map.mil.removeImage(Tile);
}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 09:04:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/inserting-a-checkbox-to-toggle-mapimage-display/m-p/652800#M60845</guid>
      <dc:creator>TheoMorrissey</dc:creator>
      <dc:date>2013-05-30T09:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting a checkbox to toggle MapImage display</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/inserting-a-checkbox-to-toggle-mapimage-display/m-p/652801#M60846</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try using setvisibility method on MapImageLayer to toggle the image visibility&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/mapimagelayer.html#setvisibility"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/mapimagelayer.html#setvisibility&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 May 2013 09:28:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/inserting-a-checkbox-to-toggle-mapimage-display/m-p/652801#M60846</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-05-30T09:28:46Z</dc:date>
    </item>
  </channel>
</rss>

