예제 #1
0
 private void OnPositionChanged(object sender, Xamarin.Geolocation.PositionEventArgs e)
 {
     if (this.PositionChanged != null)
     {
         var pos = ToFormsPosition(e.Position);
         this.PositionChanged(this, new PositionEventArgs(pos));
     }
 }
예제 #2
0
        private void OnPositionChanged(PositionEventArgs e)
        {
            var changed = PositionChanged;

            if (changed != null)
            {
                changed(this, e);
            }
        }
예제 #3
0
        private void OnPositionChanged(PositionEventArgs e)
        {
            var handler = this.PositionChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
예제 #4
0
        private void OnListenerPositionChanged(object sender, PositionEventArgs e)
        {
            if (!IsListening)             // ignore anything that might come in afterwards
            {
                return;
            }

            lock (this.positionSync)
            {
                this.lastPosition = e.Position;

                var changed = PositionChanged;
                if (changed != null)
                {
                    changed(this, e);
                }
            }
        }
예제 #5
0
		private void OnPositionChanged (object sender, PositionEventArgs e)
		{
			BeginInvokeOnMainThread (() => {
				ListenStatus.Text = e.Position.Timestamp.ToString("G");
				ListenLatitude.Text = "La: " + e.Position.Latitude.ToString("N4");
				ListenLongitude.Text = "Lo: " + e.Position.Longitude.ToString("N4");
			});
		}
예제 #6
0
		private void GeolocatorOnPositionChanged (object sender, PositionEventArgs e)
		{
			CurrentPosition = e.Position;
		}
예제 #7
0
        void geo_PositionChanged(object sender, PositionEventArgs e)
        {
            lock (geo)
            {
                currentPosition = e.Position;

                System.Diagnostics.Debug.WriteLine("CURRENT POSITION: " + currentPosition.Latitude.ToString() + ", " + currentPosition.Longitude.ToString());
            }
        }
예제 #8
0
		private void OnPositionChanged (object sender, PositionEventArgs e)
		{
			RunOnUiThread (() => {
				this.listenStatus.Text = e.Position.Timestamp.ToString("G");
				this.listenAccuracy.Text = e.Position.Accuracy + "m";
				this.listenLatitude.Text = "La: " + e.Position.Latitude.ToString("N4");
				this.listenLongitude.Text = "Lo: " + e.Position.Longitude.ToString("N4");
			});
		}
예제 #9
0
		private void OnPositionChanged (PositionEventArgs e)
		{
			var changed = PositionChanged;
			if (changed != null)
				changed (this, e);
		}
예제 #10
0
      private void OnListenerPositionChanged( object sender, PositionEventArgs e )
      {
         if(!IsListening) // ignore anything that might come in afterwards
         {
            return;
         }

         lock(positionSync)
         {
            lastPosition = e.Position;

            var changed = PositionChanged;
            if(changed != null)
            {
               changed( this, e );
            }
         }
      }
		public void OnLocationChanged(object sender, PositionEventArgs e)
		{
			Position location = e.Position;
			_map.AnimateCamera(CameraUpdateFactory.NewLatLngZoom(new Android.Gms.Maps.Model.LatLng(location.Latitude, location.Longitude), 5.0f));
		}
예제 #12
0
		private void OnPositionChanged (PositionEventArgs e)
		{
			var handler = this.PositionChanged;
			if (handler != null)
				handler (this, e);
		}