Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an input for location and country code #119

Closed
Haves1001 opened this issue Oct 27, 2015 · 4 comments
Closed

Provide an input for location and country code #119

Haves1001 opened this issue Oct 27, 2015 · 4 comments

Comments

@Haves1001
Copy link

At the moment I would have to create an virtual Nominatim answer to fill var oh = new opening_hours('We 12:00-14:00', nominatiomJSON, mode); with a correct nominatiomJSON.

Ist there a way to create a new object without building an nominatim answer (as I don't use a direct nominatim call)?

Otherwise I would like to propose (and help) to build an interface for a generic input.

@ypid
Copy link
Member

ypid commented Oct 27, 2015

I am not quite following. You can pass an empty object if you don’t have a nominatiomJSON on hand (note the details in the README). Can you be a bit more specific?

@Haves1001
Copy link
Author

Yes indeed, this is possible, but in this case I probably won't get the correct opening hours or the state of the object.
As I have all the needed information on hand (like lat, lon, country code etc.) I want to provide them when creating a new object. So at the moment the only way I could go is to generate an object which contains those information and I'm looking for a better way. Otherwise it probably should be statet in the readme field I have to generate to get a valid nominatim json.

@ypid
Copy link
Member

ypid commented Oct 27, 2015

If you have the needed information already you can just pass it in in the Nominatim JSON format? I think this is already good enough. The library is written to check for a valid Nominatim object where possible so you can pass an incomplete Nominatim JSON and the lib will complain when there is something missing (maybe future releases will use more information from Nominatim. Unlikely but possible)

@ypid ypid added the question label Nov 20, 2015
@ypid
Copy link
Member

ypid commented Nov 20, 2015

I am closing this issue. Feel free to reopen/replay if needed.

@ypid ypid closed this as completed Nov 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants