private void ButtonOnClick(object sender, EventArgs eventArgs)
 {
     if (!_started)
     {
         _geoLocationWatcher.Start(new MvxGeoLocationOptions(), OnLocation, OnError);
     }
     else
     {
         _geoLocationWatcher.Stop();
     }
     _started = !_started;
     UpdateStarted();
 }
예제 #2
0
        private void DoStartStop()
        {
            if (!IsStarted)
            {
                _watcher.Start(new MvxGeoLocationOptions()
                {
                    EnableHighAccuracy = false
                }, OnNewLocation, OnError);
            }
            else
            {
                _watcher.Stop();
            }

            IsStarted = !IsStarted;
        }