Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

adds support for lookup API with testing #20

Merged
merged 2 commits into from
Sep 9, 2015

Conversation

sunil3590
Copy link
Contributor

Adds support to perform address lookup. This API has the advantage that we can lookup multiple OSM IDs in one call and also, importance value can be obtained.

http://wiki.openstreetmap.org/wiki/Nominatim#Address_lookup

@sunil3590
Copy link
Contributor Author

Lookup API can handle up to 50 OSM items. Added a case to handle and throw an exception for requests over 50 items.

@jeremiehuchet jeremiehuchet merged commit 0e33718 into jeremiehuchet:master Sep 9, 2015
@jeremiehuchet
Copy link
Owner

Hi @sunil3590,

First of all: thanks for your work !

I merged your PR. I reviewed the Exception thrown when user give more than 50 osm_type. In order to keep the library as simple as possible, we shouldn't implement validation of the request parameters in the client. It's a server-side issue.

I assume we have a communication failure if we send to the server a query it can't understand neither handle. So the NominatimResponseHandler will throw an IOException on any HTTP response code >= 400.
This way we avoid implementing parameter validation in the NominatimClient implementation.

@sunil3590
Copy link
Contributor Author

Hi @jeremiehuchet

That's a good way to deal with the error. Great.

Do you have plans of making a new maven release for this update?

@jeremiehuchet
Copy link
Owner

I just released a new version 3.2

@sunil3590
Copy link
Contributor Author

Thank you @jeremiehuchet

A maven release for the sake of completeness!
http://mvnrepository.com/artifact/fr.dudie/nominatim-api

Would love to use a maven release in my project.

@jeremiehuchet
Copy link
Owner

mvnrepository isn't up-to-date, use search.maven.org

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants