Hello,
I have already seen the examples on how to snap to vertex and to layer. I am trying to implement a functionality that when you move the mouse over features you can snap to the vertex and the line with a tolerance. After i do the calculations i cant move the mouse coursor. I have used the following code.
Protected Overrides Function MouseMoveCore(ByVal interactionArguments As ThinkGeo.MapSuite.DesktopEdition.InteractionArguments) As ThinkGeo.MapSuite.DesktopEdition.InteractiveResult
Dim snapPointShape As PointShape = Nothing
If m_toleranceType = ToleranceCoordinates.Screen Then
snapPointShape = FindNearestSnappingPointPixel(New PointShape(interactionArguments.WorldX, interactionArguments.WorldY), interactionArguments.CurrentExtent, interactionArguments.MapWidth, interactionArguments.MapHeight)
Else
snapPointShape = FindNearestSnappingPoint(New PointShape(interactionArguments.WorldX, interactionArguments.WorldY))
End If
Dim oInteractionArguments As New InteractionArguments()
If snapPointShape IsNot Nothing Then
If m_toleranceType = ToleranceCoordinates.Screen Then
Dim oScreenPoint As ScreenPointF
oScreenPoint = ExtentHelper.ToScreenCoordinate(interactionArguments.CurrentExtent, snapPointShape, interactionArguments.MapWidth, interactionArguments.MapHeight)
oInteractionArguments.ScreenX = oScreenPoint.X
oInteractionArguments.ScreenY = oScreenPoint.Y
End If
End If
'**********************************************************************************
After the calculations are done i should move the mouse coursor. Dont really know
what does the following line, but i think that it should do the job
'**********************************************************************************
Return MyBase.MouseMoveCore(oInteractionArguments)
End Function