Select to view content in your preferred language

Tracking moving object.

676
2
06-13-2022 12:22 AM
ZachRuiz
Occasional Contributor

Hello esri community, 

 

I am just starting building my application in WPF and I attempting to just build a simple moving map display for an object. I have a data feed of the decimal lat, long and altitude of the object but I cannot seem to figure out on how I can track this object. Ideally, I'd like to have the object moving throughout the map, and to also be able to drag the map to other places while having a button to recenter. 

 

I have taken a look at the arcgis .net sample application but everything there seems bases off of NEMA. I just have simple raw values, lat, long, altitude. 

 

Could someone point me to how I can track an object like this? 

Tags (3)
0 Kudos
2 Replies
JoeHershman
MVP Regular Contributor

It seems to me you would need a custom LocationDataSource.  This is not overly complex to implement.  You would need to read the file and then call the UpdateLocation with the Location object you create from the data stream you are receiving.

Then on the MapView you update the LocationDisplay.DataSource to use your custom LocationDataSource.  After that everything would behave as though you were receiving location from any other data source.

Thanks,
-Joe
MichaelBranscomb
Esri Frequent Contributor

Similar to Joe's suggestion, but you could use the out-of-the-box SimulatedLocationDataSource e.g. https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/main/src/WPF/ArcGISRuntime.WPF.Viewer/Sam...

0 Kudos