Search Query URL Parameters (useful for search bangs)
How can I suggest a new bang to add osmapp to search engines? Which url do I need to use such that it sends the right request? I'd suggest the bang osmapp.
e.g. for duckduckgo https://duckduckgo.com/bangs
Thank you!
I would love to say how, but first we would have to develop it. Right now there is no way how to link externaly to a prefilled search box. It could be easy to implement it, i may try it if i find time.
btw, under the hood we are using https://photon.komoot.io/ free OSM geocoder. You could probably link the bang to https://photon.komoot.io/api/?q=berlin, but i guess that is not what you want :)
I will add this when I work on the search again
This should also work for categories. For example
https://osmapp.org?q=amenity/internet_cafe
and it should be possible to combine it with coordinates.
Basically we just have to insert the value from the query parameter into the search box and trigger the search, right?
I also might be able to look into this. Let me know if anybody is working on this.
EDIT: I tried a bit, but did not succeed ... I was able to pre-fill the search box.
But we also should open the search popup. Also a second parameter would be nice which works like the old "I am feeling lucky" button of google and "clicks" the first result? This would be helpful for category queries.
@amenk - yes, that is exactly what I also had in mind.
But apart from SearchBox needed some refactorings, the synchronization of Autocomplete input with URL is quite tricky 😃 though - I have managed to do it for the new Directions inputs (#515), so would like to migrated it for search as well.
@zbycz yes; I also figured, that this is quite tricky and will leave it up to you, to port the direction inputs to the search as well.