<?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 Follow up: Feature service layer symbol/renderer change in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250936#M23244</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a follow up question to this link: &lt;A _jive_internal="true" href="https://community.esri.com/message/593549"&gt;https://community.esri.com/message/593549&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I select the symbol that I want to change by creating img elements and adding attributes such as index, id, etc. It's the onclick of that image that triggers the iteration through the layer's symbols to match the img.attribute['index'] with the iteration of the symbol loop. Then, I setUrl for that symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I couldn't find the proper way to look at a collection of symbols. I noticed that if a layer/service has 1 symbol in the renderer, there is a layer.renderer.symbol object. If there is a collection of symbols, layer.renderer.symbol is undefined but layer.renderer._symbols is an object. I iterate through _symbols with for (key in layer.renderer_symbols).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I check the layer.renderer._symbols[key].type for 'picturemarkersymbol' then check to see if the img element (that the user clicked) index attribute matches key (so that I am stopping the loop to setUrl on the correct symbol).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I sort of do the same thing if the type is simplemarkersymbol. The difference is that I can't setUrl of a simplemarkersymbol so I try to do layer.renderer._symbols[key].setSymbol(new PictureMarkerSymbol...). However, layer.renderer._symbols[key] does not support 'setSymbol'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried messing with the setRenderer but that affects all of the other symbols on the layer. This particular layer that I'm testing has several symbols of different types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the proper way to set the symbol of just one symbol in a collection of symbols?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better way to reference the collection of symbols in lieu of layer.renderer._symbols?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel like I'm also going to have the same issues when I try to change the simpleline and simplefill symbols? I will be changing their colors and thickness only though. I won't be changing the simpleline to a picture or anything too off the wall.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Mar 2016 13:45:37 GMT</pubDate>
    <dc:creator>TyroneBiggums</dc:creator>
    <dc:date>2016-03-08T13:45:37Z</dc:date>
    <item>
      <title>Follow up: Feature service layer symbol/renderer change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250936#M23244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As a follow up question to this link: &lt;A _jive_internal="true" href="https://community.esri.com/message/593549"&gt;https://community.esri.com/message/593549&lt;/A&gt;​&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I select the symbol that I want to change by creating img elements and adding attributes such as index, id, etc. It's the onclick of that image that triggers the iteration through the layer's symbols to match the img.attribute['index'] with the iteration of the symbol loop. Then, I setUrl for that symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I couldn't find the proper way to look at a collection of symbols. I noticed that if a layer/service has 1 symbol in the renderer, there is a layer.renderer.symbol object. If there is a collection of symbols, layer.renderer.symbol is undefined but layer.renderer._symbols is an object. I iterate through _symbols with for (key in layer.renderer_symbols).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I check the layer.renderer._symbols[key].type for 'picturemarkersymbol' then check to see if the img element (that the user clicked) index attribute matches key (so that I am stopping the loop to setUrl on the correct symbol).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I sort of do the same thing if the type is simplemarkersymbol. The difference is that I can't setUrl of a simplemarkersymbol so I try to do layer.renderer._symbols[key].setSymbol(new PictureMarkerSymbol...). However, layer.renderer._symbols[key] does not support 'setSymbol'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried messing with the setRenderer but that affects all of the other symbols on the layer. This particular layer that I'm testing has several symbols of different types.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the proper way to set the symbol of just one symbol in a collection of symbols?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a better way to reference the collection of symbols in lieu of layer.renderer._symbols?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I feel like I'm also going to have the same issues when I try to change the simpleline and simplefill symbols? I will be changing their colors and thickness only though. I won't be changing the simpleline to a picture or anything too off the wall.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 13:45:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250936#M23244</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2016-03-08T13:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Follow up: Feature service layer symbol/renderer change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250937#M23245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I sort of hacked layer.renderer._symbols[key].symbol = new PictureMarkerSymbol...&lt;/P&gt;&lt;P&gt;That works but there has to be a proper way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 15:40:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250937#M23245</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2016-03-08T15:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Follow up: Feature service layer symbol/renderer change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250938#M23246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What type of renderer are you working with? Have you tried to just use setSymbol on the &lt;STRONG&gt;graphic&lt;/STRONG&gt;​ and just ignore the renderer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 16:53:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250938#M23246</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-08T16:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Follow up: Feature service layer symbol/renderer change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250939#M23247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;UniqueValueRenderer and SimpleRenderer most of the time. It depends on the layer that comes in. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wasn't sure if I could mess with the graphic b/c that just contains the coordinates mostly, correct? layer.graphics[0].symbol is undefined when layer.renderer._symbols[0].symbol is the picturemarker or simplemarker symbol.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 17:31:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250939#M23247</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2016-03-08T17:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Follow up: Feature service layer symbol/renderer change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250940#M23248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;Yes the individual symbol on the graphic will be null when using a renderer but try setting it anyway.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 17:46:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250940#M23248</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-08T17:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: Follow up: Feature service layer symbol/renderer change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250941#M23249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried that for simplefill and simplelines and that works well. I'll have to try it for picturemarkers too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 18:34:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250941#M23249</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2016-03-08T18:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: Follow up: Feature service layer symbol/renderer change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250942#M23250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Changing the graphic doesn't actually work all of the time. One layer that I found has a set of polygons for each LOD of the map. When I use graphic.setSymbol, only one LOD is modified.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And sure, I could iterate through all of the LODs and all of the graphics, but there has to be an easier way, yea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2016 20:07:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250942#M23250</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2016-03-08T20:07:13Z</dc:date>
    </item>
    <item>
      <title>Re: Follow up: Feature service layer symbol/renderer change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250943#M23251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tyrone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sorry it took so long to get back with you. I am at the Dev Summit and I had the chance to ask about this with the JS API team, and the answer I got is that you will have to add a new value to the UniqueValueRenderer if that is the renderer you are using.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 23:27:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250943#M23251</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-10T23:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Follow up: Feature service layer symbol/renderer change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250944#M23252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice! I feel famous now. I will play with that tomorrow. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Mar 2016 23:39:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250944#M23252</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2016-03-10T23:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Follow up: Feature service layer symbol/renderer change</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250945#M23253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sadly due to time constraints, I can't play with this much longer. What I have is working... I just have to use the _symbols object. I get that the _object names are reserved/internal objects. But, if it aint broke...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2016 12:12:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/follow-up-feature-service-layer-symbol-renderer/m-p/250945#M23253</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2016-03-11T12:12:59Z</dc:date>
    </item>
  </channel>
</rss>

