Community of VE/MapPoint Users and Developers
This is a discussion on [VB6 + MP2K] : how to compare 2 locations ??? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, I've got the following code : Code: Dim FR As MapPoint.FindResults Dim PP As MapPoint.Location Set FR = frmMAIN.ctrlMAPPOINT.ActiveMap.FindResults(ADR) ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
|
Maybe you need to convert the Location object in lat/long coordinates and then compare the lat/long coords. http://www.mp2kmag.com/articles.asp?ArticleID=9 Dominic Morin, MCP dominic.morin@optimarketing.com |
| ||||
| I've found a solution !
Hello, I think I found a solution. But I don't know if it's the best one ! I just wrote this code to complete my test : Code: Dim XX As Double
Dim YY As Double
Dim PP As MapPoint.Location
Dim FR As MapPoint.FindResults
Set FR = frmMAIN.ctrlMAPPOINT.ActiveMap.FindResults(ADR)
If FR.ResultsQuality = geoFirstResultGood Then
Set PP = FR.Item(1)
Call CalcPos(frmMAIN.ctrlMAPPOINT.ActiveMap, PP, XX, YY)
StrXX = Replace(Format$(XX, "0.0000"), ",", ".")
StrYY = Replace(Format$(YY, "0.0000"), ",", ".")
' Return TRUE here
Exit Function
ElseIf FR.ResultsQuality = geoAmbiguousResults Then
If FR.Item(1).StreetAddress = FR.Item(2).StreetAddress Then
Set PP = FR.Item(1)
Call CalcPos(frmMAIN.ctrlMAPPOINT.ActiveMap, PP, XX, YY)
StrXX = Replace(Format$(XX, "0.0000"), ",", ".")
StrYY = Replace(Format$(YY, "0.0000"), ",", ".")
' Return TRUE here too
Exit Function
End If
End If
I hope it can help other programmers ! Regards, Vincent BENNER |
![]() |
| Tags |
| compare, locations, mp2k, vb6 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How does MapPoint compare to other GIS products? | tacaldo | MapPoint 2006/2009 Discussion | 1 | 04-24-2005 08:43 AM |
| [VB6 + MP2K] : how to know that... | Vincent BENNER | MapPoint 2006/2009 Discussion | 2 | 11-21-2003 05:13 AM |
| I am considering using MP2K , i have lat/long data.... | Anonymous | MapPoint 2006/2009 Discussion | 2 | 08-21-2002 10:01 AM |
| With MP2K does anyone know how to programatically .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 07-29-2002 07:19 AM |
| Hi I am currenlty trying MP2K, I have one problem .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 12-19-2001 05:59 AM |