Esempio n. 1
0
        public void OnLocationChanged(Location location)
        {
            var latitude = location.Latitude;
            var longitude = location.Longitude;

            if (mMap != null)
            {
                // Create a LatLng object for the current location
                var latLng = new LatLng(latitude, longitude);

                // Show the current location in Google Map        
                mMap.MoveCamera(CameraUpdateFactory.NewLatLng(latLng));
                mMap.AnimateCamera(CameraUpdateFactory.ZoomTo(20));
            }
        }
Esempio n. 2
0
        public void OnLocationChanged(Location location)
        {
            var latitude = location.Latitude;
            var longtitude = location.Longitude;
            var altitude = location.Altitude;
            var speed = location.Speed;
            var satellites = (location.Extras != null) ? location.Extras.GetInt("satellites") : 0;

            txAccuracy.Text = "Accuracy: " + location.GetAccuracy() + " m";
            txLatitude.Text = "Latitude: " + latitude + " degrees";
            txLongtitude.Text = "Longtitude: " + longtitude + " degrees";
            txAltitude.Text = "Altitude: " + altitude + " m";
            txSpeed.Text = "Speed: " + speed + " m/s";
            txExtra.Text = "#Satellites: " + satellites;
        }