MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




[VB6 + MP2K] : how to compare 2 locations ???

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) ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-11-2003
Vincent BENNER's Avatar
Member
Yellow Belt
 
Join Date: Sep 2002
Posts: 41
[VB6 + MP2K] : how to compare 2 locations ???

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)
    If FR.ResultQuality = 2 Then

        ' I need to compare FR.Item(1) and FR.Item(2)

    End If
I'd like to know if the first Item is the same than the second one !

Is this possible ???

King regards,

Vincent BENNER
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 12-11-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 12-12-2003
Vincent BENNER's Avatar
Member
Yellow Belt
 
Join Date: Sep 2002
Posts: 41
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
' Return FALSE here or make other tests...



I hope it can help other programmers !

Regards,

Vincent BENNER
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
compare, locations, mp2k, vb6


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 12:05 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54