<?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 rendered graphic attributes in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096716#M10438</link>
    <description>&lt;P&gt;Ah excellent! My mistake - I thought I had tried this but evidently not!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Sep 2021 13:20:54 GMT</pubDate>
    <dc:creator>PeterBell2</dc:creator>
    <dc:date>2021-09-09T13:20:54Z</dc:date>
    <item>
      <title>Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095853#M10419</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;We are currently trying to optimise some of our code (which uses version 100.10 of the SDK), and the Graphics in particular. We are currently setting the symbol of each Graphic to a&amp;nbsp;PictureMarkerSymbol, which seems to be quite inefficient as suggested by this forum post:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-runtime-sdk-for-net-questions/adding-a-large-number-of-graphics-in-a-mvvm/m-p/710704/highlight/true#M8947." target="_blank"&gt;https://community.esri.com/t5/arcgis-runtime-sdk-for-net-questions/adding-a-large-number-of-graphics-in-a-mvvm/m-p/710704/highlight/true#M8947.&lt;/A&gt;&amp;nbsp;We have lots of different symbols in our program, but many Graphics are using the same symbol. Each type of Graphic is added to a different graphics overlay.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been experimenting with using renderers as suggested by the linked post, but feels like I have hit a dead end. Our Graphics represent things like ships currently sailing, and we need to update the position and rotation of each graphic roughly once per second. I have got a&amp;nbsp;DictionaryRenderer working with attribute dictionaries for the Graphics to start with the correct rotation, but my issue is that I don't see a way of then updating the rotation after the Graphics have been added to the overlay.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to get this working? Or is there another approach that would be better for dynamic data visualisation like this?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 08:29:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095853#M10419</guid>
      <dc:creator>PeterBell2</dc:creator>
      <dc:date>2021-09-07T08:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095862#M10420</link>
      <description>&lt;P&gt;If all graphics of one graphic overlay use the same symbol,&amp;nbsp; you can use a &lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Symbology.SimpleRenderer.html" target="_self"&gt;SimpleRenderer&lt;/A&gt;&amp;nbsp;based on your picture marker symbol.&lt;BR /&gt;If the symbol is depending on an attribute you can use an&lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Symbology.UniqueValueRenderer.html" target="_self"&gt; UniqueValueRenderer&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Then you can set a &lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Symbology.Renderer.RotationExpression.html" target="_self"&gt;rotation expression&lt;/A&gt; on the renderer to apply a rotation based on an expression. For example, if the expected rotation is coming from an attribute:&lt;BR /&gt;&amp;nbsp;&lt;EM&gt; renderer.RotationExpression = "[rotation]"&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 08:57:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095862#M10420</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-09-07T08:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095867#M10421</link>
      <description>&lt;P&gt;Hi Dominique, thanks for the reply. I have set up the rotation expression as described for my DictionaryRenderer, and I then initialise the Graphic like this:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Dictionary&amp;lt;string, object&amp;gt; attributes = new Dictionary&amp;lt;string, object&amp;gt;();
attributes["ANGLE"] = boat.angle;
attributes["Style"] = "BoatImage";
Graphic graphic = new Graphic(boat.Location, attributes);
graphicsOverlay.Graphics.Add(graphic);&lt;/LI-CODE&gt;&lt;P&gt;This correctly sets the rotation, but I don't see how to change the rotation after this. Modifying the attribute dictionary does not seem to have any effect. Am I misunderstanding how the attributes work?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 09:51:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095867#M10421</guid>
      <dc:creator>PeterBell2</dc:creator>
      <dc:date>2021-09-07T09:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095868#M10422</link>
      <description>&lt;P&gt;You can use &lt;A href="https://developers.arcgis.com/net/api-reference/api/netwin/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Data.Feature.SetAttributeValue.html" target="_self"&gt;SetAttributeValue&lt;/A&gt;&amp;nbsp;something like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;myGraphic.SetAttributeValue("ANGLE", boat.angle);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 10:12:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095868#M10422</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2021-09-07T10:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095874#M10423</link>
      <description>&lt;P&gt;Aha! Perfect! I assume this means I need to switch from Graphics to Features. I will investigate further, thanks for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 10:59:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095874#M10423</guid>
      <dc:creator>PeterBell2</dc:creator>
      <dc:date>2021-09-07T10:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095977#M10424</link>
      <description>&lt;P&gt;A graphic is a GeoElement, so has an Attributes property.&amp;nbsp; I would think sticking with the graphic in a GraphicsOverlay would render faster.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 15:47:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095977#M10424</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2021-09-07T15:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095983#M10425</link>
      <description>&lt;P&gt;Looking at you code in your initial post, I see you mentioned you are using a DictionaryRenderer. I think you might be mixing up creating a dictionary of attributes to a DictionaryRenderer.&amp;nbsp;&lt;BR /&gt;DictionaryRenderer is a renderer based on arcade script in a stylx file. The stylx file contains symbols and values is published from pro. When this stylx is used to create a dictionary renderer, elements (graphics or features) are rendered sing symbols from this symbol style file based on the attribute value configured in dictionary renderer.&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/net/styles-and-data-visualization/display-symbols-with-a-dictionary-renderer/" target="_blank"&gt;https://developers.arcgis.com/net/styles-and-data-visualization/display-symbols-with-a-dictionary-renderer/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 15:57:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1095983#M10425</guid>
      <dc:creator>PreetiMaske</dc:creator>
      <dc:date>2021-09-07T15:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096087#M10426</link>
      <description>&lt;P&gt;A few questions, just to clarify your scenario, so I can better suggest the most efficient approach:&lt;BR /&gt;- Does all the ship symbols look the same (except for the direction they are rotated to)&lt;BR /&gt;- If the symbols doesn't look the same, do every individual ship use a unique looking symbol, or are there limited set of symbols? (like rowboat, sailboat, ferry, freighter etc, and again ignoring the heading of each one).&lt;/P&gt;&lt;P&gt;If they are all the same symbol, you should use a SimpleRenderer with a rotation expression set. If there is a limited group of symbols, use a UniqueValueRenderer with a rotation expression.&lt;BR /&gt;If every single ship uses a completely unique picture marker symbol, I would suggest you reconsider your approach, or at least keep the number of ships displayed at the same time to a minimum. If that's the case, perhaps you can go into more detail how each ship changes (ie color, size, shape changing, or unique photo of each vessel, etc and also what sort of info you use to decide how they look different)&lt;/P&gt;</description>
      <pubDate>Tue, 07 Sep 2021 19:47:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096087#M10426</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2021-09-07T19:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096312#M10430</link>
      <description>&lt;P&gt;Graphic does have the Attributes property, but as far as I can tell it has no&amp;nbsp;SetAttributeValue method?&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 12:11:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096312#M10430</guid>
      <dc:creator>PeterBell2</dc:creator>
      <dc:date>2021-09-08T12:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096348#M10431</link>
      <description>&lt;P&gt;In this specific case, all the ship symbols do look the same, so SimpleRenderer could work. That said, ideally we'd use the same system for the rest of our program, which is more complex. For instance, some symbols are colour-coded, which makes SimpleRenderer less appealling (unless we use a different overlay for each symbol, but I assume that's bad form). We also have a few cases where we overlay different symbols (e.g. when the user hovers the mouse over the symbol) at runtime. It looked like DictionaryRenderer was the way to go in order to achieve that level of configurability.&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I can tell though, a using a DictionaryRenderer would mean we would have to manually upload each symbol into a stylx file. We have a finite but large amount of symbols, so we are keen to avoid this if we can.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 13:27:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096348#M10431</guid>
      <dc:creator>PeterBell2</dc:creator>
      <dc:date>2021-09-08T13:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096351#M10432</link>
      <description>&lt;P&gt;Hi, thanks for the clarification. I mentioned this a bit in my reply to&amp;nbsp;&lt;SPAN&gt;dotMorten_esri&lt;/SPAN&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Esri-Frequent-Contributor lia-component-message-view-widget-author-username"&gt;&amp;nbsp;just now, but I was pursuing DictionaryRenderer in the hopes of using it for the rest of our program as well, which has some more complex cases.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="UserName lia-user-name lia-user-rank-Esri-Frequent-Contributor lia-component-message-view-widget-author-username"&gt;This approach would seem to require manually uploading all of our symbols to Pro though, which we are keen to avoid if possible. Are there any other options?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 13:32:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096351#M10432</guid>
      <dc:creator>PeterBell2</dc:creator>
      <dc:date>2021-09-08T13:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096510#M10435</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;gt; Graphic does have the Attributes property, but as far as I can tell it has no&amp;nbsp;SetAttributeValue method?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can use:&lt;BR /&gt;myGraphic.Attributes["fieldname"] = newValue;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 18:49:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096510#M10435</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2021-09-08T18:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096516#M10436</link>
      <description>&lt;P&gt;If you just have a limited set of colors, I'd just use a UniqueValueRenderer instead of DictionaryRenderer.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 19:22:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096516#M10436</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2021-09-08T19:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096716#M10438</link>
      <description>&lt;P&gt;Ah excellent! My mistake - I thought I had tried this but evidently not!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 13:20:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096716#M10438</guid>
      <dc:creator>PeterBell2</dc:creator>
      <dc:date>2021-09-09T13:20:54Z</dc:date>
    </item>
    <item>
      <title>Re: Updating rendered graphic attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096720#M10439</link>
      <description>&lt;P&gt;That sounds reasonable. I think the approach we will likely go for is to use UniqueValueRenderer where possible, and use the previous inefficient system for the more complex cases when we are sure there will be a small amount of graphics. Thank you very much for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 13:31:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/updating-rendered-graphic-attributes/m-p/1096720#M10439</guid>
      <dc:creator>PeterBell2</dc:creator>
      <dc:date>2021-09-09T13:31:26Z</dc:date>
    </item>
  </channel>
</rss>

