} // When the connection is suspended, we do nothing. public async void OnLocationChanged(Location location) { // Whenever the location changes, log message. Log.Debug("LocationClient", "Location updated"); // Update the address. address = await LocationInformation.ReverseGeocodeCurrentLocation(this, location); // Get the streetname from the address we received. streetName = address.GetAddressLine(0).ToString(); }
public async void OnMapReady(GoogleMap googleMap) { map = googleMap; // Get adress info Address address = await LocationInformation.ReverseGeocodeCurrentLocation(this, location); // Add marker for current location Map.CreateMarkerForCurrentLocation(this, location, address, map); // Set map options googleMap.MoveCamera(CameraUpdateFactory.NewLatLngZoom(new LatLng(location.Latitude, location.Longitude), 13)); }
public async void OnLocationChanged(Location location) { // This method display changes in the user's location if they've been requested // You must implement this to implement the Android.Gms.Locations.ILocationListener Interface Log.Debug("LocationClient", "Location updated"); this.location = location; Address address = await LocationInformation.ReverseGeocodeCurrentLocation(this, location); TextView locationName = FindViewById <TextView>(Resource.Id.LocationName); locationName.Text = address.GetAddressLine(0).ToString(); InitMapFragment(); }