{"id":2639542,"date":"2024-12-23T11:34:32","date_gmt":"2024-12-23T19:34:32","guid":{"rendered":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2639542"},"modified":"2025-01-28T13:21:46","modified_gmt":"2025-01-28T21:21:46","slug":"track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps","status":"publish","type":"blog","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps","title":{"rendered":"Track a Moving Dynamic Entity with the ArcGIS Maps SDKs for Native Apps"},"author":350922,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_searchwp_excluded":""},"categories":[738191],"tags":[778032,777732,758802,773362],"industry":[],"product":[761642,769142,768902,769152,768912,36601],"class_list":["post-2639542","blog","type-blog","status-publish","format-standard","hentry","category-developers","tag-dynamic-entity","tag-location-display","tag-native-apps","tag-native-development","product-platform","product-sdk-net","product-sdk-kotlin","product-sdk-qt","product-sdk-swift","product-developers"],"acf":{"authors":[{"ID":350922,"user_firstname":"Greg","user_lastname":"DeStigter","nickname":"Greg De Stigter","user_nicename":"gdestigteresri-com_esriinc","display_name":"Greg DeStigter","user_email":"GDeStigter@esri.com","user_url":"https:\/\/github.com\/gdestigter","user_registered":"2024-01-02 22:07:56","user_description":"Greg DeStigter is a senior software developer for the ArcGIS Maps SDK for .NET team with over 15 years of experience in designing and developing APIs, and applications for the GIS industry. Greg is currently focused on bringing real-time data processing to ArcGIS Maps SDK for Native Applications.","user_avatar":"<img data-del=\"avatar\" src='https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/WIN_20240202_11_14_25_Pro2-213x200.jpg' class='avatar pp-user-avatar avatar-96 photo ' height='96' width='96'\/>"}],"short_description":"Different techniques to track a moving dynamic entity with the ArcGIS Maps SDKs for Native Apps.","flexible_content":[{"acf_fc_layout":"content","content":"<h2>Introduction<\/h2>\n<p>Integrating real-time feeds with moving track data into your Native Maps SDKs app can create engaging, interactive maps and scenes. This allows you to view real-time updates of multiple entities, helping you understand the broader situation. However, there are times when you need to focus on a single entity and track its movement on the map. Unfortunately, there isn\u2019t a direct solution for automatically panning the map or scene to follow a dynamic entity, so the code can be challenging to write.<\/p>\n<p>This article explores techniques for interacting with and tracking moving dynamic entities with the Native Maps SDKs. By the end of this article, you&#8217;ll better understand how to implement dynamic entity tracking in your real-time applications.<\/p>\n<ol style=\"list-style-type: decimal\">\n<li><a href=\"#sample_application\">Sample Application<\/a><\/li>\n<li><a href=\"#follow_entity\">Following a <em>DynamicEntity<\/em><\/a>\n<ol style=\"list-style-type: lower-alpha;padding-left: 20px\">\n<li><a href=\"#option_one\">Manually Pan the <em>GeoView<\/em><\/a><\/li>\n<li><a href=\"#option_two\">Custom <em>LocationDataSource<\/em> with <em>MapView.LocationDisplay<\/em><\/a><\/li>\n<li><a href=\"#option_three\"><em>SceneView<\/em> and <em>CameraController<\/em><\/a><\/li>\n<\/ol>\n<\/li>\n<li><a href=\"#summary\">Summary<\/a><\/li>\n<\/ol>\n"},{"acf_fc_layout":"content","content":"<h3>The Dynamics: <em>DynamicEntity<\/em>, <em>DynamicEntityObservation<\/em>, and <em>DynamicEntityDataSource<\/em><\/h3>\n<p>Several important classes in the ArcGIS Maps SDKs for Native Apps help manage and track moving entities. When developing a real-world application where live entities are always on the move, it&#8217;s essential to understand these core &#8220;dynamic&#8221; classes: <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.RealTime.DynamicEntity.html\"><em>DynamicEntity<\/em><\/a>,\u00a0<a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.RealTime.DynamicEntityObservation.html\"><em>DynamicEntityObservation<\/em><\/a>, and\u00a0<a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.RealTime.DynamicEntityDataSource.html\"><em>DynamicEntityDataSource<\/em><\/a>.<\/p>\n<p>A\u00a0<em>DynamicEntity<\/em>\u00a0represents a real-world object, like a vehicle, person, or asset, whose location and attributes can change over time. In real-time tracking applications, dynamic entities are usually the central elements. Each\u00a0<em>DynamicEntity<\/em>\u00a0has historical snapshots, called observations, represented by\u00a0<em>DynamicEntityObservation<\/em>\u00a0objects. An observation captures an entity&#8217;s state, including its location and attributes, at a specific point in time. The Native Maps SDK reads these observations from a data stream provided by a\u00a0<em>DynamicEntityDataSource<\/em>\u00a0object, which periodically updates its associated entities with new observations.<\/p>\n<p>This article explores these &#8220;dynamic&#8221; objects and how they&#8217;re used to simulate and track moving entities.<\/p>\n"},{"acf_fc_layout":"content","content":"<h2 id=\"sample_application\">Sample Application<\/h2>\n<p>You can find a sample application that demonstrates the techniques described in this article on my <a href=\"https:\/\/github.com\/gdestigter\/FollowEntity\">GitHub repo<\/a>. Source code from this application is referred to in later sections of this article and can be used as a reference for setting up similar code in your apps.<\/p>\n"},{"acf_fc_layout":"image","image":{"ID":2641472,"id":2641472,"title":"FollowEntity","filename":"FollowEntity.png","filesize":315780,"url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity.png","link":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps\/followentity","alt":"Sample application demonstrating how to follow a dynamic entity.","author":"350922","description":"Sample application demonstrating how to follow a dynamic entity.","caption":"Follow Entity Sample Application","name":"followentity","status":"inherit","uploaded_to":2639542,"date":"2024-12-26 23:21:53","modified":"2024-12-26 23:22:23","menu_order":0,"mime_type":"image\/png","type":"image","subtype":"png","icon":"https:\/\/www.esri.com\/arcgis-blog\/wp-includes\/images\/media\/default.png","width":810,"height":458,"sizes":{"thumbnail":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity-213x200.png","thumbnail-width":213,"thumbnail-height":200,"medium":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity.png","medium-width":462,"medium-height":261,"medium_large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity.png","medium_large-width":768,"medium_large-height":434,"large":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity.png","large-width":810,"large-height":458,"1536x1536":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity.png","1536x1536-width":810,"1536x1536-height":458,"2048x2048":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity.png","2048x2048-width":810,"2048x2048-height":458,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity.png","card_image-width":810,"card_image-height":458,"wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity.png","wide_image-width":810,"wide_image-height":458}},"image_position":"center","orientation":"horizontal","hyperlink":"https:\/\/github.com\/gdestigter\/FollowEntity"},{"acf_fc_layout":"content","content":"<p>This app simulates deliveries for a fictional warehousing company in San Diego, with warehouses scattered around the city. It simulates deliveries from each warehouse to random points throughout the city. Delivery trucks are represented by <em>DynamicEntity<\/em> objects, and their locations are updated periodically using a custom <em>DynamicEntityDataSource<\/em>. To make the simulation more realistic, our custom data source uses an offline route task to create valid driving routes from the warehouse to the delivery point and back. The app lets the user select a truck on the map and follow its movement around the city.<\/p>\n<p>This sample app leverages the ArcGIS Maps SDK for .NET, though similar applications can be developed using any platform supported by the ArcGIS Maps SDKs for Native Apps. See the developer guide for information about dynamic entities in the Native Maps SDKs: <a href=\"https:\/\/developers.arcgis.com\/kotlin\/real-time\/work-with-dynamic-entities\/\">Kotlin<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/net\/real-time\/work-with-dynamic-entities\/\">.NET<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/qt\/real-time\/work-with-dynamic-entities\/\">Qt<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/swift\/real-time\/work-with-dynamic-entities\/\">Swift<\/a>.<\/p>\n"},{"acf_fc_layout":"content","content":"<section style=\"background: #f8f8f8;border: 1px solid purple;padding: 40px;margin-bottom: 20px\"><img decoding=\"async\" class=\"newsr-aside_spotlight-image\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/toolkit-213x200.png\" alt=\"ArcGIS Maps SDK Toolkit\" \/><\/p>\n<p class=\"newsr-aside_spotlight-title\" style=\"line-height: 10px\">Check it out!<\/p>\n<p class=\"newsr-aside_spotlight-name\" style=\"font-weight: 500\">Custom Data Sources<\/p>\n<p class=\"newsr-aside_spotlight-body\">The\u00a0<em>DynamicEntityDataSource<\/em> class in the ArcGIS Maps SDKs for Native Apps serves as the base class for real-time streaming data sources in the Esri platform, such as\u00a0<em>ArcGISStreamService<\/em>. But user code can also extend it to create custom data sources. The sample app used in this article, for instance, creates a custom <em>DynamicEntityDataSource<\/em> to simulate delivery truck progress. It generates driving routes and emits a new observation for each truck at a configurable time interval, including its simulated location. See the corresponding code in the <a href=\"https:\/\/github.com\/gdestigter\/FollowEntity\/blob\/main\/Extension\/SimulationSource.cs\"><em>SimulationSource <\/em>class<\/a> from the sample repo. Creating a custom data source like this is extremely useful for testing or demoing an app, as it eliminates the need to connect to a live service.<\/p>\n<p class=\"newsr-aside_spotlight-body\">For more information, you can refer to an excellent blog post on creating custom data sources: <a href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/craft-your-own-dynamic-entity-data-source-for-arcgis-maps-sdks-for-native-apps\/\">Craft your own dynamic entity data source for ArcGIS Maps SDKs for Native Apps<\/a>.<\/p>\n<\/section>\n"},{"acf_fc_layout":"content","content":"<h2 id=\"follow_entity\">Following a Single <em>DynamicEntity<\/em><\/h2>\n<p>For our application to follow a single <em>DynamicEntity<\/em>, the viewpoint of the <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/wpf\/Esri.ArcGISRuntime.UI.Controls.MapView.html\"><em>MapView<\/em><\/a> or <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/wpf\/Esri.ArcGISRuntime.UI.Controls.SceneView.html\"><em>SceneView<\/em><\/a> needs to be updated to ensure the entity remains visible as it moves. Let&#8217;s look at some techniques to achieve this, highlighting their advantages, disadvantages, and when to apply them in an application.<\/p>\n<h3>Selecting a <em>DynamicEntity<\/em><\/h3>\n<p>Our sample app uses a selection halo to indicate which truck the user is interested in. To select an entity from the data source, the user taps on a truck symbol on the map. The <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/wpf\/Esri.ArcGISRuntime.UI.Controls.GeoView.IdentifyLayerAsync.html\"><em>GeoView.IdentifyLayerAsync<\/em><\/a> method is used to find the <em>DynamicEntityObservation<\/em> associated with the user\u2019s tap point. You\u2019ll see in the code snippet below, that <em>IdentifyLayerAsync<\/em> does not return <em>DynamicEntity<\/em> objects but rather returns individual observations. This is helpful in our case as the user may tap on any observation in the track of the delivery truck they\u2019re interested in. This alleviates the difficulty of tapping on a moving object as the latest observation in the track may be changing quickly and tapping on a previous static observation is easier for the user. Once we have an observation in the track, we get its associated <em>DynamicEntity<\/em> and use the <em>DynamicEntityLayer.<\/em><em>SelectDynamicEntity<\/em> method to select the entity on the map. When a <em>DynamicEntity<\/em> is selected, the selection halo moves with the entity, so whenever a new observation associated with this entity comes in, the selection moves too. This is an easy way to show the movement of an entity on a map or scene.<\/p>\n<details>\n<summary><span style=\"cursor: pointer;color: purple;font-style: bold\">\u2295\u00a0Show code &#8230;<\/span><\/summary>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div>\n<pre style=\"background: #f8f8f8;overflow: auto;width: 100%;height: 100%;border: solid purple;border-width: .1em .1em .1em .4em;padding: .2em .6em;margin: 0;line-height: 125%;font-size: 0.75em\">\/\/ select a single dynamic entity\r\n<span style=\"color: #008800;font-weight: bold\">public<\/span> <span style=\"color: #008800;font-weight: bold\">async<\/span> Task <span style=\"color: #0066bb;font-weight: bold\">Identify<\/span>(Point position, MapPoint? _)\r\n{\r\n    _dynamicEntityLayer.ClearSelection();\r\n\r\n    <span style=\"color: #333399;font-weight: bold\">var<\/span> result = <span style=\"color: #008800;font-weight: bold\">await<\/span> MapViewController.IdentifyLayerAsync(_dynamicEntityLayer, position, <span style=\"color: #6600ee;font-weight: bold\">2d<\/span>);\r\n    <span style=\"color: #008800;font-weight: bold\">if<\/span> (result?.GeoElements?.FirstOrDefault() <span style=\"color: #008800;font-weight: bold\">is<\/span> DynamicEntityObservation observation)\r\n    {\r\n        SelectedEntity = observation.GetDynamicEntity();\r\n        <span style=\"color: #008800;font-weight: bold\">if<\/span> (SelectedEntity <span style=\"color: #008800;font-weight: bold\">is<\/span> not <span style=\"color: #008800;font-weight: bold\">null<\/span>)\r\n            _dynamicEntityLayer.SelectDynamicEntity(SelectedEntity);\r\n    }\r\n}\r\n<\/pre>\n<\/div>\n<\/details>\n<p>&nbsp;<\/p>\n<p>Now we can look at different ways to update the <em>MapView<\/em> or <em>SceneView<\/em> to keep the selected entity in view as it moves.<\/p>\n"},{"acf_fc_layout":"content","content":"<section style=\"background: #f8f8f8;border: 1px solid purple;padding: 40px\"><img decoding=\"async\" class=\"newsr-aside_spotlight-image\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/toolkit-213x200.png\" alt=\"ArcGIS Maps SDK Toolkit\" \/><\/p>\n<p class=\"newsr-aside_spotlight-title\" style=\"line-height: 10px\">Check it out!<\/p>\n<p class=\"newsr-aside_spotlight-name\" style=\"font-weight: 500\">ArcGIS Maps SDKs for Native Apps Toolkit<\/p>\n<p class=\"newsr-aside_spotlight-body\">The sample app uses the <a style=\"cursor: pointer\" href=\"https:\/\/github.com\/Esri\/arcgis-maps-sdk-dotnet-toolkit\">ArcGIS Maps SDK for .NET Toolkit<\/a> to provide\u00a0some functionality.\u00a0This\u00a0open-source project\u00a0offers\u00a0controls and components\u00a0that help when developing Native Maps SDKs applications.\u00a0In this application, the identify code is wrapped in\u00a0an out-of-the-box\u00a0feature of the\u00a0<em>GeoViewController<\/em>\u00a0MVVM assistant\u00a0class of\u00a0the toolkit.\u00a0This <em>GeoViewController<\/em>\u00a0is bound to our\u00a0<em>GeoView<\/em>, allowing\u00a0the view model code to call methods on the view without\u00a0breaking <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/architecture\/maui\/mvvm\">Model-View-View Model priciples<\/a><\/p>\n<p class=\"newsr-aside_spotlight-body\">The toolkit provides many other useful components for developing Native Maps SDKs applications. Consider using it in your next application.<\/p>\n<\/section>\n"},{"acf_fc_layout":"content","content":"<h3 id=\"option_one\">Option 1: Manually Pan the <em>GeoView<\/em><\/h3>\n<p>The first and most obvious option for following a moving <em>DynamicEntity<\/em> is to manually update the viewpoint of the <em>MapView<\/em> or <em>SceneView <\/em>to keep the entity centered in the view whenever its location changes. There are methods on the <em>GeoView <\/em>(the base class for <em>Ma<\/em><em>pView<\/em> and <em>SceneView<\/em>) that make this straightforward and consistent for both 2D and 3D views.<\/p>\n<p>You can be notified of changes to a <em>DynamicEntity<\/em> by listening to its <em>DynamicEntityChanged<\/em> event. This event is raised anytime a new observation is received for the <em>DynamicEntity<\/em>. When this event is triggered, you can manually update the <em>GeoView\u2019s<\/em> viewpoint to center on the entity\u2019s new location.<\/p>\n<p>In the sample, we use the <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/wpf\/Esri.ArcGISRuntime.UI.Controls.GeoView.SetViewpointAsync.html\"><em>GeoView.SetViewpointAsync<\/em><\/a> method to update the viewpoint whenever the selected <em>DynamicEntity<\/em> changes location. This method allows us to keep the truck centered in the view by performing an animated pan. Alternatively, you can use the <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/winui\/Esri.ArcGISRuntime.UI.Controls.GeoView.SetViewpoint.html\"><em>SetViewpoint<\/em> <\/a>method to disable the pan animation. There are also many constructors for creating <em>Viewpoints<\/em> that offer various options for setting center, scale, rotation, and 3D camera values. Creative use of these methods can give you fine-grained control of the <em>GeoView\u2019s<\/em> viewpoint in your application. Note that most of these methods are available for both the <em>MapView<\/em> and <em>SceneView<\/em>. For instance, you can pan the view to keep the truck in a corner of the map, showing more of the map in the direction it&#8217;s heading. Or you can display a more zoomed-out view based on the truck&#8217;s current speed.<\/p>\n<p>The manual approach has two key benefits: it&#8217;s straightforward to implement and gives you full control over the viewpoint. However, this approach also has a drawback: it requires application code to manually update the viewpoint whenever the entity changes. Additionally, automatic updates to the viewpoint at random intervals can disrupt user interactions like panning and zooming, so it&#8217;s crucial to consider how this might affect the overall user experience and application flow.<\/p>\n<p>Here is an example of how to manually follow a moving <em>DynamicEntity<\/em> using the <em>DynamicEntityChanged<\/em> event:<\/p>\n<details>\n<summary><span style=\"cursor: pointer;color: purple;font-style: bold\">\u2295\u00a0Show code &#8230;<\/span><\/summary>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div>\n<pre style=\"background: #f8f8f8;overflow: auto;width: 100%;height: 100%;border: solid purple;border-width: .1em .1em .1em .4em;padding: .2em .6em;margin: 0;line-height: 125%;font-size: 0.75em\"><span style=\"color: #008800;font-weight: bold\">private<\/span> <span style=\"color: #008800;font-weight: bold\">void<\/span> <span style=\"color: #0066bb;font-weight: bold\">FollowSelectedEntity_Manual<\/span>()\r\n{\r\n  SelectedEntity.DynamicEntityChanged += SelectedEntity_DynamicEntityChanged;\r\n}\r\n\r\n<span style=\"color: #008800;font-weight: bold\">private<\/span> <span style=\"color: #008800;font-weight: bold\">void<\/span> <span style=\"color: #0066bb;font-weight: bold\">StopFollowingSelectedEntity_Manual<\/span>()\r\n{\r\n  SelectedEntity.DynamicEntityChanged -= SelectedEntity_DynamicEntityChanged;\r\n}\r\n\r\n<span style=\"color: #008800;font-weight: bold\">private<\/span> <span style=\"color: #008800;font-weight: bold\">async<\/span> <span style=\"color: #008800;font-weight: bold\">void<\/span> <span style=\"color: #0066bb;font-weight: bold\">SelectedEntity_DynamicEntityChanged<\/span>(<span style=\"color: #333399;font-weight: bold\">object?<\/span> sender, DynamicEntityChangedEventArgs e)\r\n{\r\n  <span style=\"color: #008800;font-weight: bold\">if<\/span> (e.ReceivedObservation?.Geometry <span style=\"color: #008800;font-weight: bold\">is<\/span> MapPoint point)\r\n  {\r\n    GeoView.SetViewpointAsync(<span style=\"color: #008800;font-weight: bold\">new<\/span> Viewpoint(point));\r\n  }\r\n}\r\n<\/pre>\n<\/div>\n<\/details>\n"},{"acf_fc_layout":"content","content":"<h3 id=\"option_two\">Option 2: Custom <em>LocationDataSource<\/em> with <em>MapView.LocationDisplay<\/em><\/h3>\n<p>Here is a second approach to following an entity in a 2D map: use the built-in <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/wpf\/Esri.ArcGISRuntime.UI.Controls.MapView.LocationDisplay.html\"><em>MapView.<\/em><em>LocationDisplay<\/em><\/a> property to automatically pan the map when the entity location changes. To do this, you can create a custom <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Location.LocationDataSource.html\"><em>LocationDataSource<\/em> <\/a>that uses the selected <em>DynamicEntity<\/em> as the source for location updates and then connect the new data source to the <em>MapView.LocationDisplay<\/em> property.<\/p>\n<h4><strong>Custom <em>LocationDataSource<\/em><\/strong><\/h4>\n<p>Our <em>CustomLocationDataSource<\/em> class below inherits from the <em>LocationDataSource<\/em> class provided by the ArcGIS Maps SDK for .NET. It\u2019s a standalone data source that can provide location updates to the <em>LocationDisplay<\/em> component of the <em>MapView<\/em>. <em>CustomLocationDataSource<\/em> listens for changes to the selected <em>DynamicEntity<\/em> using the <em>DynamicEntityChanged<\/em> event (as mentioned in option #1 above) and emits a location update accordingly.<\/p>\n<details>\n<summary><span style=\"cursor: pointer;color: purple;font-style: bold\">\u2295\u00a0Show code &#8230;<\/span><\/summary>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div>\n<pre style=\"background: #f8f8f8;overflow: auto;width: 100%;height: 100%;border: solid purple;border-width: .1em .1em .1em .4em;padding: .2em .6em;margin: 0;line-height: 125%;font-size: 0.75em\">\/\/ Example code for creating a custom LocationDataSource\r\n<span style=\"color: #008800;font-weight: bold\">public<\/span> <span style=\"color: #008800;font-weight: bold\">class<\/span> <span style=\"color: #bb0066;font-weight: bold\">CustomLocationDataSource<\/span> : LocationDataSource\r\n{\r\n  <span style=\"color: #008800;font-weight: bold\">private<\/span> DynamicEntity _entity;\r\n\r\n  <span style=\"color: #008800;font-weight: bold\">public<\/span> <span style=\"color: #0066bb;font-weight: bold\">CustomLocationDataSource<\/span>(DynamicEntity entity)\r\n  {\r\n    _entity = entity;\r\n  }\r\n\r\n  <span style=\"color: #008800;font-weight: bold\">protected<\/span> <span style=\"color: #008800;font-weight: bold\">override<\/span> Task <span style=\"color: #0066bb;font-weight: bold\">OnStartAsync<\/span>()\r\n  {\r\n    _entity.DynamicEntityChanged += Entity_DynamicEntityChanged;\r\n    <span style=\"color: #008800;font-weight: bold\">return<\/span> Task.CompletedTask;\r\n  }\r\n\r\n  <span style=\"color: #008800;font-weight: bold\">protected<\/span> <span style=\"color: #008800;font-weight: bold\">override<\/span> Task <span style=\"color: #0066bb;font-weight: bold\">OnStopAsync<\/span>()\r\n  {\r\n    _entity.DynamicEntityChanged -= Entity_DynamicEntityChanged;\r\n    <span style=\"color: #008800;font-weight: bold\">return<\/span> Task.CompletedTask;\r\n  }\r\n\r\n  <span style=\"color: #008800;font-weight: bold\">private<\/span> <span style=\"color: #008800;font-weight: bold\">void<\/span> <span style=\"color: #0066bb;font-weight: bold\">Entity_DynamicEntityChanged<\/span>(<span style=\"color: #333399;font-weight: bold\">object?<\/span> sender, DynamicEntityChangedEventArgs e)\r\n  {\r\n    <span style=\"color: #888888\">\/\/ Update the location based on the entity's location<\/span>\r\n    UpdateLocation(<span style=\"color: #008800;font-weight: bold\">new<\/span> Location((MapPoint)_entity.Geometry,\r\n      horizontalAccuracy: <span style=\"color: #6600ee;font-weight: bold\">0.0<\/span>, velocity: <span style=\"color: #6600ee;font-weight: bold\">1.0<\/span>, course: <span style=\"color: #6600ee;font-weight: bold\">0.0<\/span>, isLastKnown: <span style=\"color: #008800;font-weight: bold\">false<\/span>));\r\n  }\r\n}\r\n<\/pre>\n<\/div>\n<\/details>\n<p>&nbsp;<\/p>\n<h4 style=\"margin-top: 20px\"><strong><em>LocationDisplay<\/em><\/strong><\/h4>\n<p>The\u00a0<em>LocationDisplay<\/em>\u00a0is a built-in component of the Native Maps SDKs, mainly used to show the current device&#8217;s location on the map; however, by setting\u00a0<em>LocationDisplay.DataSource<\/em>\u00a0to an instance of the\u00a0<em>CustomLocationDataSource<\/em>\u00a0created above, we can use the\u00a0<em>LocationDisplay<\/em>\u00a0to show the location of our selected\u00a0<em>DynamicEntity<\/em>\u00a0instead. In the code below, we set the\u00a0<em>AutoPanMode<\/em>\u00a0property of the\u00a0<em>LocationDisplay<\/em>\u00a0to\u00a0<em>Recenter<\/em>. This ensures the map automatically pans to keep the entity in view as it moves. The\u00a0<em>LocationDisplay<\/em>\u00a0has many other settings that can be used to customize the display of the entity&#8217;s location. For example, our app uses\u00a0<em>WanderEffect<\/em>\u00a0to tell the\u00a0<em>MapView<\/em> to wait until the entity moves a certain amount before triggering a pan of the map. For more information, see the documentation for the <a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/net\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.LocationDisplay.html\"><em>LocationDisplay<\/em> class<\/a>.<\/p>\n<details>\n<summary><span style=\"cursor: pointer;color: purple;font-style: bold\">\u2295\u00a0Show code &#8230;<\/span><\/summary>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div>\n<pre style=\"background: #f8f8f8;overflow: auto;width: 100%;height: 100%;border: solid purple;border-width: .1em .1em .1em .4em;padding: .2em .6em;margin: 0;line-height: 125%;font-size: 0.75em\"><span style=\"color: #008800;font-weight: bold\">private<\/span> <span style=\"color: #008800;font-weight: bold\">async<\/span> <span style=\"color: #008800;font-weight: bold\">void<\/span> <span style=\"color: #0066bb;font-weight: bold\">FollowSelectedEntity_LocationDataSource<\/span>()\r\n{\r\n  <span style=\"color: #008800;font-weight: bold\">if<\/span> (SelectedEntity <span style=\"color: #008800;font-weight: bold\">is<\/span> not <span style=\"color: #008800;font-weight: bold\">null<\/span>)\r\n  {\r\n    <span style=\"color: #333399;font-weight: bold\">var<\/span> followSource = <span style=\"color: #008800;font-weight: bold\">new<\/span> EntityLocationDataSource(SelectedEntity);\r\n    <span style=\"color: #008800;font-weight: bold\">await<\/span> FollowEntityController.UpdateLocationDisplayAsync(followSource);\r\n  }\r\n}\r\n\r\n<span style=\"color: #008800;font-weight: bold\">private<\/span> <span style=\"color: #008800;font-weight: bold\">async<\/span> <span style=\"color: #008800;font-weight: bold\">void<\/span> <span style=\"color: #0066bb;font-weight: bold\">StopFollowingSelectedEntity_LocationDataSource<\/span>()\r\n{\r\n  <span style=\"color: #008800;font-weight: bold\">await<\/span> FollowEntityController.UpdateLocationDisplayAsync(<span style=\"color: #008800;font-weight: bold\">null<\/span>);\r\n}\r\n\r\n<span style=\"color: #008800;font-weight: bold\">public<\/span> <span style=\"color: #008800;font-weight: bold\">async<\/span> Task <span style=\"color: #0066bb;font-weight: bold\">UpdateLocationDisplayAsync<\/span>(LocationDataSource? dataSource)\r\n{\r\n  <span style=\"color: #008800;font-weight: bold\">if<\/span> (mapView.LocationDisplay.DataSource <span style=\"color: #008800;font-weight: bold\">is<\/span> not <span style=\"color: #008800;font-weight: bold\">null<\/span>)\r\n    <span style=\"color: #008800;font-weight: bold\">await<\/span> mapView.LocationDisplay.DataSource.StopAsync();\r\n\r\n  <span style=\"color: #008800;font-weight: bold\">if<\/span> (dataSource <span style=\"color: #008800;font-weight: bold\">is<\/span> <span style=\"color: #008800;font-weight: bold\">null<\/span>)\r\n  {\r\n    mapView.LocationDisplay.DataSource = <span style=\"color: #008800;font-weight: bold\">null<\/span>;\r\n    mapView.LocationDisplay.IsEnabled = <span style=\"color: #008800;font-weight: bold\">false<\/span>;\r\n    <span style=\"color: #008800;font-weight: bold\">return<\/span>;\r\n  }\r\n\r\n  mapView.LocationDisplay.DataSource = dataSource;\r\n  mapView.LocationDisplay.AutoPanMode = LocationDisplayAutoPanMode.Recenter;\r\n  mapView.LocationDisplay.InitialZoomScale = mapView.MapScale;\r\n  mapView.LocationDisplay.ShowLocation = <span style=\"color: #008800;font-weight: bold\">false<\/span>;\r\n  mapView.LocationDisplay.WanderExtentFactor = <span style=\"color: #6600ee;font-weight: bold\">0.5d<\/span>;\r\n  mapView.LocationDisplay.IsEnabled = <span style=\"color: #008800;font-weight: bold\">true<\/span>;\r\n}\r\n<\/pre>\n<\/div>\n<\/details>\n<p>Using the built-in <em>LocationDisplay<\/em> is a robust way to track a moving entity as the Native Maps SDK handles panning the map automatically. The underlying API turns off the automatic recenter functionality when the user interacts with the map allowing the user to pan and zoom freely. Additionally, the\u00a0<em>LocationDisplay<\/em>\u00a0comes with built-in symbology for displaying the location on the map, which could be useful in other scenarios, even though our sample application doesn&#8217;t utilize it.<\/p>\n<p>Although creating a custom\u00a0<em>LocationDataSource<\/em>\u00a0requires more code, it&#8217;s worth noting that it can serve other purposes as well. For instance, it can be used as the input data source for a\u00a0<a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.Geotriggers.LocationGeotriggerFeed.html\"><em>LocationGeotriggerFeed<\/em><\/a>, which enables an application to receive notifications for\u00a0<em>Geotrigger<\/em>-related events. Imagine setting up a\u00a0<em>Geotrigger<\/em>\u00a0to notify users when a delivery truck enters specific areas. In this scenario, the\u00a0<em>LocationGeotriggerFeed<\/em>\u00a0would use our custom\u00a0<em>LocationDataSource<\/em>\u00a0to track the truck&#8217;s location and trigger a notification when it enters one of the specified areas. This powerful feature allows you to create location-based notifications in your application.<\/p>\n"},{"acf_fc_layout":"content","content":"<section style=\"background: #f8f8f8;border: 1px solid purple;padding: 40px\"><img decoding=\"async\" class=\"newsr-aside_spotlight-image\" src=\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/toolkit-213x200.png\" alt=\"ArcGIS Maps SDK Toolkit\" \/><\/p>\n<p class=\"newsr-aside_spotlight-title\" style=\"line-height: 10px\">Check it out!<\/p>\n<p class=\"newsr-aside_spotlight-name\" style=\"font-weight: 500\">Geotriggers<\/p>\n<p class=\"newsr-aside_spotlight-body\">The Geotriggers API is another part of the real-time segment of the ArcGIS Maps SDKs for Native Apps. Geotriggers provide a simple way to monitor a location and alert you when it enters or leaves a geographic area. Usually, the geotrigger is configured to monitor a device location, but in this article, we hint at how a geotrigger can be set up to monitor anything that gives location updates. This opens up some interesting functionality for apps that deal with real-time entities.<\/p>\n<p class=\"newsr-aside_spotlight-body\">See the documentation for a full discussion of the Geotrigger API: Work with Geotriggers:\u00a0<a href=\"https:\/\/developers.arcgis.com\/kotlin\/device-location\/work-with-geotriggers\/\">Kotlin<\/a>|\u00a0<a href=\"https:\/\/developers.arcgis.com\/net\/device-location\/work-with-geotriggers\/\">.NET<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/qt\/device-location\/work-with-geotriggers\/\">Qt<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/swift\/device-location\/work-with-geotriggers\/\">Swift<\/a>.<\/p>\n<\/section>\n"},{"acf_fc_layout":"content","content":"<h3 id=\"option_three\">Option 3: <em>SceneView<\/em> and <em>CameraController<\/em><\/h3>\n<p>If you&#8217;re working with 3D scenes, you can use a\u00a0<em>CameraController<\/em>\u00a0on the <em>SceneView<\/em> to track a moving\u00a0<em>DynamicEntity<\/em>. To do this, set the built-in\u00a0<a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/wpf\/Esri.ArcGISRuntime.UI.Controls.SceneView.CameraController.html\"><em>SceneView.CameraController<\/em><\/a>\u00a0property to an\u00a0<a href=\"https:\/\/developers.arcgis.com\/net\/api-reference\/api\/netwin\/Esri.ArcGISRuntime\/Esri.ArcGISRuntime.UI.OrbitGeoElementCameraController.html\"><em>OrbitGeoElementCameraController<\/em>\u00a0<\/a>created with the selected\u00a0<em>DynamicEntity<\/em>. This forces the <em>SceneView<\/em> to follow the entity as it moves around the scene.<\/p>\n<p>The <em>OrbitGeoElementCameraController<\/em> is a type of <em>CameraController <\/em>that constrains the <em>SceneView<\/em> camera to an orbit around a specified <em>GeoElement<\/em> (in this case, the selected <em>DynamicEntity<\/em>). You can customize the distance and angle of the orbit by setting the <em>CameraController.Distance<\/em> and <em>CameraController.CameraPitchOffset<\/em> properties. You can play around with these settings and others to get the desired view of the entity. Note that the <em>CameraController<\/em> handles all the <em>DynamicEntity<\/em> change events internally, so you don\u2019t need to handle or propagate these events in your user code, which makes this approach very easy to implement.<\/p>\n<p>This approach is similar to using the\u00a0<em>LocationDisplay<\/em>\u00a0in 2D views, but it&#8217;s designed specifically for 3D scenes. The advantage of using a\u00a0<em>CameraController<\/em>\u00a0is that it&#8217;s easy to implement and allows users to view the selected entity from different angles and distances interactively. However, the downside is that it only works in 3D. If you need to support both 2D and 3D views, you&#8217;ll need to implement a separate tracking mechanism for 2D maps.<\/p>\n<p>Here is an example of how to use a <em>SceneView<\/em> and a <em>CameraController<\/em> to follow a moving <em>DynamicEntity<\/em>:<\/p>\n<details>\n<summary><span style=\"cursor: pointer;color: purple;font-style: bold\">\u2295\u00a0Show code &#8230;<\/span><\/summary>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div>\n<pre style=\"background: #f8f8f8;overflow: auto;width: 100%;height: 100%;border: solid purple;border-width: .1em .1em .1em .4em;padding: .2em .6em;margin: 0;line-height: 125%;font-size: 0.75em\"><span style=\"color: #008800;font-weight: bold\">private<\/span> <span style=\"color: #008800;font-weight: bold\">void<\/span> <span style=\"color: #0066bb;font-weight: bold\">FollowSelectedEntity_CameraController<\/span>()\r\n{\r\n  sceneView.CameraController = <span style=\"color: #008800;font-weight: bold\">new<\/span> OrbitGeoElementCameraController(selectedEntity, <span style=\"color: #6600ee;font-weight: bold\">1000.0<\/span>);\r\n}\r\n\r\n<span style=\"color: #008800;font-weight: bold\">private<\/span> <span style=\"color: #008800;font-weight: bold\">void<\/span> <span style=\"color: #0066bb;font-weight: bold\">StopFollowingSelectedEntity_CameraController<\/span>()\r\n{\r\n  sceneView.CameraController = <span style=\"color: #008800;font-weight: bold\">null<\/span>;\r\n}\r\n<\/pre>\n<\/div>\n<\/details>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<h2 id=\"summary\">Follow <em>DynamicEntity<\/em> Summary<\/h2>\n<table>\n<thead>\n<tr>\n<td>Option<\/td>\n<td>Pros<\/td>\n<td>Cons<\/td>\n<td>When to Use<\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>#1: Manual<\/td>\n<td>&#8211; Simple to implement<br \/>\n&#8211; Ultimate control over the viewpoint<br \/>\n&#8211; Works for both 2D and 3D views<\/td>\n<td>&#8211; Requires application code to maintain the viewpoint<\/td>\n<td>&#8211; In simple situations where other methods aren\u2019t necessary<br \/>\n&#8211; When you need full control over the viewpoint<\/td>\n<\/tr>\n<tr>\n<td>#2: Custom <em>LocationDataSource<\/em><\/td>\n<td>&#8211; No need to manually update the viewpoint<br \/>\n&#8211; Can use built-in <em>LocationDisplay<\/em> settings<br \/>\n&#8211; Can use the custom <em>LocationDataSource<\/em> for other things (i.e. <em>LocationGeotriggerFeed<\/em>)<\/td>\n<td>&#8211; <em>MapView<\/em> only<br \/>\n&#8211; Requires extra user code for custom data source<\/td>\n<td>&#8211; When you want an automated way to track a moving entity and customize the display of the entity\u2019s location on the map<\/td>\n<\/tr>\n<tr>\n<td>#3: <em>CameraController<\/em><\/td>\n<td>&#8211; Simple to implement<br \/>\n&#8211; No need to manually update the viewpoint<br \/>\n&#8211; Can be used to get a full 3D view of the entity<\/td>\n<td>&#8211; <em>SceneView<\/em> only<\/td>\n<td>&#8211; When you need to track a moving entity in a 3D<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Conclusion<\/h2>\n<p>This article explored various ways to track a moving <em>DynamicEntity<\/em> in the ArcGIS Maps SDKs for Native Apps. By using these methods, you can monitor moving objects in <strong>real-time<\/strong>, boosting the capabilities of your applications in both 2D and 3D.<\/p>\n<p>&nbsp;<\/p>\n"},{"acf_fc_layout":"content","content":"<h2>Try it yourself!<\/h2>\n<p>I hope this article has inspired you to learn more about dynamic entities! If you&#8217;d like to learn more, we have comprehensive documentation for each of the Native Maps SDKs in our developer guides:<\/p>\n<ul>\n<li>Work with dynamic entities\u00a0(Native Maps SDKs Guide topic):\u00a0<a href=\"https:\/\/developers.arcgis.com\/kotlin\/real-time\/work-with-dynamic-entities\/\">Kotlin<\/a>|\u00a0<a href=\"https:\/\/developers.arcgis.com\/net\/real-time\/work-with-dynamic-entities\/\">.NET<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/qt\/real-time\/work-with-dynamic-entities\/\">Qt<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/swift\/real-time\/work-with-dynamic-entities\/\">Swift<\/a><\/li>\n<li>Add dynamic entity layer\u00a0(Native Maps SDKs samples): <a href=\"https:\/\/developers.arcgis.com\/kotlin\/real-time\/work-with-dynamic-entities\/\">Kotlin<\/a>|\u00a0<a href=\"https:\/\/developers.arcgis.com\/net\/real-time\/work-with-dynamic-entities\/\">.NET<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/qt\/real-time\/work-with-dynamic-entities\/\">Qt<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/swift\/real-time\/work-with-dynamic-entities\/\">Swift<\/a><\/li>\n<li>Custom dynamic entity data source (Native Maps SDKs samples):\u00a0<a href=\"https:\/\/developers.arcgis.com\/kotlin\/sample-code\/add-custom-dynamic-entity-data-source\/\">Kotlin<\/a>|\u00a0<a href=\"https:\/\/developers.arcgis.com\/net\/wpf\/sample-code\/add-custom-dynamic-entity-data-source\/\">.NET<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/qt\/cpp\/sample-code\/add-custom-dynamic-entity-data-source\/\">Qt<\/a>\u00a0|\u00a0<a href=\"https:\/\/developers.arcgis.com\/swift\/sample-code\/add-custom-dynamic-entity-data-source\/\">Swift<\/a><\/li>\n<\/ul>\n<p>You can check out the full code for the sample application described in this article on my <a href=\"https:\/\/github.com\/gdestigter\/FollowEntity\">GitHub repo<\/a>. We&#8217;d love to know what apps you&#8217;re building with real-time capabilities and to hear your feedback. Suggestions are welcome over on our <a href=\"https:\/\/community.esri.com\/t5\/arcgis-maps-sdks-for-native-apps\/ct-p\/arcgis-runtime-sdks\">Esri Community Forums<\/a>.<\/p>\n<p>Did you know we presented a real-time technical session at the 2024 Dev Summit? You can watch it below to learn more about the key points shared in this article. Enjoy!<\/p>\n"},{"acf_fc_layout":"kaltura","video_id":"1_xvm2bd1r","time":false,"start":0,"stop":""}],"related_articles":[{"ID":1845082,"post_author":"8512","post_date":"2023-04-19 10:00:07","post_date_gmt":"2023-04-19 17:00:07","post_content":"","post_title":"Eight essential real-time techniques with ArcGIS Maps SDKs for Native Apps","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"create-real-time-apps-with-arcgis-maps-sdks-for-native-apps","to_ping":"","pinged":"","post_modified":"2024-04-12 02:39:01","post_modified_gmt":"2024-04-12 09:39:01","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=1845082","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"},{"ID":2068762,"post_author":"8512","post_date":"2023-09-14 09:00:14","post_date_gmt":"2023-09-14 16:00:14","post_content":"","post_title":"Craft your own dynamic entity data source for ArcGIS Maps SDKs for Native Apps","post_excerpt":"","post_status":"publish","comment_status":"open","ping_status":"closed","post_password":"","post_name":"craft-your-own-dynamic-entity-data-source-for-arcgis-maps-sdks-for-native-apps","to_ping":"","pinged":"","post_modified":"2024-04-12 01:15:24","post_modified_gmt":"2024-04-12 08:15:24","post_content_filtered":"","post_parent":0,"guid":"https:\/\/www.esri.com\/arcgis-blog\/?post_type=blog&#038;p=2068762","menu_order":0,"post_type":"blog","post_mime_type":"","comment_count":"0","filter":"raw"}],"show_article_image":false,"card_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/Screenshot-2025-01-15-154912.png","wide_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity-Wide.png"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v25.9 (Yoast SEO v25.9) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Tracking Moving Dynamic Entities with ArcGIS Maps SDK<\/title>\n<meta name=\"description\" content=\"Discover techniques for tracking moving dynamic entities with the ArcGIS Maps SDK for Native Apps. Enhance your real-time applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Track a Moving Dynamic Entity with the ArcGIS Maps SDKs for Native Apps\" \/>\n<meta property=\"og:description\" content=\"Discover techniques for tracking moving dynamic entities with the ArcGIS Maps SDK for Native Apps. Enhance your real-time applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps\" \/>\n<meta property=\"og:site_name\" content=\"ArcGIS Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/esrigis\/\" \/>\n<meta property=\"article:modified_time\" content=\"2025-01-28T21:21:46+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@ESRI\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":[\"Article\",\"BlogPosting\"],\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps\"},\"author\":{\"name\":\"Greg DeStigter\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/2f373fccbe24b0a8576fdf3d81de6266\"},\"headline\":\"Track a Moving Dynamic Entity with the ArcGIS Maps SDKs for Native Apps\",\"datePublished\":\"2024-12-23T19:34:32+00:00\",\"dateModified\":\"2025-01-28T21:21:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps\"},\"wordCount\":13,\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"keywords\":[\"dynamic entity\",\"location display\",\"native apps\",\"native development\"],\"articleSection\":[\"Developers\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps\",\"name\":\"Tracking Moving Dynamic Entities with ArcGIS Maps SDK\",\"isPartOf\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\"},\"datePublished\":\"2024-12-23T19:34:32+00:00\",\"dateModified\":\"2025-01-28T21:21:46+00:00\",\"description\":\"Discover techniques for tracking moving dynamic entities with the ArcGIS Maps SDK for Native Apps. Enhance your real-time applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.esri.com\/arcgis-blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Track a Moving Dynamic Entity with the ArcGIS Maps SDKs for Native Apps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#website\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"name\":\"ArcGIS Blog\",\"description\":\"Get insider info from Esri product teams\",\"publisher\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#organization\",\"name\":\"Esri\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png\",\"width\":400,\"height\":400,\"caption\":\"Esri\"},\"image\":{\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/esrigis\/\",\"https:\/\/x.com\/ESRI\",\"https:\/\/www.linkedin.com\/company\/5311\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/2f373fccbe24b0a8576fdf3d81de6266\",\"name\":\"Greg DeStigter\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/WIN_20240202_11_14_25_Pro2-213x200.jpg\",\"contentUrl\":\"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/WIN_20240202_11_14_25_Pro2-213x200.jpg\",\"caption\":\"Greg DeStigter\"},\"description\":\"Greg DeStigter is a senior software developer for the ArcGIS Maps SDK for .NET team with over 15 years of experience in designing and developing APIs, and applications for the GIS industry. Greg is currently focused on bringing real-time data processing to ArcGIS Maps SDK for Native Applications.\",\"sameAs\":[\"https:\/\/github.com\/gdestigter\"],\"jobTitle\":\"Software Developer\",\"url\":\"https:\/\/www.esri.com\/arcgis-blog\/author\/gdestigteresri-com_esriinc\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Tracking Moving Dynamic Entities with ArcGIS Maps SDK","description":"Discover techniques for tracking moving dynamic entities with the ArcGIS Maps SDK for Native Apps. Enhance your real-time applications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps","og_locale":"en_US","og_type":"article","og_title":"Track a Moving Dynamic Entity with the ArcGIS Maps SDKs for Native Apps","og_description":"Discover techniques for tracking moving dynamic entities with the ArcGIS Maps SDK for Native Apps. Enhance your real-time applications.","og_url":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps","og_site_name":"ArcGIS Blog","article_publisher":"https:\/\/www.facebook.com\/esrigis\/","article_modified_time":"2025-01-28T21:21:46+00:00","twitter_card":"summary_large_image","twitter_site":"@ESRI","twitter_misc":{"Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":["Article","BlogPosting"],"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps#article","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps"},"author":{"name":"Greg DeStigter","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/2f373fccbe24b0a8576fdf3d81de6266"},"headline":"Track a Moving Dynamic Entity with the ArcGIS Maps SDKs for Native Apps","datePublished":"2024-12-23T19:34:32+00:00","dateModified":"2025-01-28T21:21:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps"},"wordCount":13,"publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"keywords":["dynamic entity","location display","native apps","native development"],"articleSection":["Developers"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps","url":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps","name":"Tracking Moving Dynamic Entities with ArcGIS Maps SDK","isPartOf":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#website"},"datePublished":"2024-12-23T19:34:32+00:00","dateModified":"2025-01-28T21:21:46+00:00","description":"Discover techniques for tracking moving dynamic entities with the ArcGIS Maps SDK for Native Apps. Enhance your real-time applications.","breadcrumb":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.esri.com\/arcgis-blog\/products\/sdk-net\/developers\/track-a-moving-dynamic-entity-with-the-arcgis-maps-sdk-for-native-apps#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.esri.com\/arcgis-blog\/"},{"@type":"ListItem","position":2,"name":"Track a Moving Dynamic Entity with the ArcGIS Maps SDKs for Native Apps"}]},{"@type":"WebSite","@id":"https:\/\/www.esri.com\/arcgis-blog\/#website","url":"https:\/\/www.esri.com\/arcgis-blog\/","name":"ArcGIS Blog","description":"Get insider info from Esri product teams","publisher":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.esri.com\/arcgis-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.esri.com\/arcgis-blog\/#organization","name":"Esri","url":"https:\/\/www.esri.com\/arcgis-blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2018\/04\/Esri.png","width":400,"height":400,"caption":"Esri"},"image":{"@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/esrigis\/","https:\/\/x.com\/ESRI","https:\/\/www.linkedin.com\/company\/5311\/"]},{"@type":"Person","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/2f373fccbe24b0a8576fdf3d81de6266","name":"Greg DeStigter","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.esri.com\/arcgis-blog\/#\/schema\/person\/image\/","url":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/WIN_20240202_11_14_25_Pro2-213x200.jpg","contentUrl":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2025\/01\/WIN_20240202_11_14_25_Pro2-213x200.jpg","caption":"Greg DeStigter"},"description":"Greg DeStigter is a senior software developer for the ArcGIS Maps SDK for .NET team with over 15 years of experience in designing and developing APIs, and applications for the GIS industry. Greg is currently focused on bringing real-time data processing to ArcGIS Maps SDK for Native Applications.","sameAs":["https:\/\/github.com\/gdestigter"],"jobTitle":"Software Developer","url":"https:\/\/www.esri.com\/arcgis-blog\/author\/gdestigteresri-com_esriinc"}]}},"text_date":"December 23, 2024","author_name":"Greg DeStigter","author_page":"https:\/\/www.esri.com\/arcgis-blog\/author\/gdestigteresri-com_esriinc","custom_image":"https:\/\/www.esri.com\/arcgis-blog\/app\/uploads\/2024\/12\/FollowEntity-Wide.png","primary_product":"ArcGIS Maps SDK for .NET","tag_data":[{"term_id":778032,"name":"dynamic entity","slug":"dynamic-entity","term_group":0,"term_taxonomy_id":778032,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":777732,"name":"location display","slug":"location-display","term_group":0,"term_taxonomy_id":777732,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":758802,"name":"native apps","slug":"native-apps","term_group":0,"term_taxonomy_id":758802,"taxonomy":"post_tag","description":"","parent":0,"count":17,"filter":"raw"},{"term_id":773362,"name":"native development","slug":"native-development","term_group":0,"term_taxonomy_id":773362,"taxonomy":"post_tag","description":"","parent":0,"count":8,"filter":"raw"}],"category_data":[{"term_id":738191,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":738191,"taxonomy":"category","description":"","parent":0,"count":423,"filter":"raw"}],"product_data":[{"term_id":761642,"name":"ArcGIS Location Platform","slug":"platform","term_group":0,"term_taxonomy_id":761642,"taxonomy":"product","description":"","parent":36601,"count":214,"filter":"raw"},{"term_id":769142,"name":"ArcGIS Maps SDK for .NET","slug":"sdk-net","term_group":0,"term_taxonomy_id":769142,"taxonomy":"product","description":"","parent":36601,"count":39,"filter":"raw"},{"term_id":768902,"name":"ArcGIS Maps SDK for Kotlin","slug":"sdk-kotlin","term_group":0,"term_taxonomy_id":768902,"taxonomy":"product","description":"","parent":36601,"count":33,"filter":"raw"},{"term_id":769152,"name":"ArcGIS Maps SDK for Qt","slug":"sdk-qt","term_group":0,"term_taxonomy_id":769152,"taxonomy":"product","description":"","parent":36601,"count":36,"filter":"raw"},{"term_id":768912,"name":"ArcGIS Maps SDK for Swift","slug":"sdk-swift","term_group":0,"term_taxonomy_id":768912,"taxonomy":"product","description":"","parent":36601,"count":32,"filter":"raw"},{"term_id":36601,"name":"Developers","slug":"developers","term_group":0,"term_taxonomy_id":36601,"taxonomy":"product","description":"","parent":0,"count":763,"filter":"raw"}],"primary_product_link":"https:\/\/www.esri.com\/arcgis-blog\/?s=#&products=sdk-net","_links":{"self":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2639542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/users\/350922"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/comments?post=2639542"}],"version-history":[{"count":0,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/blog\/2639542\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/media?parent=2639542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/categories?post=2639542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/tags?post=2639542"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/industry?post=2639542"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.esri.com\/arcgis-blog\/wp-json\/wp\/v2\/product?post=2639542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}