simple url query to display adress
Hello everybody,
I'm writing a planning application, witch has a database of place the users may have to go to. This application offer the users the ability the view a place he has to go to on a map website.
Actually my app can do it by showing a link to an map website, for example mith gmap https://www.google.com/maps/place/[HOUSE_NUMBER]%20[STREET_NAME],[ZIP]+[CITY]
I don't like to promote GAFAMS and would prefer to promote openstreetmap by directing users to it instead of google.
I searched but didn't found a way to do exactly the same thing with OSM, just by generating an url containing the adresse of the place.
I know that i can build an URL to tell OSM to directly generate a map centred on a given point an a map by giving it it's coordinates. (for exemple: https://www.openstreetmap.org/?mlat=43.59021&mlon=1.40741#map=17/43.59021/1.40741), but i don't know the coordinates, and would like openstreetmap to search it from the adress
I know that i can build an URL telling openstreetmap to search for an adress like https://www.openstreetmap.org/search?query=[HOUSE_NUMBER]%20[STREET_NAME]%2C%20[CITY], but when i do that, openstreetmap will open a list of results, not show the most relevant one directly on the map.
Is there a way to build on URL to tell him "search for this adress, and show the most relevant result on the map putting a marker on it"?
Or do I need to write some "wrapper" PHP script taking address as argument, search the coordinates on nominatim, and returning a 302(redirect) to an URL telling openstreetmap to show these coordinates?
Thanks for help,
Julien Marin