MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




FindAddressResults returns nothing

This is a discussion on FindAddressResults returns nothing within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hello, I have a problem with the function FindAddressResults in VB. I try to do this : Code: Dim findres ...


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

Today's Posts Twitter Feed 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 11-25-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
FindAddressResults returns nothing

Hello,

I have a problem with the function FindAddressResults in VB.

I try to do this :

Code:
Dim findres As FindResults
Dim mapobj As MapPoint.Map
Set findres = mapobj.FindAddressResults(, , , , , geoCountryx)
and I have this result :

Code:
findres.count = 0
What's the problem? How can I do to locate a pushpin in the centroïd of the country I choose?
Maybe it's a MapPoint problem?

Thanks in advance

mpGuest
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 11-25-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Hi,

I think this is a little too mutch asking from MapPoint finding center of countries does not work as also not center of earth or universe

I think in practice most people know more or less whar earth is (or their country), so the search has to be a bid more detail

rgds, Wilfried
http://www.mestdagh.biz
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 11-26-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Hello,

Thanks for your response...
My question was not very explicit, so I give some explanations :
In MapPoint application, I have some records that the application localize correctly, finding result by country. So the pushpin is in the middle of the country.
I try to do this with VB. I have 2 methods :
- I use the function queryAllRecords to have a dataset. Then I study each record with the function IsMatching and CallMatchMethod
--> It returns a result and the pushpin is located in the middle of the country
- I use the function FindAddressResults (cf. previous post) and the result is findresult.count = 0
--> No result found
Example of the record
fields : name,address,city,postal,country
record : myname , , , , geoCountryUkraine

So I want to know :
- Is there a problem in my method?
- Is there a problem with FindAddressResult method?
- How can I do to have all records localized (MapPoint application do that, so is ther a problem in VB?)?

Thanks a lot for responses

mpGuest
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 11-26-2004
John Meyer's Avatar
Senior Member
Blue Belt
 
Join Date: Jul 2002
Posts: 479
You may want to post the function that is not working so we can have a look. Make your example as complete as possible then maybe someone can see what the problem is.
__________________
John
http://www.support-pc.com

Order MapPoint 2006 Here
https://secure.mp2kmag.com/?refer=support-PC
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 11-27-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Hi,

FindAddressResults dont give a result if there is no match.

But I dont understeand exacly what you try. Probably because my native language is not English spoken Like John already mentioned, with a piece of code it can mabe cleared out better.

rgds, Wilfried
http://www.mestdagh.biz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 12-07-2004
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Thanks for your responses.
I'll try to explain my problem but it's not very easy, english is not my native language

I want to localize some data, which contains address, city, region, postal1 and country. But some fields can be empty so I have to do some tests.

Some examples of data :
fields : name - address - city - region - postal1 - country
name1 - rue du lac - - - - france
name2 - - - - - ukraine

I have an excel file, I create a recordset and I read I line by line :

Code:
Dim findres As FindResults
Set findres = mapobj.FindAddressResults(address, city, , region, postal1, country)
If addr1 <> "" And isResultCorrect(findres) <> 0 Then  'function isResultCorrect search the findres.count and item
    ' OK : address
    Set pushp = m_mapobj.AddPushpin(findres.Item(1), name)
    pushp.Note = name
    pushp.MoveTo dataset
    matchmeth = geoByStreetAddress
    pushp.Symbol = 30
Else ' NOK by address --> search again : city
    Set findres = m_mapobj.FindAddressResults(, city, , region, , country)
    If isResultCorrect(findres, dept, country) <> 0 Then
        ' OK : city without postal1
        Set pushp = m_mapobj.AddPushpin(findres.Item(isResultCorrect(findres, dept, country)), name)
        pushp.Note = name
        pushp.MoveTo m_dataset
        matchmeth = geoByCity
        pushp.Symbol = 28
    Else ' NOK by city --> search again : postal1
        Set findres = m_mapobj.FindAddressResults(, , , region, postal1, country)
        If isResultCorrect(findres, dept, m_country) <> 0 Then
            ' OK : postal1
            Set pushp = m_mapobj.AddPushpin(findres.Item(1), name)
            pushp.Note = name
            pushp.MoveTo m_dataset
            pushp.Symbol = 29
            matchmeth = geoByPostal1
        Else ' NOK by postal1 --> search again : country
            Set findres = m_mapobj.FindAddressResults(, , , , , country)
            If isResultCorrect(findres) <> 0 Then
                ' OK : country
                Set pushp = m_mapobj.AddPushpin(findres.Item(1), name)
                pushp.Note = name
                pushp.MoveTo m_dataset
                pushp.Symbol = 29
                matchmeth = geoByCountry
            Else
                matchmeth = -1
                Debug.Assert 0
            End If
        End If
    End If
End If
There is a problem whith the 2 records in example.
MapPoint localize them byCountry (at the centroïd of france and ukraine).
But the function FindAddressResults in VB can't localize then by country, so I can see them in the map.

And when I use the property MatchingMethod and the CallMatchMethod, the record is localized by country.

So is there a problem with the function FindAddressResults? Or in the vb code I use?

Thanks a lot for your responses, I don't know how to resolve my problem.

mpGuest
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
findaddressresults, returns


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
Is MapPoint or something else best to map election returns? jhbroussard MapPoint 2006/2009 Discussion 2 08-24-2005 07:44 AM
How to get the Best Matched Address from FindAddressResults. gvkreddy MapPoint 2006/2009 Discussion 8 01-10-2005 05:05 AM
Problem with FindAddressResults Anonymous MapPoint 2006/2009 Discussion 1 10-01-2004 09:04 AM
FindAddressResults not always working? Anonymous MapPoint 2006/2009 Discussion 1 09-10-2003 05:25 AM
Need help about the FindAddressResults Anonymous MapPoint 2006/2009 Discussion 3 08-21-2002 07:51 PM


All times are GMT -5. The time now is 11:38 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Thassos Holidays
Visit an unspoilt and beautiful Greek island with Thassos holidays available through UlookUbook.



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 55 56 57 58 59