Community of MapPoint and Virtual Earth Users and Developers
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 ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| FindAddressResults returns nothing 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) Code: findres.count = 0 Maybe it's a MapPoint problem? Thanks in advance mpGuest |
| |||
|
Hi, I think this is a little too mutch asking from MapPoint 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 |
| |||
|
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 |
| ||||
|
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 |
| |||
|
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 rgds, Wilfried http://www.mestdagh.biz |
| |||
|
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
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 |
![]() |
| Tags |
| findaddressresults, returns |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |
Thassos Holidays
Visit an unspoilt and beautiful Greek island with Thassos holidays available through UlookUbook.