Skip to content
sluukkonen edited this page Aug 30, 2012 · 9 revisions

This doc specifies the API between our client and our server:

General

  • Whenever coordinates are transmitted, they are expected to be in the WGS84 coordinate system

Find routes

Request

from and to may be addresses / place names in which case geocoding will be attempted, or coordinates formatted as lon,lat

GET /routes?from=Kuortaneenkatu%202&to=Jakomäki

Response

200 Success

See the Reittiopas API response

400 Bad request

Returned when geocoding has failed

{
  "from": false, // This was bad
  "to": true // This was OK
}

500 Internal server error

When something else went wrong

Get address by coordinates (reverse geocode)

Request

Coordinates in WGS84 longitude,latitude

GET /address?coords=24.941,60.171

Response

200 Success

The name and location (longitude,latitude) of the nearest known address / location.

{
  "name":"Asema-aukio 1, Helsinki",
  "coords":"24.941455102299,60.171107393876"
}

400 Bad Request

Returned when reverse geocoding failed