public void LookAtTrajectory(Trajectory2D trajectory) { if (trajectory.Count > 0) { var bb = trajectory.BuildBoundingBox(); gMap.SetZoomToFitRect(new RectLatLng(bb.MaxY, bb.MinX, bb.Width, bb.Height)); } }
protected void LookAtTrajectory(Trajectory2D trajectory) { if (trajectory.Count > 0) { BoundingBox2D boundingBox = trajectory.BuildBoundingBox(); LookAt(boundingBox.Center.X, boundingBox.Center.Y, 1.1 * boundingBox.Width, 1.1 * boundingBox.Height); focusedTrajectory = trajectory; } else { focusedTrajectory = null; } }