I would like to create a search in my app which acts like the map search in the Google Maps app.
I have creates an an auto complete text view which updates dynamically based on the results of the Geocoder.GetLocationByName()
Method.
However the results retrieved from this function are really bad and not at all consistent with the text I pass to it.
Is there a better method of doing this to achieve accurate results?
views:
27answers:
1
A:
So it's not the geosearch that's your problem, but the autocompletion, right? Well I assume you need the whole set of possible values in order to obtain a decent auto-completion. Another way would be to take apart the google javascript code that performs the auto-completion and talk to their servers, pretending you're typing into one of "their" fields. However, this isn't only probably against their terms of service but also a bit shaky because they might a) detect and prevent this or b) change their interface in the future.
Your best guess would be to get a list of all cities, streets, etc in question.
Nicolas78
2010-08-27 16:31:46
Thats a nice idea thogh I am sure as you said it probably is a breach of the terms.However Im not using the Web API i am using the android class GeoCoder.
Jason
2010-08-27 16:38:45
well I don't see how that would keep you from abusing another of their services ;)
Nicolas78
2010-08-27 16:59:41
hehe lol, it doesn't i guess. But I'm pretty sure there is a "proper" way of getting this achieved.
Jason
2010-08-27 18:13:09