FindPlaceResults, I need Help!!!

lucaceleghin
05-22-2005, 05:08 AM
Hello,
I've just a little problem with find methods. I've got Mappoint 2004 Italian versione for Europe, but it seems to have some problem when I use the find method. For example I use this simple code in VB6:

Private Sub Form_Load()
Dim objApp As New MapPoint.Application
Dim objFindResults As MapPoint.FindResults
Set objFindResults = objApp.ActiveMap.FindResults("Parigi, Francia")
End Sub

But objfindresults is empty: It doesn't find anything!!!!
I've tried other method Find PlaceResults FindAddressResuls etc. but the results is the same. There seems to be a problem with language...

Does anyone ha encountered a similar problem?
Thank you

Wilfried
05-23-2005, 05:42 AM
Hi,

What happens if you try to find the same in the mappoint application itself ?

lucaceleghin
05-23-2005, 07:21 AM
Hi Wilfried, thank you for answering.
It returns 27 hints (the results are correct)! So the application run correctly... but when I try to use the findResults, or findplaceresults or findaddressresults It gives no answer!
The same happens when I try to look for "Londra, Regno Unito" or something similar: no answer!
I hope you could help me...
thank you
bye

Wilfried
05-24-2005, 01:10 PM
Hi,

I see following in your code (sorry I did not see it before):

Dim objApp As New MapPoint.Application
Dim objFindResults As MapPoint.FindResults
Set objFindResults = objApp.ActiveMap.FindResults("Parigi, Francia")


But you dont load a map first ! Please check objFindResulsts, it is probalby Nothing ! So you first have to load a map before you can access ActiveMap. Strange, I should expect there would be an exception error !

lucaceleghin
05-25-2005, 12:54 AM
Hi Wilfried, thank you for answering,
Just to say that I found the following code in Mappoint 2004 help:

Dim objApp As New MapPoint.Application
Dim objFindResults As MapPoint.FindResults
Set objFindResults = objApp.ActiveMap.FindResults("Parigi, Francia")

The object objfindResults is not Nothing and more, the result is that objFindResults.count=0.

When I use the same procedue for other city for example "Roma" or other italian cities, objfindresults contains many records... so I think that the code is right. I think it should be a problem with language but I don't know what....

Wilfried
05-25-2005, 02:47 AM
Hi,

Yes then the code must be right, sorry for misleading. Further I have no idea, I have english europe version, but I tryed same as you with 0 results, but also not in the map itself. Then I tryed this in map and in code and I got 46 and 72 results:

FindResults results = MP.ActiveMap.FindResults("Parigi, Italy");
Console.WriteLine(results.Count.ToString());
results = MP.ActiveMap.FindResults("Francia, Italy");
Console.WriteLine(results.Count.ToString());

MartinH
07-24-2006, 04:11 AM
Hi lucaceleghin,
i have the german version of MapPoint and I have the same problem as you have. At MapPoint it self i get results, but in code I don't. But some searchrequests work, for example if I search for "München, Deutschland" it works and also "Munich, Germany" works.
I also guess that this problem is involved with the language. I'm sorry, I can't help you, but i can tell you, you're not the only one :-)

Fabio
07-27-2006, 03:33 AM
Hi lucaceleghin,

If I correctly understand in your case you are searching not for an address but for a place.
So in this case it should be more correct try with:

FindPlaceResults("Parigi, Francia")

Bye!!

Fabio
07-27-2006, 04:56 AM
I'm sorry I didn't saw that you already tried with FindPlaceResult function.

It appears that search have quite correct results only when country is in english like "Parigi, France" or "Londra, United Kingdom".

May be MapPoint 2006 EU don't have this problems. We hope!

Byeee

 
Web mp2kmag.com
mapforums.com