Ejemplo n.º 1
0
        public void StopTracking()
        {
            if (!IsTracking) return;
            CurrentLocation.IsEnabled = false;
            CurrentLocation.IsResolved = false;
            _geolocator.PositionError -= OnListeningError;
            _geolocator.PositionChanged -= OnPositionChanged;
            _geolocator.StopListening();

            IsTracking = false;

            _geolocator = null;
        }
Ejemplo n.º 2
0
        private void Setup()
        {
            if (_geolocator != null)
                return;

            _geolocator = new Geolocator {DesiredAccuracy = 10};
            _geolocator.PositionError += OnListeningError;
            _geolocator.PositionChanged += OnPositionChanged;
        }