Hi Ryan,
Here is a solution for you, first of all ,we need create a subclass of TrackInteractiveOverlay as following code:
public class NewTrackInteractiveOverlay : TrackInteractiveOverlay
{
public void Cancel()
{
TrackShapeLayer.InternalFeatures.RemoveAt(TrackShapeLayer.InternalFeatures.Count - 1);
Vertices.Clear();
TrackMode = TrackMode.None;
Refresh();
}
}
The Vertices is a protected property, we need to clear this collection to avoid the weird behavior in the subclass.
Then create an instance of the new overlay and replace the existing track overlay like following code in the map loaded event:
Map1.TrackOverlay = new NewTrackInteractiveOverlay();
Hope it helps, thanks,
Howard