I'm working on a project and I need to display points of interest that are saved in a database.
For the itinerary, I used leaflet routing machine and nominatim.
Now I need to display those points of interest that are 5km around the route.
I found in this link https://www.liedman.net/leaflet-routing-machine/api/#iroute the property "coordinates". It returns an array of all the waypoints used to display the itinerary.
How can I use this function to make a call on my database each kilometer to get my informations ?
I hope I was clear and thank you !