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

API can use ?around=<lat>,<lon> just like website, missing in documentation #179

Closed
kmpoppe opened this issue Sep 19, 2024 · 6 comments
Closed

Comments

@kmpoppe
Copy link
Contributor

kmpoppe commented Sep 19, 2024

In streetcomplete/StreetComplete#1798, @westnordost thought about showing local events to users, if osmcal would issue lat/lon of an event (which it does), and I was wondering if the "Nearby" function from the website (?around=<lat>,<lon>) worked with the API.

It works - showing the Kieler Linux Tage this weekend - yet the API documentation only says ?in=<iso3166-1 alpha-2> was supported.

Is there a reason for omitting this parameter? Is it a fluke that it's working and not supposed to do?

@thomersch
Copy link
Owner

Moin!

All the event lists use the same query builder, and since we offer a nearby filter on the main page, the JSON and RSS feeds inherit the same functionality.

As to why it’s not documented, I commented on that before: #67 (comment)

@kmpoppe
Copy link
Contributor Author

kmpoppe commented Sep 19, 2024

Moin Thomas!

Thanks for pointing at the comment. I see where that's coming from and shall see if SC's option might be to figure out the around part in-app and thus only getting all the events and only show those matching.

@kmpoppe kmpoppe closed this as completed Sep 19, 2024
@thomersch
Copy link
Owner

Feel free to use the around parameter, experience shows that the load is very manageable. If you could limit the decimal places of the coordinates that would be great, maybe to two or three. This allows for easier caching and preserves the user's privacy.

@kmpoppe
Copy link
Contributor Author

kmpoppe commented Sep 19, 2024

Thanks :) Does around only take lat/lon or is there a ",radius" possibility like overpass can search objects around a radius of a position?

@thomersch
Copy link
Owner

It's hardcoded to a 50km radius at the moment

@kmpoppe
Copy link
Contributor Author

kmpoppe commented Sep 19, 2024

Would you be open to parameterize that? I could try my hands on that ;)

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