Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.17 KB

README.md

File metadata and controls

21 lines (14 loc) · 1.17 KB

go-api-bing

Go: API that handles requests for isochrones from Bing Maps API. The returned JSON is ready for use in LeafletJS.com

  • This was written for using in a different project and the functionality is narrow in scope.
  • The API returns JSON that make up the verticies of the isochrone (polygon).

Usage: http://myserver:8002/v1/bing-isochrone/{lng}/{lat}/{time}/{key}

  • lng => longitude (decimal degrees)
  • lat => latitude (decimal degrees)
  • time => drive time polygon in seconds
  • key => Bing key

Example API Call & Return Value:

  • http://myserver:8002/v1/bing-isochrone/-95.9659399015996/36.1342231/60/my_bing_key

  • {"bing":"[[[36.13464,-95.966358],[36.13464,-95.966134],[36.13464,-95.965909],[36.13464,-95.965685],[36.134635,-95.96546],[36.13463,-95.965235],[36.134625,-95.965011],[36.134613,-95.964786],[36.13528,-95.964562],[36.13296,-95.964562],[36.13296,-95.964786],[36.13296,-95.965011],[36.132958,-95.965235],[36.132955,-95.96546],[36.132953,-95.965685],[36.132967,-95.965909],[36.13404,-95.966134],[36.13366,-95.966358],[36.13464,-95.966358]]]"}

  • On error returns: {"bing":"msg"}

  • msg = Bing Maps API call error message