Dim dist As Double
dist = Map1.Distance(X1, Y1, X2, Y2)
pt.Set X1, Y1
Set curFeatures = SearchLayer.SearchWithinDistance(pt, dist, miUnitMile, searchType)
For Each obj In curFeatures
searchResultList.AddItem obj.Name & "id:" & obj.FeatureID
Next
If add2selectionMenuItem.Checked = True Then
SearchLayer.Selection.Replace curFeatures
End If
Set pt = Nothing
Set curFeatures = Nothing
Set obj = Nothing
请大神告诉我下这段代码是什么意思?应该是做距离测距的,但是详细意思不懂,而且并不能实现距离测距的相关功能
dist = Map1.Distance(X1, Y1, X2, Y2)
pt.Set X1, Y1
Set curFeatures = SearchLayer.SearchWithinDistance(pt, dist, miUnitMile, searchType)
For Each obj In curFeatures
searchResultList.AddItem obj.Name & "id:" & obj.FeatureID
Next
If add2selectionMenuItem.Checked = True Then
SearchLayer.Selection.Replace curFeatures
End If
Set pt = Nothing
Set curFeatures = Nothing
Set obj = Nothing
请大神告诉我下这段代码是什么意思?应该是做距离测距的,但是详细意思不懂,而且并不能实现距离测距的相关功能