<?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: Dymanic Entities Heading (rotation/angle) in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/dymanic-entities-heading-rotation-angle/m-p/1616252#M13567</link>
    <description>&lt;DIV&gt;&lt;SPAN&gt;To achieve dynamic entity rotation with a dictionary renderer in the ArcGIS Maps SDK, you can use a dictionary override to set the rotation of the symbol based on the heading from the data. For a general discussion on working with overrides in dictionary styles, please refer to the &lt;/SPAN&gt;&lt;A href="https://github.com/Esri/dictionary-renderer-toolkit/blob/master/docs/working-with-overrides.md" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Dictionary Renderer Toolkit documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;We created a &lt;/SPAN&gt;&lt;A href="https://github.com/EsriDevEvents/native-maps-sdks-real-time-dts-2025/blob/main/TransitTracker" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;sample app for the DevSummit&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;that uses a &lt;EM&gt;DictionaryRenderer&lt;/EM&gt; with dynamic rotation, which might help. The app demonstrates how to set up the dictionary style and apply the rotation based on a bearing attribute in the data. Here's the &lt;/SPAN&gt;&lt;A href="https://github.com/EsriDevEvents/native-maps-sdks-real-time-dts-2025/blob/main/TransitTracker/Content/Transit.stylx" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;custom style&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;used in the sample. The data source for this app was a custom &lt;EM&gt;DynamicEntityDataSource&lt;/EM&gt;, but you should be able to use heading data from an &lt;EM&gt;ArcGISStreamService&lt;/EM&gt; as well.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Here, the symbol has an interior train symbol that doesn't rotate, and an exterior arrow that rotates with the bearing attribute of the entity. The script for the dictionary style returns the &lt;EM&gt;Rotation&lt;/EM&gt; override based on the &lt;/SPAN&gt;&lt;SPAN&gt;`bearing`&lt;/SPAN&gt;&lt;SPAN&gt; attribute of the entity:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;LI-CODE lang="javascript"&gt;return "TrainArrow" + ";po:colored_fill|Color|" + color + ";po:direction_arrow|Rotation|" + $feature.bearing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;This ensures the symbol is colored and rotated according to entity data. When a &lt;EM&gt;DictionaryRenderer&lt;/EM&gt; created with this dictionary style is used as the renderer of a &lt;EM&gt;DynamciEntityLayer&lt;/EM&gt; (&lt;EM&gt;DynamciEntityLayer.Renderer&lt;/EM&gt;), each entity will rotate according to the bearing angle of its latest observation. The rotation will also be updated automatically as the entity receives new observations from the data source.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;In your case, you should be able to do something similar.&amp;nbsp;In your custom dictionary style, use the rotation property for the symbol, and set it based on the heading attribute of your entity.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 19 May 2025 22:28:31 GMT</pubDate>
    <dc:creator>GregDeStigter</dc:creator>
    <dc:date>2025-05-19T22:28:31Z</dc:date>
    <item>
      <title>Dymanic Entities Heading (rotation/angle)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/dymanic-entities-heading-rotation-angle/m-p/1615743#M13564</link>
      <description>&lt;P&gt;Hi, I'm trying to achieve a simple dynamic entity rotation according to heading data and aligned with map.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using my own dictionary style with and I'm using primitives to adjust the rotation of the symbol because I have a state in which the entity is selected, and it has four corners of a rectangle that not supposed to rotate with the entity.&lt;/P&gt;&lt;P&gt;I would be happy for some assistant in how to make the symbol rotate with the map.&lt;/P&gt;&lt;P&gt;Also, I would glad to know what the recommended way is to control the heading\rotation\angle of the dynamic entities when using a dictionary renderer&lt;/P&gt;&lt;P&gt;thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2025 14:19:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/dymanic-entities-heading-rotation-angle/m-p/1615743#M13564</guid>
      <dc:creator>pinisolomon1</dc:creator>
      <dc:date>2025-05-17T14:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dymanic Entities Heading (rotation/angle)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/dymanic-entities-heading-rotation-angle/m-p/1616252#M13567</link>
      <description>&lt;DIV&gt;&lt;SPAN&gt;To achieve dynamic entity rotation with a dictionary renderer in the ArcGIS Maps SDK, you can use a dictionary override to set the rotation of the symbol based on the heading from the data. For a general discussion on working with overrides in dictionary styles, please refer to the &lt;/SPAN&gt;&lt;A href="https://github.com/Esri/dictionary-renderer-toolkit/blob/master/docs/working-with-overrides.md" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Dictionary Renderer Toolkit documentation&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;We created a &lt;/SPAN&gt;&lt;A href="https://github.com/EsriDevEvents/native-maps-sdks-real-time-dts-2025/blob/main/TransitTracker" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;sample app for the DevSummit&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;that uses a &lt;EM&gt;DictionaryRenderer&lt;/EM&gt; with dynamic rotation, which might help. The app demonstrates how to set up the dictionary style and apply the rotation based on a bearing attribute in the data. Here's the &lt;/SPAN&gt;&lt;A href="https://github.com/EsriDevEvents/native-maps-sdks-real-time-dts-2025/blob/main/TransitTracker/Content/Transit.stylx" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;custom style&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;used in the sample. The data source for this app was a custom &lt;EM&gt;DynamicEntityDataSource&lt;/EM&gt;, but you should be able to use heading data from an &lt;EM&gt;ArcGISStreamService&lt;/EM&gt; as well.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;Here, the symbol has an interior train symbol that doesn't rotate, and an exterior arrow that rotates with the bearing attribute of the entity. The script for the dictionary style returns the &lt;EM&gt;Rotation&lt;/EM&gt; override based on the &lt;/SPAN&gt;&lt;SPAN&gt;`bearing`&lt;/SPAN&gt;&lt;SPAN&gt; attribute of the entity:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;LI-CODE lang="javascript"&gt;return "TrainArrow" + ";po:colored_fill|Color|" + color + ";po:direction_arrow|Rotation|" + $feature.bearing&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;This ensures the symbol is colored and rotated according to entity data. When a &lt;EM&gt;DictionaryRenderer&lt;/EM&gt; created with this dictionary style is used as the renderer of a &lt;EM&gt;DynamciEntityLayer&lt;/EM&gt; (&lt;EM&gt;DynamciEntityLayer.Renderer&lt;/EM&gt;), each entity will rotate according to the bearing angle of its latest observation. The rotation will also be updated automatically as the entity receives new observations from the data source.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;In your case, you should be able to do something similar.&amp;nbsp;In your custom dictionary style, use the rotation property for the symbol, and set it based on the heading attribute of your entity.&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 19 May 2025 22:28:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/dymanic-entities-heading-rotation-angle/m-p/1616252#M13567</guid>
      <dc:creator>GregDeStigter</dc:creator>
      <dc:date>2025-05-19T22:28:31Z</dc:date>
    </item>
  </channel>
</rss>

