Follow Mode

167
4
12-21-2020 02:05 AM
GonzaloMuöoz
New Contributor III

Hi,

 

I'm using ArcGIS Runtime .net 100.9 version. I'd like to know if there's a way of center constantly the map on the movement of an element. What I'm using now is to when moving the element, make a SetViewpointCenterAsync, but it's not a valid approach since the map's center is changed everytime. Map should stay centered all the time on the element without any visual effect.

 

Regards

Gonzalo

Reply
0 Kudos
4 Replies
JoeHershman
MVP Regular Contributor

The MapView has a LocationDisplay property.  LocatonDisplay has  AutoPanMode.

mapView.LocationDisplay.AutoPanMode = LocationDisplayAutoPanMode.Recenter;

 

Reply
0 Kudos
GonzaloMuöoz
New Contributor III

Thanks @JoeHershman . I've been testing that functionality with the Code Samples (Show Location History) and it's not working correctle as it recenters late and not with each position update. Apart from that, when panning on the mapview, it sems like the functionality is stopped. Is something wrong on the sample or is it a bug?  Will this bugs be fixed?

If yes, how can this be used to assign a graphic to be recentered, because from what I've seen you create the symbol on runtime, but I need to assign this recenter mode to a already created graphic.

Reply
0 Kudos
sandiegomonedero
New Contributor

This example may help

https://developers.arcgis.com/net/latest/wpf/sample-code/animate-3d-graphic/

You could also try the non asyncronous SetViewpoint to remove the lag you may have with the asyncronous one.

GonzaloMuöoz
New Contributor III

Hi sandiegomonedero,

 

we are now using the SetViewpoint method and it has improve the performance of the FollowMode, but now graphics are flashing and sometimes there's a lack on the viewpoint and graphics reposition... Any idea on how to proceed? Our costumer has not accepted still the solution. 

Reply
0 Kudos