public override void ViewDidLoad() { base.ViewDidLoad(); var mbProvider = new MBTilesProvider(); var zoomLatLng = mbProvider.zoomLatLng(); //var point = new CLLocationCoordinate2D (0, 0); //var camera = CameraPosition.FromCamera (point, 12, 0, 0); //mapView = MapView.FromCamera (RectangleF.Empty, camera); mapView = new MapView(); View = mapView; mbProvider.Map = mapView; //CameraUpdate update = CameraUpdate.FitBounds ( // new CoordinateBounds( // new CLLocationCoordinate2D(bounds[1],bounds[0]), // new CLLocationCoordinate2D(bounds[3],bounds[2]) // ) //); CameraUpdate update = CameraUpdate.SetCamera( new CameraPosition(new CLLocationCoordinate2D(zoomLatLng[2], zoomLatLng[1]), (float)zoomLatLng[0], 0.0, 0.0) ); mapView.MoveCamera(update); }
public bool DidTapCluster(GMUClusterManager clusterManager, IGMUCluster cluster) { var newCamera = CameraPosition.FromCamera(cluster.Position, zoom: mapView.Camera.Zoom + 1); var update = CameraUpdate.SetCamera(newCamera); mapView.MoveCamera(update); return(false); }
public void DidTapCluster(GMUClusterManager clusterManager, IGMUCluster cluster) { var newCamera = CameraPosition.FromCamera(cluster.Position, mapView.Camera.Zoom + 1); var update = CameraUpdate.SetCamera(newCamera); mapView.MoveCamera(update); }