API calls and prox-info

Started by Aegidian, Dec 28, 2019, 04:29 PM

Previous topic - Next topic

Aegidian

I'm fairly au fait with calls to the Canalplan api.cgi with these four modes: 'nearest_place', 'place', 'plan', and 'waterway'. Now I'm looking for a call which will return (in JSON) the equivalent of the prox-info-2 div, ie. the id's of the places immediately next in each direction along the waterways from the place requested.

I don't really want to have to scrape the HTML for a place to get that info.

Context: I'm attempting to construct a webpage that can track my geolocation progress from place to place and return a list of places visited.

Any and all help with other calls to the API would be greatly appreciated (I'm probably only touching the surface of what's possible.)

Stephen Atty

So basically if :

placex-placey-placez

and you are at at location that basically equals placey you'd like it to return details on placex and placez.  If it was a junction would you want all the places it connects to?

Aegidian

That'd be right. Though eventually I downloaded the database and got to sorting out the solution that way. (Adding another year to the discussion...)