<?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 clear map.graphics when infoWindow is closed in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clear-map-graphics-when-infowindow-is-closed/m-p/317331#M29234</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got an Identify Task that opens an infoWindow and highlights the clicked feature using a map graphic. I want to clear the graphic when the infoWindow is closed but can't get it to work. I tried using onHide() with no success:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;map.infowWindow.onHide(clearGraphics);

function clearGraphics() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (map.graphics) {map.graphics.clear()};
}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Mar 2011 12:57:41 GMT</pubDate>
    <dc:creator>RyanClancy</dc:creator>
    <dc:date>2011-03-31T12:57:41Z</dc:date>
    <item>
      <title>clear map.graphics when infoWindow is closed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clear-map-graphics-when-infowindow-is-closed/m-p/317331#M29234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got an Identify Task that opens an infoWindow and highlights the clicked feature using a map graphic. I want to clear the graphic when the infoWindow is closed but can't get it to work. I tried using onHide() with no success:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;map.infowWindow.onHide(clearGraphics);

function clearGraphics() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (map.graphics) {map.graphics.clear()};
}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 12:57:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clear-map-graphics-when-infowindow-is-closed/m-p/317331#M29234</guid>
      <dc:creator>RyanClancy</dc:creator>
      <dc:date>2011-03-31T12:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: clear map.graphics when infoWindow is closed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clear-map-graphics-when-infowindow-is-closed/m-p/317332#M29235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I've got an Identify Task that opens an infoWindow and highlights the clicked feature using a map graphic. I want to clear the graphic when the infoWindow is closed but can't get it to work. I tried using onHide() with no success:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;map.infowWindow.onHide(clearGraphics);

function clearGraphics() {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (map.graphics) {map.graphics.clear()};
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;try this instead of map.infowWindow.onHide(clearGraphics): dojo.connect(map.infoWindow, "onHide", clearGraphics);.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:05:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clear-map-graphics-when-infowindow-is-closed/m-p/317332#M29235</guid>
      <dc:creator>HemingZhu</dc:creator>
      <dc:date>2021-12-11T15:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: clear map.graphics when infoWindow is closed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clear-map-graphics-when-infowindow-is-closed/m-p/317333#M29236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Success! Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2011 13:30:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/clear-map-graphics-when-infowindow-is-closed/m-p/317333#M29236</guid>
      <dc:creator>RyanClancy</dc:creator>
      <dc:date>2011-03-31T13:30:33Z</dc:date>
    </item>
  </channel>
</rss>

