Hello,I have a map with some polygone features in an AXF-Layer. I want to use the FindNearestXY-Method to get the record of the nearest polygon when I click into the map. Here is what I am doing:Sub AddFeature
Dim dblx, dbly
dblX = Map.PointerX
dblY = Map.PointerY
If Not Map.SelectXY(dblx, dbly) Then
If MsgBox ("There is nothing. Go on?", 4) = 7 Then
Exit Sub
Else
Dim myRS
Set myRS = Map.Layers("A").Records
myRS.FindNearestXY dblx, dbly
MsgBox myRSSite.FindNearestXY(dblx, dbly)
[...]
Exit Sub
End If
End If
[...]
End Sub
The sub is called at the onpointerdown-event of the map-object. The FindNearestXY-Method dosen't cause an error, but it never finds a polygon. The result is always 0 - no matter where I click. Where is the mistake?Thanks for your help.Peter