private void OnLocationChanged(object sender, MyLocationChangeEventArgs e) { var loc = e.Location.ToBinding3DLocation(); UserLocation = loc; if (LocationChanged?.CanExecute(loc) ?? false) { LocationChanged.Execute(loc); } }
public sealed override void DidUpdateUserLocation(MKMapView mapView, MKUserLocation userLocation) { var coordinate = userLocation.ToBinding3DLocation(); if (mapView is BindingMKMapView v) { v.UserCurrentLocation = coordinate; } if (LocationChanged != null) { if (LocationChanged.CanExecute(coordinate)) { LocationChanged.Execute(coordinate); } } }