VB 6.0中的Microsoft MapPoint 18.0对象库

时间:2013-03-07 22:32:31

标签: dll vb6 mappoint

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

1 个答案:

答案 0 :(得分: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版本。