In my current project I'm updating my app's GPS system from ArcGIS runtime 10.2 to 100.7. From testing, everything seems to work but the zooming is not smooth whatsoever. In fact currently when you set the AutoPanMode to Navigation it is horrendously choppy and borderline painful to watch it zoom to your position. I've created a test application with the 10.2 references and setting AutoPanMode to Navigation smoothly pans over to your location but never zooms unless you call some Zoom method afterwards. I'm guessing that's why it used to look so smooth?
Currently this is what I've found creates the same functionality
await MapView.SetViewpointAsync(new Viewpoint(e.Position.Extent), TimeSpan.FromSeconds(1)); await MapView.SetViewpointScaleAsync(300);
The problem is when I do this, the AutoPanMode gets set to Off and the only workaround is to set it back to Navigation right after
await CustomMapView.SetViewpointAsync(new Viewpoint(e.Position.Extent), TimeSpan.FromSeconds(1)); await CustomMapView.SetViewpointScaleAsync(300); MapView.LocationDisplay.AutoPanMode = LocationDisplayAutoPanMode.Navigation;
This is not really ideal since it feels a little hacky. Additionally in UWP it causes a bunch of threading issues that crash the app (I can fix that but it looks really gross). Is there a way I can animate my zooming without having to do this?
What had to be done to fix this:
MapView.LocationDisplay.InitialZoomScale = 0; MapView.LocationDisplay.IsEnabled = true; MapView.LocationDisplay.AutoPanMode = LocationDisplayAutoPanMode.Navigation await Task.Delay(2500); await MapView.SetViewpointScaleAsync(500);