|     Blog    |     Wiki    |     Support

Clearing tracking layer

I am using the MapViews trackOverlay to draw a line — during this process it is possible for the user to cancel this operation prior to completing the action.

Code I am using to cancel the operation:

mv.TrackOverlay.Trackmode = TrackMode.None;

This clears the line from the screen, however if the user reselects the drawing tool again all the previous points show back up agan. This is similar to the issue in this topic:

What was mentioned there was to clear the track Overlay and re-calculate controls points. However I don’t see a mechanism to calculate the control points in the TrackOverlay or the TrackShapeLayer.

The same code sequence in WPF works as desired.

Hi Richard,

Please refer our sample here:

I tested it, the track works well in the sample follow your steps.

And for WPF I build a simple sample, which also works well.