hove-io / navitia

The open source software to build cool stuff with locomotion
https://www.navitia.io/
GNU Affero General Public License v3.0
434 stars 126 forks source link

Nearby search doesn't work #812

Closed stifoon closed 7 years ago

stifoon commented 9 years ago

Hi! One question. The doc page (https://github.com/CanalTP/navitia/blob/dev/documentation/navitia.io/source/integration.rst) states: get /coverage/lon;lat/collection_name > Collection of objects of a region and Collections are

However, I cannot seem to be able to get e.g. https://api.navitia.io/v1/coverage/2.6667;48.7667/stop_areas or https://api.navitia.io/v1/coverage/2.6667;48.7667/stop_points to work. I get the error: "No region nor coordinates given" It should also work with https://api.navitia.io/v1/coverage/2.6667;48.7667/lines.

In the meanwhile, i can use https://api.navitia.io/v1/coverage/2.6667;48.7667/places_nearby?type[]=stop_area&distance=10000 but it is less graceful :D

stifoon commented 8 years ago

Documentation has been rewriten, but the issue is still there http://canaltp.github.io/navitia/#public-transportation-objects-exploration

kofronpi commented 8 years ago

I'm having a similar problem with HATEOAS links given as a response which are wrong when I query something as https://api.navitia.io/v1/coverage/2.564097;50.296507

I can't follow links, it throws this kind of errors:

{
  "message": "No region nor coordinates given. You have requested this URI [/v1/coverage/2.564097;50.296507/networks] but did you mean /v1/coverage/<region:region>/networks ?",
  "error": {
    "message": "No region nor coordinates given",
    "id": "unknown_object"
  }
}

Something seems off, or the documentation is not up to date ? http://doc.navitia.io/#route-schedules-and-time-tables

stifoon commented 8 years ago

Could you please send me the original request which generate the wrong Hateoas link?

I will ask to fix this issue, as I'm not the lonely concerned guy ;)

kofronpi commented 8 years ago

@stifoon

curl -X GET -H "Authorization: Basic your_token==" -H "Cache-Control: no-cache" -H "Postman-Token: xxxxx" "https://api.navitia.io/v1/coverage/2.564097;50.296507"

(code generated by Postman as you can see)

stifoon commented 7 years ago

Every case are working since places_nearby corrections, few months ago