static SampleLimitedScrollArea() { CentralParkBoundingBox = new BoundingBoxE6(40.796788, -73.949232, 40.768094, -73.981762); Paint = new Paint { Color = Color.Argb(50, 255, 0, 0) }; }
public void OnGlobalLayout() { View view = parent.FindViewById(Resource.Id.routedetails_mapview); view.ViewTreeObserver.RemoveOnGlobalLayoutListener(this); BoundingBoxE6 boundingBoxE6 = parent.GetBoundingBoxE6(); if (boundingBoxE6 != null) { parent.map.ZoomToBoundingBox(boundingBoxE6); } }
/// <summary> /// Getting bounding box to fit all marker on the map /// </summary> /// <returns>BoundingBoxE6</returns> public BoundingBoxE6 GetBoundingBoxE6() { List <GeoPoint> points = new List <GeoPoint> (); if (currentUserLocation != null) { points.Add(currentUserLocation); } if (route != null && route.Waypoints.Any()) { foreach (Waypoint waypoint in route.Waypoints) { points.Add(new GeoPoint(waypoint.Location.Latitude, waypoint.Location.Longitude)); } } return(BoundingBoxE6.FromGeoPoints(points)); }
static SampleLimitedScrollArea() { CentralParkBoundingBox = new BoundingBoxE6(40.796788, -73.949232, 40.768094, -73.981762); Paint = new Paint {Color = Color.Argb(50, 255, 0, 0)}; }