Skip to content

Latest commit

 

History

History
49 lines (39 loc) · 1.2 KB

README.md

File metadata and controls

49 lines (39 loc) · 1.2 KB

SG-Bus-Locator

A RESTful API that provides coordinates and bearing of public buses in Singapore

Coordinates of approaching buses in relation to bus stops along a route are collected and their bearings are calculated using the coordinates of the bus stops before and after the current position of those buses.

Usage

Request

https://sg-bus-locator.appspot.com/ ?busNo=179

Parameter Value
busNo 179 179A 199

Response

{
  "locations": [
    {
      "lat": "1.3525963333333333",
      "lng": "103.701145",
      "bearing": 322
    },
    {
      "lat": "1.3547865",
      "lng": "103.6980745",
      "bearing": 255
    },
    {
      "lat": "1.3508146666666667",
      "lng": "103.67834783333333",
      "bearing": 222
    }
  ]
}

Limitations

The API only provides information for 179, 179A and 199 as of now

Contributors

Credits