worthsparks

AGSMapView and .locationDisplay state

Discussion created by worthsparks on Feb 27, 2017
Latest reply on Feb 27, 2017 by rolson-esristaff

My app instantiates an AGSMapView that gets covered and re-shown (using UINavigationController in a typical fashion). While the mapView is showing, the user toggles locationDisplay on and off using a button that calls mapView.locationDisplay's start() and  stop(). This works fine. If locationDisplay is ever started and then stopped before progressing to another view controller (covering the mapView), locationDisplay appears to restart when the user returns to the mapView. Upon debug inspection, properties inside mapView.locationDisplay look correct. In particular, mapView.locationDisplay.started == false.

 

My solution is to use mapView.locationDisplay's boolean properties showLocation, showAccuracy, and showAnimationSymbol to manually force it to not show when locationDisplay is stopped. But why do I only have to do this when reshowing the mapView after it was covered?

Outcomes