In your observeValueForKeyPath method, you should not stopDataSource. That will stop the location and you will not be able to display it. I modified your code as follows:
-(void) mapViewDidLoad:(AGSMapView*)mapView {
// Enable location display on the map
[self.mapView.locationDisplay startDataSource];
self.mapView.locationDisplay.autoPanMode = AGSLocationDisplayAutoPanModeDefault;
[self.mapView zoomToScale:500.0 animated:true];
}
- (void)viewDidUnload {
//Stop the GPS, undo the map rotation (if any)
if(self.mapView.locationDisplay.dataSourceStarted){
[self.mapView.locationDisplay stopDataSource];
self.mapView.rotationAngle = 0;
}
self.mapView = nil;
}
- (IBAction)showCurrentLocation:(id)sender {
if(!self.mapView.locationDisplay.dataSourceStarted)
[self.mapView.locationDisplay startDataSource];
self.mapView.locationDisplay.autoPanMode = AGSLocationDisplayAutoPanModeDefault;
}