mmarcon / jhere

jHERE - Maps made easy
MIT License
255 stars 51 forks source link

Search cities matching a given criteria #25

Closed lucastorri closed 10 years ago

lucastorri commented 10 years ago

Hi,

a while ago I needed text completion for a field where user would input a city name. I didn't find anything so simple on HERE's API and then decided to implement it myself.

I formatted the code to follow the standards of the project and was wondering if it would be an interesting extension. What do you think?

What it does is to do a basic search with the given query, filter for the "city-town-village" category ID and, finally, geocode each filtered entry.

Something interesting that could be added is the option to search for any kind of place with a given category ID.

Thanks

mmarcon commented 10 years ago

Hi Lucas, thanks a lot for your extension.

From quickly browsing through the files it looks pretty good. I'll have a better look in the next few days and if everything looks fine I will merge it.

lucastorri commented 10 years ago

That's great, please let me know if I can do any improvements. If needed, I'm sitting on Invalidenstr 117 :)

mmarcon commented 10 years ago

Let's meet for lunch one of these days then.

axeff commented 10 years ago

I've had a look at your implementation and realized that the progress takes a while when it comes to geocode the lon/lat for the found options since one request is made for each option. In your example, when you try: "Neustadt" as query, it returns a couple of options.

Maybe this could be helpful though: http://developer.here.com/rest-apis/documentation/geocoder/topics/resource-type-response-multi.html