<?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 I can add a graphic to a layer and then &amp;quot;blink&amp;quot; it using setInterval.  But I can not add a graphic to a layer and search for it later via icon button, click and &amp;quot;blink&amp;quot; it.  The graphic.visible does not seem to work in this, latter instance.  Any suggesti in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/i-can-add-a-graphic-to-a-layer-and-then-quot-blink/m-p/717710#M66658</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working with esri gis api for js 4.15 typescript in an Angular 9 application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;var graphic = new graphic({geometry: point, symbol:sign}):&lt;/P&gt;&lt;P&gt;var layer = new GraphicsLayer({id: 'mylayer'});&lt;/P&gt;&lt;P&gt;view.map.add(layer);&lt;/P&gt;&lt;P&gt;layer.when((layerdone)=&amp;gt;{&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;setInterval(()=&amp;gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; graphic.visible != graphic.visible;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }, 1000);&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layer.add(graphic);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this does not:&lt;/P&gt;&lt;P&gt;var glayer = view.map.layers.find((layer)=&amp;gt;{ layer.id === 'mylayer'});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var graphic = glayer.graphics.find():// lets say its found&lt;/P&gt;&lt;P&gt;var count = 0;&lt;/P&gt;&lt;P&gt;var pulser = setInterval(()=&amp;gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; graphic.visible != graphic.visible;&lt;/P&gt;&lt;P&gt;if((++count) &amp;gt;= 10){&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clearInterval(pulser);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pulser = undefined;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; graphic.visible = true;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}, 1000);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 May 2020 01:24:17 GMT</pubDate>
    <dc:creator>EugeneStaten</dc:creator>
    <dc:date>2020-05-15T01:24:17Z</dc:date>
    <item>
      <title>I can add a graphic to a layer and then "blink" it using setInterval.  But I can not add a graphic to a layer and search for it later via icon button, click and "blink" it.  The graphic.visible does not seem to work in this, latter instance.  Any suggesti</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/i-can-add-a-graphic-to-a-layer-and-then-quot-blink/m-p/717710#M66658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working with esri gis api for js 4.15 typescript in an Angular 9 application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;var graphic = new graphic({geometry: point, symbol:sign}):&lt;/P&gt;&lt;P&gt;var layer = new GraphicsLayer({id: 'mylayer'});&lt;/P&gt;&lt;P&gt;view.map.add(layer);&lt;/P&gt;&lt;P&gt;layer.when((layerdone)=&amp;gt;{&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;setInterval(()=&amp;gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; graphic.visible != graphic.visible;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }, 1000);&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layer.add(graphic);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this does not:&lt;/P&gt;&lt;P&gt;var glayer = view.map.layers.find((layer)=&amp;gt;{ layer.id === 'mylayer'});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var graphic = glayer.graphics.find():// lets say its found&lt;/P&gt;&lt;P&gt;var count = 0;&lt;/P&gt;&lt;P&gt;var pulser = setInterval(()=&amp;gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; graphic.visible != graphic.visible;&lt;/P&gt;&lt;P&gt;if((++count) &amp;gt;= 10){&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; clearInterval(pulser);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pulser = undefined;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; graphic.visible = true;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}, 1000);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 01:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/i-can-add-a-graphic-to-a-layer-and-then-quot-blink/m-p/717710#M66658</guid>
      <dc:creator>EugeneStaten</dc:creator>
      <dc:date>2020-05-15T01:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: I can add a graphic to a layer and then "blink" it using setInterval.  But I can not add a graphic to a layer and search for it later via icon button, click and "blink" it.  The graphic.visible does not seem to work in this, latter instance.  Any sugg</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/i-can-add-a-graphic-to-a-layer-and-then-quot-blink/m-p/717711#M66659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im using esri api for js 4.15.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 01:25:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/i-can-add-a-graphic-to-a-layer-and-then-quot-blink/m-p/717711#M66659</guid>
      <dc:creator>EugeneStaten</dc:creator>
      <dc:date>2020-05-15T01:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: I can add a graphic to a layer and then "blink" it using setInterval.  But I can not add a graphic to a layer and search for it later via icon button, click and "blink" it.  The graphic.visible does not seem to work in this, latter instance.  Any sugg</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/i-can-add-a-graphic-to-a-layer-and-then-quot-blink/m-p/717712#M66660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eugene,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;You had a couple of issue in your code. Notice in line 3 I return the&amp;nbsp;boolean value in the find function and again in line 4 I return the boolean value. Then in line 6 I changed the way you were setting the graphics visibility.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;        &lt;SPAN class="comment token"&gt;// click event for the button&lt;/SPAN&gt;
        flashButton&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;addEventListener&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"click"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; glayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;find&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'mylayer'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; graphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; glayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;graphics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;find&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gra&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; gra&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;type &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'polygon'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="token function"&gt;setInterval&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;visible &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;visible&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
          &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:43:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/i-can-add-a-graphic-to-a-layer-and-then-quot-blink/m-p/717712#M66660</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T06:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: I can add a graphic to a layer and then "blink" it using setInterval.  But I can not add a graphic to a layer and search for it later via icon button, click and "blink" it.  The graphic.visible does not seem to work in this, latter instance.  Any sugg</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/i-can-add-a-graphic-to-a-layer-and-then-quot-blink/m-p/717713#M66661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert,&lt;/P&gt;&lt;P&gt;This works!!!&amp;nbsp; &amp;nbsp;Thanks!!!&lt;/P&gt;&lt;P&gt;Change from != to = ! did the trick.&lt;BR /&gt;Cheers to community brain trust.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2020 13:18:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/i-can-add-a-graphic-to-a-layer-and-then-quot-blink/m-p/717713#M66661</guid>
      <dc:creator>EugeneStaten</dc:creator>
      <dc:date>2020-05-15T13:18:25Z</dc:date>
    </item>
  </channel>
</rss>

