private void TrackAndEditShapes_Load(object sender, EventArgs e) { winformsMap1.MapUnit = GeographyUnit.DecimalDegree; winformsMap1.BackgroundOverlay.BackgroundBrush = new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean); WorldMapKitWmsDesktopOverlay worldMapKitDesktopOverlay = new WorldMapKitWmsDesktopOverlay(); winformsMap1.TrackOverlay = new MyInteractiveOverLay(); winformsMap1.CurrentExtent = new RectangleShape(-139.2, 92.4, 120.9, -93.2); winformsMap1.Refresh(); } private void btnPause_Click(object sender, EventArgs e) { (winformsMap1.TrackOverlay as MyInteractiveOverLay).MouseDoubleClick(); LineShape lineShape = winformsMap1.TrackOverlay.TrackShapeLayer.InternalFeatures[0].GetShape() as LineShape; lineShape.Vertices.RemoveAt(lineShape.Vertices.Count - 1); winformsMap1.TrackOverlay.TrackShapeLayer.InternalFeatures[0].WellKnownBinary = lineShape.GetWellKnownBinary(); winformsMap1.TrackOverlay.TrackMode = TrackMode.None; winformsMap1.Refresh(); } private void btnResume_Click(object sender, EventArgs e) { winformsMap1.TrackOverlay.TrackMode = TrackMode.Line; Collection vertexes = (winformsMap1.TrackOverlay.TrackShapeLayer.InternalFeatures[0].GetShape() as LineShape).Vertices; for (int i = 0; i < vertexes.Count; i++) { (winformsMap1.TrackOverlay as MyInteractiveOverLay).MouseDown(new InteractionArguments() { WorldX = vertexes[i].X, WorldY = vertexes[i].Y }); } (winformsMap1.TrackOverlay as MyInteractiveOverLay).MouseDown(new InteractionArguments() { WorldX = vertexes[vertexes.Count - 1].X, WorldY = vertexes[vertexes.Count - 1].Y }); }