Searching for addresses in the Resrobot Sok Resa API FindLocation method
Hello! I'm interested in implementing a service that would display public transport routes between two points and I'm looking into using API which description I've found here: http://www.trafiklab.se/api/resrobot-sok-resa
I want to make fields for user to enter From and To points with suggestions being shown to him while he types, as it is already done on this website: http://reseplanerare.resrobot.se/bin/query.exe/sn
The problem is that when I try to use FindLocation API method by trying to enter search query here http://console.apihq.com/resrobot-sok-resa I do not receive any addresses in response.
For example, If I type the search query "Herkulesgatan 24" on resrobot website http://reseplanerare.resrobot.se/bin/query.exe/sn I get suggestions like the following:
Herkulesgatan 24, Goteborg
Herkulesgatan 24, Katrineholm
Herkulesgatan 24, Ljungby
...
some other addresses here
...
Herculesgatan (Goteborg kn)
and when I call API method FindLocation with the same query, I get results like this:
Herkulesgatan (Göteborg kn)
Askersundsvägen 24 (Hallsberg kn)
Herrekvarnsvägen 24 (Skövde kn)
Rundeln 24 (Borås kn)
... and so on.
As you can see, the latter results are almost completely irrelevant. They do not contain any addresses. I'd like to know whether there is a resrobot.se API that will search for addresses too.
Hi!
Sorry to disapoint you, but address-search is not possible in the API. This i due to licenses.
You have to translate the address to a coordinate yourself (or by other API) before you send a request to Resrobot.
/ Lars
Thank you, Lars!
Could you please recommend a good API for implementing that addess suggestion feature?
Google Maps API is not suitable for my needs, since it requires to display requested data on a map.
Also, do you know if there is an API on Trafiklab except ResRobot, which allows to build public transport routes all over the Sweden?
I'm not aware of any API för addresses, you can check out http://apikatalogen.se/ to see if you find anything.
Resrobot is the only nationwide APi for journeyplaning. An other solution could be to use the GTFS-data and opentripplanner.org.