private void CenterOnLocation(LatLng location, FooterMode footerMode) { if (footerMode == FooterMode.Hidden) { return; } var mapView = (MapView)Control; var projection = mapView.Map.Projection; var screenLocation = projection.ToScreenLocation(location); //todo change this to use % like iOS if (footerMode == FooterMode.Minimized) { screenLocation.Y -= (int)(screenLocation.Y * 0.10); } else { screenLocation.Y += (int)(screenLocation.Y * 0.55); } var offsetTarget = projection.FromScreenLocation(screenLocation); // Animate to the calculated lat/lng mapView.Map.AnimateCamera(CameraUpdateFactory.NewLatLng(offsetTarget)); }
private void CenterOnLocation(CLLocationCoordinate2D coordinates, FooterMode footerMode) { var center = coordinates; if(footerMode == FooterMode.Hidden || footerMode == FooterMode.Minimized) { center.Latitude -= _nativeMapView.Region.Span.LatitudeDelta * 0.10; } else{ center.Latitude -= _nativeMapView.Region.Span.LatitudeDelta * 0.35; } _nativeMapView.SetCenterCoordinate (center, true); }
private void CenterOnLocation(CLLocationCoordinate2D coordinates, FooterMode footerMode) { var center = coordinates; if (footerMode == FooterMode.Hidden || footerMode == FooterMode.Minimized) { center.Latitude -= _nativeMapView.Region.Span.LatitudeDelta * 0.10; } else { center.Latitude -= _nativeMapView.Region.Span.LatitudeDelta * 0.35; } _nativeMapView.SetCenterCoordinate(center, true); }
public void ToogleFooter () { FooterMode = FooterMode == FooterMode.Expanded ? FooterMode.Minimized : FooterMode.Expanded; }
private void CenterOnLocation(LatLng location, FooterMode footerMode) { if (footerMode == FooterMode.Hidden) return; var mapView = (MapView) Control; var projection = mapView.Map.Projection; var screenLocation = projection.ToScreenLocation(location); //todo change this to use % like iOS if(footerMode == FooterMode.Minimized) { screenLocation.Y -= (int)(screenLocation.Y * 0.10); } else { screenLocation.Y += (int)(screenLocation.Y * 0.55); } var offsetTarget = projection.FromScreenLocation(screenLocation); // Animate to the calculated lat/lng mapView.Map.AnimateCamera(CameraUpdateFactory.NewLatLng(offsetTarget)); }
public void ToogleFooter() { FooterMode = FooterMode == FooterMode.Expanded ? FooterMode.Minimized : FooterMode.Expanded; }