<?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: Updating symbol attributes in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688798#M64122</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a jsbin link : &lt;A href="https://jsbin.com/gusekopuxa/edit?html,css,output" title="https://jsbin.com/gusekopuxa/edit?html,css,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) click &lt;STRONG&gt;Add points &lt;/STRONG&gt;&lt;EM&gt;- this creates a graphics layer with 1000 points and adds it to the map&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;2) click&amp;nbsp; &lt;STRONG&gt;Zoom to data &lt;/STRONG&gt;&lt;EM&gt;- thsi zoosm to a area where teh data is&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;3) click &lt;STRONG&gt;Highlight&lt;/STRONG&gt; - &lt;EM&gt;This iterates through all the graphics items and changes their symbol. Note that in the sceneview symbols don't change&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;4) click&lt;STRONG&gt; 2d/3d&lt;/STRONG&gt; - &lt;EM&gt;This switches to a mapview . &lt;/EM&gt;&lt;EM&gt;Note that same map with same graphics layer shows new symbols when viewed in mapView&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Mar 2016 15:50:59 GMT</pubDate>
    <dc:creator>ClayHarter</dc:creator>
    <dc:date>2016-03-19T15:50:59Z</dc:date>
    <item>
      <title>Updating symbol attributes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688793#M64117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to dynamically update the attributes of&amp;nbsp; symbols of&amp;nbsp; existing graphics object. I can iterate over my existing graphics objects and update the&amp;nbsp; symbol attributes but my MapView does not display the updated&amp;nbsp; objects.&amp;nbsp; I even tried clearing the graphics layer and adding the updated graphics objects.&amp;nbsp; Is there any way to force a redraw?&amp;nbsp; My test code looks like&amp;nbsp; this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;function &lt;/SPAN&gt;&lt;SPAN style="font-style: italic;"&gt;highlightTest&lt;/SPAN&gt;(){
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;var &lt;/SPAN&gt;&lt;SPAN style="color: #458383;"&gt;highlightSymbol &lt;/SPAN&gt;= &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleMarkerSymbol({
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;color&lt;/SPAN&gt;: [&lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;255&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;],
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;outline&lt;/SPAN&gt;: &lt;SPAN style="color: #000080; font-weight: bold;"&gt;new &lt;/SPAN&gt;SimpleLineSymbol({
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;color&lt;/SPAN&gt;: [&lt;SPAN style="color: #0000ff;"&gt;0&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;255&lt;/SPAN&gt;, &lt;SPAN style="color: #0000ff;"&gt;255&lt;/SPAN&gt;],
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;width&lt;/SPAN&gt;: &lt;SPAN style="color: #0000ff;"&gt;2
&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;})
&amp;nbsp; });
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;var &lt;/SPAN&gt;&lt;SPAN style="color: #458383;"&gt;existingGraphics&lt;/SPAN&gt;= &lt;SPAN style="color: #458383;"&gt;pointLayer&lt;/SPAN&gt;.graphics.clone();
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #458383;"&gt;pointLayer&lt;/SPAN&gt;.&lt;SPAN style="color: #7a7a43;"&gt;clear&lt;/SPAN&gt;();
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #458383;"&gt;existingGraphics&lt;/SPAN&gt;.&lt;SPAN style="color: #7a7a43;"&gt;forEach&lt;/SPAN&gt;(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;function&lt;/SPAN&gt;(item, i){
&amp;nbsp; item.&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;symbol&lt;/SPAN&gt;=&lt;SPAN style="color: #458383;"&gt;highlightSymbol&lt;/SPAN&gt;;
&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #458383;"&gt;pointLayer&lt;/SPAN&gt;.&lt;SPAN style="color: #7a7a43;"&gt;add&lt;/SPAN&gt;(item);
&amp;nbsp; });
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suspect I am missing something....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:59:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688793#M64117</guid>
      <dc:creator>ClayHarter</dc:creator>
      <dc:date>2021-12-12T04:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: Updating symbol attributes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688794#M64118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Have you looked at the redraw method on the GraphicsLayer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/graphicslayer-amd.html#redraw" title="https://developers.arcgis.com/javascript/jsapi/graphicslayer-amd.html#redraw"&gt;GraphicsLayer | API Reference | ArcGIS API for JavaScript | redraw&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 21:45:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688794#M64118</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-11T21:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Updating symbol attributes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688795#M64119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using v4.0 beta and there is no such method (I was looking for it!) .&amp;nbsp; In v4 I believe that when properties change they send change events to registered listeners and I expected (or hoped...) that the change would bubble&amp;nbsp; up to the GraphicsLayer (or LayerView? ) and it would refresh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interestingly I just discovered that if I zoom it forces a re rendering of the graphics and the new symbol attributes are used (but a map resize does not cause this)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 21:56:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688795#M64119</guid>
      <dc:creator>ClayHarter</dc:creator>
      <dc:date>2016-03-11T21:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Updating symbol attributes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688796#M64120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sorry I did not see any tags specifying that you were asking about 4.0. The 4.0 Beta 3 is still lacking and this is likely one of those.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 22:03:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688796#M64120</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-11T22:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Updating symbol attributes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688797#M64121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you post a link or jsbin to a sample app? It will be faster to look at if I see it in context.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Mar 2016 00:02:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688797#M64121</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2016-03-19T00:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Updating symbol attributes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688798#M64122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is a jsbin link : &lt;A href="https://jsbin.com/gusekopuxa/edit?html,css,output" title="https://jsbin.com/gusekopuxa/edit?html,css,output"&gt;JS Bin - Collaborative JavaScript Debugging&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) click &lt;STRONG&gt;Add points &lt;/STRONG&gt;&lt;EM&gt;- this creates a graphics layer with 1000 points and adds it to the map&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;2) click&amp;nbsp; &lt;STRONG&gt;Zoom to data &lt;/STRONG&gt;&lt;EM&gt;- thsi zoosm to a area where teh data is&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;3) click &lt;STRONG&gt;Highlight&lt;/STRONG&gt; - &lt;EM&gt;This iterates through all the graphics items and changes their symbol. Note that in the sceneview symbols don't change&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;4) click&lt;STRONG&gt; 2d/3d&lt;/STRONG&gt; - &lt;EM&gt;This switches to a mapview . &lt;/EM&gt;&lt;EM&gt;Note that same map with same graphics layer shows new symbols when viewed in mapView&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Mar 2016 15:50:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688798#M64122</guid>
      <dc:creator>ClayHarter</dc:creator>
      <dc:date>2016-03-19T15:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Updating symbol attributes</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688799#M64123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Clay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think there's a few things going on here. The clone() method wasn't implemented on all classes in beta3, so calling graphic.clone() returns an error. That's one issue. Another (as Robert already alluded to) is the redraw functionality isn't really there in beta3. It will be implemented for 4.0 final though.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 16:54:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-symbol-attributes/m-p/688799#M64123</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2016-03-21T16:54:00Z</dc:date>
    </item>
  </channel>
</rss>

