LocationDataSource Update.

449
4
07-31-2023 12:03 PM
ZachRuiz
New Contributor III

Hello, 

I am trying to track down some help on my Location Data Source. I have this event I call the UpdateLocation Method and the LocationSymbol does update on my MapView when enabled. The issue comes though when I pause the data generator (lat long heading) the symbol continues to move for about 1ish seconds. Is something limiting the rate at which I can update this position? It seems as if the "live data" gets to far ahead of the actual symbol position so when data is paused it finishes moving along the path as it clears the buffer for a lack of a better word. 

TIA

private void OnTimeTick_Changed(object sender, PropertyChangedEventArgs e)
        {
            if (e.PropertyName == nameof(EZA.TimeRunning))
            {
                
                UpdateLocation(new Location(new MapPoint(EZA.Long, EZA.Lat, SpatialReferences.Wgs84), 0, EZA.GroundSpeed, EZA.Heading, false));
                
            }
        }

 

4 Replies
dotMorten_esri
Esri Notable Contributor

The 1 second is expected. When the MapView receives the location update, it'll animate the location update from the old position to the newly reported location. That animation is about 1 second.

0 Kudos
ZachRuiz
New Contributor III

@dotMorten_esri  Thanks for letting me know. Can I disable the animations? I had a look at the API and was unable to see any mentions of this. 

0 Kudos
dotMorten_esri
Esri Notable Contributor

No there's no setting for turning this off.

While it might appear that the dot is always up to a second behind, in real world navigation with natural acceleration and deceleration, the experience is a lot better than a "jumping" symbol, but in local simulated testing, it might feel like it's more off than it should be.

0 Kudos
ZachRuiz
New Contributor III

In my scenario the data is being derived from a simulated aircraft position, when the simulator is stopped or paused the aircraft does seem to travel quite a bit (especially at higher rates of speed). In this scenario would you just suggest I roll my own "location data source" where I can draw graphics for my current position then clearing the last image? 

0 Kudos