prayagupa / travel-with-nodejs

playing with JS and nodeJS
0 stars 0 forks source link

resources for bus api #1

Open prayagupa opened 7 years ago

prayagupa commented 7 years ago

https://developers.google.com/transit/images/gtfs-feed-diagram.png https://developers.google.com/transit/gtfs/reference/

prayagupa commented 7 years ago

https://maps.googleapis.com/maps/api/directions/json?origin=2312%203rd%20Avenue,%20Seattle,%20WA&destination=Thorndyke%20Ave%20W%20Seattle,%20WA&key=XYZ

{
   "geocoded_waypoints" : [
      {
         "geocoder_status" : "OK",
         "place_id" : "ChIJQcAMIEwVkFQRQKMXjEgFnew",
         "types" : [ "premise" ]
      },
      {
         "geocoder_status" : "OK",
         "place_id" : "ChIJ-fAvFZ0VkFQRz3jcGfyXwJw",
         "types" : [ "route" ]
      }
   ],
   "routes" : [
      {
         "bounds" : {
            "northeast" : {
               "lat" : 47.642959,
               "lng" : -122.3453793
            },
            "southwest" : {
               "lat" : 47.6140403,
               "lng" : -122.3918858
            }
         },
         "copyrights" : "Map data ©2016 Google",
         "legs" : [
            {
               "distance" : {
                  "text" : "3.8 mi",
                  "value" : 6061
               },
               "duration" : {
                  "text" : "11 mins",
                  "value" : 678
               },
               "end_address" : "Thorndyke Ave W, Seattle, WA, USA",
               "end_location" : {
                  "lat" : 47.642959,
                  "lng" : -122.3846133
               },
               "start_address" : "2312 3rd Ave, Seattle, WA 98121, USA",
               "start_location" : {
                  "lat" : 47.6150482,
                  "lng" : -122.3453793
               },
               "steps" : [
                  {
                     "distance" : {
                        "text" : "0.1 mi",
                        "value" : 165
                     },
                     "duration" : {
                        "text" : "1 min",
                        "value" : 47
                     },
                     "end_location" : {
                        "lat" : 47.6160341,
                        "lng" : -122.3470308
                     },
                     "html_instructions" : "Head \u003cb\u003enorthwest\u003c/b\u003e on \u003cb\u003e3rd Ave\u003c/b\u003e toward \u003cb\u003eBattery St\u003c/b\u003e",
                     "polyline" : {
                        "points" : "ayraHrqviVg@`Ac@~@CDCFEF?@A@{@`BSd@Wd@"
                     },
                     "start_location" : {
                        "lat" : 47.6150482,
                        "lng" : -122.3453793
                     },
                     "travel_mode" : "DRIVING"
                  },
                  {
                     "distance" : {
                        "text" : "0.2 mi",
                        "value" : 293
                     },
                     "duration" : {
                        "text" : "2 mins",
                        "value" : 94
                     },
                     "end_location" : {
                        "lat" : 47.6140403,
                        "lng" : -122.349592
                     },
                     "html_instructions" : "Turn \u003cb\u003eleft\u003c/b\u003e onto \u003cb\u003eWall St\u003c/b\u003e",
                     "maneuver" : "turn-left",
                     "polyline" : {
                        "points" : "e_saH|{viVbArA`AvAbAvA~@pAbAxA~@nA"
                     },
                     "start_location" : {
                        "lat" : 47.6160341,
                        "lng" : -122.3470308
                     },
                     "travel_mode" : "DRIVING"
                  },
                  {
                     "distance" : {
                        "text" : "0.7 mi",
                        "value" : 1151
                     },
                     "duration" : {
                        "text" : "3 mins",
                        "value" : 152
                     },
                     "end_location" : {
                        "lat" : 47.6208462,
                        "lng" : -122.3611589
                     },
                     "html_instructions" : "Turn \u003cb\u003eright\u003c/b\u003e onto \u003cb\u003eWestern Ave\u003c/b\u003e",
                     "maneuver" : "turn-right",
                     "polyline" : {
                        "points" : "wrraH|kwiVoB|DiBvDqBxDoBbEc@`AuBfE{BpEWd@CH}A|Cw@~AKRUb@iAvBmBtD_@v@Q^m@lAO\\MXKTYn@QZ_@v@]l@"
                     },
                     "start_location" : {
                        "lat" : 47.6140403,
                        "lng" : -122.349592
                     },
                     "travel_mode" : "DRIVING"
                  },
                  {
                     "distance" : {
                        "text" : "1.0 mi",
                        "value" : 1553
                     },
                     "duration" : {
                        "text" : "2 mins",
                        "value" : 146
                     },
                     "end_location" : {
                        "lat" : 47.6314425,
                        "lng" : -122.374635
                     },
                     "html_instructions" : "Continue onto \u003cb\u003eElliott Ave W\u003c/b\u003e",
                     "polyline" : {
                        "points" : "i}saHftyiVWZu@fAiAtAm@z@{@bAq@v@}GlIu@~@OPORmAdBwApBoBvCiA`Bk@z@W`@u@fAU`@Yf@uBbDe@t@q@dAsBnCSVMPMNW`@e@n@c@j@OT{@hA]f@Y\\m@z@k@v@cArAo@|@QVSVk@v@KLOT"
                     },
                     "start_location" : {
                        "lat" : 47.6208462,
                        "lng" : -122.3611589
                     },
                     "travel_mode" : "DRIVING"
                  },
                  {
                     "distance" : {
                        "text" : "230 ft",
                        "value" : 70
                     },
                     "duration" : {
                        "text" : "1 min",
                        "value" : 7
                     },
                     "end_location" : {
                        "lat" : 47.6319301,
                        "lng" : -122.3741005
                     },
                     "html_instructions" : "Take the exit toward \u003cb\u003eW Garfield St\u003c/b\u003e/\u003cb\u003eMagnolia Bridge\u003c/b\u003e",
                     "maneuver" : "ramp-right",
                     "polyline" : {
                        "points" : "o_vaHnh|iVQ_@Uc@GKGGIGIEOCEA"
                     },
                     "start_location" : {
                        "lat" : 47.6314425,
                        "lng" : -122.374635
                     },
                     "travel_mode" : "DRIVING"
                  },
                  {
                     "distance" : {
                        "text" : "0.3 mi",
                        "value" : 528
                     },
                     "duration" : {
                        "text" : "1 min",
                        "value" : 39
                     },
                     "end_location" : {
                        "lat" : 47.63358650000001,
                        "lng" : -122.3794574
                     },
                     "html_instructions" : "Keep \u003cb\u003eright\u003c/b\u003e, follow signs for \u003cb\u003eMagnolia Bridge\u003c/b\u003e",
                     "maneuver" : "keep-right",
                     "polyline" : {
                        "points" : "qbvaHbe|iVIEIAG?E?GBQFYLo@Xg@Re@PUJSJEDKFCBGFEHILGPGTEPCPANA@?X?|AAj@?h@?pG@pG?`@A`@"
                     },
                     "start_location" : {
                        "lat" : 47.6319301,
                        "lng" : -122.3741005
                     },
                     "travel_mode" : "DRIVING"
                  },
                  {
                     "distance" : {
                        "text" : "0.6 mi",
                        "value" : 895
                     },
                     "duration" : {
                        "text" : "1 min",
                        "value" : 56
                     },
                     "end_location" : {
                        "lat" : 47.6323243,
                        "lng" : -122.3908622
                     },
                     "html_instructions" : "Keep \u003cb\u003eright\u003c/b\u003e at the fork and merge onto \u003cb\u003eW Garfield St\u003c/b\u003e/\u003cb\u003eMagnolia Bridge\u003c/b\u003e",
                     "maneuver" : "fork-right",
                     "polyline" : {
                        "points" : "}lvaHrf}iVBrA@JBHA|@?|@?`B?tBBhB@b@@P@HBR?l@@n@?nG?lG?tA@vAA`B@|ABv@Db@F\\Jd@Jd@JVLZVd@^j@R\\Tb@N^HZFPBPDRFh@BZDx@"
                     },
                     "start_location" : {
                        "lat" : 47.63358650000001,
                        "lng" : -122.3794574
                     },
                     "travel_mode" : "DRIVING"
                  },
                  {
                     "distance" : {
                        "text" : "253 ft",
                        "value" : 77
                     },
                     "duration" : {
                        "text" : "1 min",
                        "value" : 6
                     },
                     "end_location" : {
                        "lat" : 47.6323122,
                        "lng" : -122.3918858
                     },
                     "html_instructions" : "Continue onto \u003cb\u003eW Galer St\u003c/b\u003e",
                     "polyline" : {
                        "points" : "_evaHzm_jV@lE"
                     },
                     "start_location" : {
                        "lat" : 47.6323243,
                        "lng" : -122.3908622
                     },
                     "travel_mode" : "DRIVING"
                  },
                  {
                     "distance" : {
                        "text" : "0.8 mi",
                        "value" : 1329
                     },
                     "duration" : {
                        "text" : "2 mins",
                        "value" : 131
                     },
                     "end_location" : {
                        "lat" : 47.642959,
                        "lng" : -122.3846133
                     },
                     "html_instructions" : "Turn \u003cb\u003eright\u003c/b\u003e onto \u003cb\u003eThorndyke Ave W\u003c/b\u003e",
                     "maneuver" : "turn-right",
                     "polyline" : {
                        "points" : "}dvaHht_jV}FCsAAIAEACACCCAEEGKEKEGCEGIg@k@kAsAa@k@W]g@i@YWSOUOa@Wg@_@SOMUaAw@mAcAoCiBmCiBiAw@o@c@WQ{@k@a@Y{@k@u@g@}@g@Y@y@m@yAeA}@m@cBiAyCsB"
                     },
                     "start_location" : {
                        "lat" : 47.6323122,
                        "lng" : -122.3918858
                     },
                     "travel_mode" : "DRIVING"
                  }
               ],
               "traffic_speed_entry" : [],
               "via_waypoint" : []
            }
         ],
         "overview_polyline" : {
            "points" : "ayraHrqviV{AzCoAfCWd@bArAdCnDbCjD~@nAoB|D{EpJsCdGqFxKqDlHyEdJoBbEeAzB}@dBmAbBwBpCmBzBsJrL_JpMcA|AkAhBgFfIuG|IsIlL{ArBg@cAOSSMUESGM?cBr@wB|@]XOVOf@Mt@AlE?fRD~ABHA|@?~CB~EBt@D\\@zR@lJHzARbAV|@d@`Ar@hAd@bAZrAJdADx@@lEqIEOCQMWe@}CuD_AgAm@g@sBwAMUaAw@mAcAoCiBwEaDgAu@oEyC}@g@Y@sCsB{HkF"
         },
         "summary" : "Elliott Ave W",
         "warnings" : [],
         "waypoint_order" : []
      }
   ],
   "status" : "OK"
}