ThinkGeo.com    |     Documentation    |     Premium Support

TrackOverlay in V12

Hi,

when adding a TrackOverlay for doing some measuring, ms will place the features.
But when setting the TrackOverlay to nothing or a new instance of a TrackOverlay the Features are still displayed. And when moving the MapView these Features freeze and will be displayed at screen position. They do not move/scale like normal features on FeatureLayer.

The code is from V10 ported to V12 only DrawCore is chenged to DrawTileCore.

Any clou?

Regards Hardy

Hi
to show you the issue:
I’m adding a TrackInteractiveOverlay, draw some features like dimensions. Now stop tracking.
MapView doesn’t refresh and all drawn features keep on screen.
My code to stop the TrackingMode (worked under V10):

Private Sub StopTracking(Optional resetTrackLayer As Boolean = True)
    If resetTrackLayer Then
        theMap.TrackOverlay = New TrackInteractiveOverlay
    End If

    theMap.TrackOverlay.TrackMode = TrackMode.None

    Mode = UsingMode.TrackingStopped
    currentCommand = ""
End Sub

Some screens:

  1. when Tracking

  2. After Tracking, Canvas/Overlay will not refresh

Under V10 it’s working fine.

Regards
Hardy

Hartwig,
In mapsuite V12 you could use this way.

  map.TrackOverlay.TrackShapeLayer.InternalFeatures.Clear();
            map.TrackOverlay.Refresh();
            map.TrackOverlay.TrackMode = TrackMode.None;

Thanks

Frank

Hi Frank,
I have tested your code, but the map keeps the features.
I checked the debugger, the InternalFeatures will be cleared. But the geometries are still displayed.

Regards
Hardy

Hartwig,
I created a demo for you. Demo.zip (12.0 KB)

also I created a video to show you what it looks like.

Thanks

Frank