Hi Ben,
It might be connected to my own code, can you check?
I added this to show the length of the line during drawing.
The user picks a point and starts moving the mouse. While moving the mouse, the length of the line is projected. When the user double-clicks this temporary length is deleted.
' Add event handlers for tracking line measurements
AddHandler Me.TrackOverlay.MouseMoved, AddressOf TrackOverlay_MouseMoved
AddHandler Me.TrackOverlay.TrackEnded, AddressOf TrackOverlay_TrackEnded
' Event handler for real-time line measurement display
Private Sub TrackOverlay_MouseMoved(sender As Object, e As MouseMovedTrackInteractiveOverlayEventArgs)
' Show label in real-time while drawing lines
If TypeOf e.AffectedFeature.GetShape() Is LineBaseShape AndAlso Me.TrackOverlay.TrackMode = TrackMode.Line Then
Dim line As LineBaseShape = CType(e.AffectedFeature.GetShape(), LineBaseShape)
' Use a temporary label ID for the line being drawn
Dim tempLabelId As String = "temp_line_label"
' Remove existing temporary label
If MapLabelLayer.InternalFeatures.Contains(tempLabelId) Then
MapLabelLayer.InternalFeatures.Remove(tempLabelId)
End If
' Add new temporary label
AddLineLengthLabelWithId(tempLabelId, line)
' Refresh the overlay to show the label
Me.RefreshAsync(MapLabelOverlay)
End If
End Sub