<?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: Problems adding attributes to a graphic in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-adding-attributes-to-a-graphic/m-p/525436#M48984</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works, thanks.&amp;nbsp; I'm not sure what the documentation means for the syntax I was trying.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Dec 2014 15:46:37 GMT</pubDate>
    <dc:creator>TracySchloss</dc:creator>
    <dc:date>2014-12-12T15:46:37Z</dc:date>
    <item>
      <title>Problems adding attributes to a graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-adding-attributes-to-a-graphic/m-p/525434#M48982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am buffering points and I want to put the attributes of original point on the resultant buffer polygon.&amp;nbsp; I also want to add an extra attribute for 'source' to indicate which layer I was buffering.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The graphic is getting the feature.attributes from the original point.&amp;nbsp; I thought I could use graphic.attr('name','value') to add the extra attribute I want.&amp;nbsp; It doesn't seem to be doing anything.&amp;nbsp; It's not generating any error either.&amp;nbsp; Is this not the proper method?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//create a buffer graphic for every point
function generateBufferGraphic(features){
&amp;nbsp;&amp;nbsp;&amp;nbsp; bufferLayer.clear();&amp;nbsp; 
&amp;nbsp; var radius = registry.byId("bufferSelect").value;//user can select buffer distance 
&amp;nbsp; var idPoint,circle;
&amp;nbsp; arrayUtils.forEach(features, function (feature){
&amp;nbsp;&amp;nbsp;&amp;nbsp; idPoint = feature.geometry;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; circle = new Circle({&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; center: idPoint,&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geodesic: true,&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; radius: radius,&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; radiusUnit: "esriMiles"&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 Graphic(circle, bufferSymbol,feature.attributes);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; graphic.attr('source','layername');
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bufferLayer.add(graphic);&amp;nbsp; 
&amp;nbsp; });
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:53:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-adding-attributes-to-a-graphic/m-p/525434#M48982</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2021-12-11T22:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Problems adding attributes to a graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-adding-attributes-to-a-graphic/m-p/525435#M48983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to set the attributes of a graphic with this syntax&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//is layername a string or a variable in your code? This assumes it a variable
graphic.attributes.source = layername&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:53:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-adding-attributes-to-a-graphic/m-p/525435#M48983</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T22:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problems adding attributes to a graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-adding-attributes-to-a-graphic/m-p/525436#M48984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That works, thanks.&amp;nbsp; I'm not sure what the documentation means for the syntax I was trying.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 15:46:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-adding-attributes-to-a-graphic/m-p/525436#M48984</guid>
      <dc:creator>TracySchloss</dc:creator>
      <dc:date>2014-12-12T15:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problems adding attributes to a graphic</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-adding-attributes-to-a-graphic/m-p/525437#M48985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I ran into the same issue, which is how I got this answer. I agree that the documentation needs to be clarified.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Dec 2014 15:53:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/problems-adding-attributes-to-a-graphic/m-p/525437#M48985</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2014-12-12T15:53:53Z</dc:date>
    </item>
  </channel>
</rss>

