0

我在 VB 6.0 中使用 Microsoft MapPoint 18.0 对象库作为参考。创建对象并传递地址参数后,程序不会返回任何有效地址的任何纬度、经度数据。想知道这是否是 VB 6.0 的 dll 问题?

4

1 回答 1

3

我刚刚使用参考“Microsoft MapPoint 19.0 对象库(北美)”进行了快速测试,以下代码对我有用:

Private Sub Command1_Click()
Dim mmpApp As MapPoint.Application, mmpMap As MapPoint.Map, _
        mmpFindResults As MapPoint.FindResults

Set mmpApp = New MapPoint.Application
Set mmpMap = mmpApp.ActiveMap

Set mmpFindResults = mmpMap.FindAddressResults( _
        "24 Sussex Drive", _
        "Ottawa", _
        "", _
        "ON", _
        "", _
        MapPoint.GeoCountry.geoCountryCanada)

If mmpFindResults.ResultsQuality = geoFirstResultGood Then
    MsgBox "First result returned: (" & mmpFindResults(1).Latitude & "," & _
            mmpFindResults(1).Longitude & ")"
Else
    MsgBox "The search returned poor, ambiguous, or non-existent results"
End If

Set mmpFindResults = Nothing
Set mmpMap = Nothing
Set mmpApp = Nothing
End Sub

我希望它也可以在 18.0 版本下工作。

于 2013-03-08T13:06:04.287 回答