<?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: How do i select a graphic and change the symbol color for that graphic? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-select-a-graphic-and-change-the-symbol/m-p/330848#M30584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am actually wanting to select it from a list.&amp;nbsp; On the right side of my screen i have a list of the items and will select one and i want it to highlight the associated graphic.&amp;nbsp; Ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Apr 2013 17:00:17 GMT</pubDate>
    <dc:creator>SethCrotchett</dc:creator>
    <dc:date>2013-04-25T17:00:17Z</dc:date>
    <item>
      <title>How do i select a graphic and change the symbol color for that graphic?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-select-a-graphic-and-change-the-symbol/m-p/330846#M30582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am wanting to select a graphic and when selected change the color of the symbol, how do i do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my code i use to add the graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var graphic = new esri.Graphic(geometry, symbol);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.map.graphics.add(graphic);&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 19:21:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-select-a-graphic-and-change-the-symbol/m-p/330846#M30582</guid>
      <dc:creator>SethCrotchett</dc:creator>
      <dc:date>2013-04-23T19:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do i select a graphic and change the symbol color for that graphic?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-select-a-graphic-and-change-the-symbol/m-p/330847#M30583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;select how?&amp;nbsp; onClick? onMouseOver?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;have you seen &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/query_hover.html" rel="nofollow noopener noreferrer" target="_blank"&gt;this sample&lt;/A&gt;&lt;SPAN&gt;?&amp;nbsp; it demonstrates how to define a new symbol and pass an existing graphic to display in the map (on top of the existing graphics layer created from QueryTask results)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var highlightSymbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 3), new dojo.Color([125,125,125,0.35]));
...
dojo.connect(countiesGraphicsLayer, "onMouseOver", function(evt) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.clear();&amp;nbsp; //use the maps graphics layer as the highlight layer
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //pass the event graphic geometry and second symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var highlightGraphic = new esri.Graphic(evt.graphic.geometry,highlightSymbol);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.graphics.add(highlightGraphic);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 15:40:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-select-a-graphic-and-change-the-symbol/m-p/330847#M30583</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2021-12-11T15:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: How do i select a graphic and change the symbol color for that graphic?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-select-a-graphic-and-change-the-symbol/m-p/330848#M30584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am actually wanting to select it from a list.&amp;nbsp; On the right side of my screen i have a list of the items and will select one and i want it to highlight the associated graphic.&amp;nbsp; Ideas?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 17:00:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-select-a-graphic-and-change-the-symbol/m-p/330848#M30584</guid>
      <dc:creator>SethCrotchett</dc:creator>
      <dc:date>2013-04-25T17:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do i select a graphic and change the symbol color for that graphic?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-select-a-graphic-and-change-the-symbol/m-p/330849#M30585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;well... selecting a graphic and selecting something associated with a graphic aren't exactly the same thing. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;do you have a simplified code sample pointing at public services you can share?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 17:02:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-do-i-select-a-graphic-and-change-the-symbol/m-p/330849#M30585</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2013-04-25T17:02:32Z</dc:date>
    </item>
  </channel>
</rss>

