<?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: Custom Symbology Using Renderers and Feature Sets in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-symbology-using-renderers-and-feature-sets/m-p/339222#M31437</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're welcome!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Apr 2013 16:37:33 GMT</pubDate>
    <dc:creator>derekswingley1</dc:creator>
    <dc:date>2013-04-17T16:37:33Z</dc:date>
    <item>
      <title>Custom Symbology Using Renderers and Feature Sets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-symbology-using-renderers-and-feature-sets/m-p/339219#M31434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a working application here: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://dola.colorado.gov/gis-cms/sites/default/files/html/census2000v2.html" rel="nofollow" target="_blank"&gt;http://dola.colorado.gov/gis-cms/sites/default/files/html/census2000v2.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the Javascript API with ArcGIS Online. I have a bunch of layers loaded and pre-symbolized in an AGOL 'Web Map'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like to be able to customize the symbology of each layer dynamically using javascript. I'd ideally like to use a renderer and be able to create a different symbology for each demographic variable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've run into a major brick wall. To be able to change the symbology, I need to be able to iterate through graphics in a feature set - yet I have no idea where to get a feature set object from. All the examples I see use 'Feature Layers' loaded through URLs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone provide guidance or show me some good example code?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 16:29:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-symbology-using-renderers-and-feature-sets/m-p/339219#M31434</guid>
      <dc:creator>DanielTrone</dc:creator>
      <dc:date>2013-04-16T16:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Symbology Using Renderers and Feature Sets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-symbology-using-renderers-and-feature-sets/m-p/339220#M31435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A class="jive-link-external-small" href="http://developers.arcgis.com/en/javascript/jsapi/namespace_esri.arcgis.utils.html#createMap" rel="nofollow" target="_blank"&gt;createMap&lt;/A&gt;&lt;SPAN&gt; gives you access to the map once it's loaded. From there, you can get to layers via map.getLayer and map.layerIds and (in your case, since you want to work with feature layers), map.graphicsLayerIds.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;To be able to change the symbology, I need to be able to iterate through graphics in a feature set - yet I have no idea where to get a feature set object from. All the examples I see use 'Feature Layers' loaded through URLs.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rather than iterating through features and changing their symbology, use a renderer. Here's an simple example that uses the CO counties layer from your webmap, changes the symbology and then turns the layer on:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://jsfiddle.net/yUY34/" rel="nofollow" target="_blank"&gt;http://jsfiddle.net/yUY34/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The example uses a SimpleRenderer but you can use a ClassBreaks or UniqueValue renderer depending on how you want to symbolize your data. If you comment out line 55, which sets the renderer, you'll see that the original symbology is used. You can use this approach in your app:&amp;nbsp; create renderers and then use featureLayer.setRenderer to specify them for your various feature layers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 22:25:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-symbology-using-renderers-and-feature-sets/m-p/339220#M31435</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-04-16T22:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Symbology Using Renderers and Feature Sets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-symbology-using-renderers-and-feature-sets/m-p/339221#M31436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are a superhero!&amp;nbsp; This was just what I needed to solve my problem.&amp;nbsp; Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 16:23:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-symbology-using-renderers-and-feature-sets/m-p/339221#M31436</guid>
      <dc:creator>DanielTrone</dc:creator>
      <dc:date>2013-04-17T16:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Symbology Using Renderers and Feature Sets</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-symbology-using-renderers-and-feature-sets/m-p/339222#M31437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're welcome!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 16:37:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-symbology-using-renderers-and-feature-sets/m-p/339222#M31437</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2013-04-17T16:37:33Z</dc:date>
    </item>
  </channel>
</rss>

