Skip to content

Instantly share code, notes, and snippets.

@fabriziomoscon
Created July 13, 2015 11:51
Show Gist options
  • Save fabriziomoscon/7400963abe16f82f9ac6 to your computer and use it in GitHub Desktop.
Save fabriziomoscon/7400963abe16f82f9ac6 to your computer and use it in GitHub Desktop.
duration overflow
{
origin: [
51.49451939999999,
-0.1823885
],
destination: {
"longitude": -0.4026852,
"latitude": 51.5526
},
result: {
"routes": [
{
"bounds": {
"northeast": {
"lat": 51.5571109,
"lng": -0.1825667
},
"southwest": {
"lat": 51.494324,
"lng": -0.4040205
}
},
"copyrights": "Map data ©2015 Google",
"legs": [
{
"arrival_time": {
"text": "1:30pm",
"time_zone": "Europe/London",
"value": 1436617848
},
"departure_time": {
"text": "1:36pm",
"time_zone": "Europe/London",
"value": 1436618161
},
"distance": {
"text": "19.0 km",
"value": 18992
},
"duration": "[Circular ~.duration]",
"end_address": "A4180, Ruislip, Greater London HA4 6RD, UK",
"end_location": {
"lat": 51.5525406,
"lng": -0.4028643
},
"start_address": "Gloucester Road Tube Station, 138 Gloucester Road, Kensington, London SW7 4, UK",
"start_location": {
"lat": 51.4944821,
"lng": -0.1825667
},
"steps": [
{
"distance": {
"text": "62 m",
"value": 62
},
"duration": {
"text": "1 min",
"value": 56
},
"end_location": {
"lat": 51.494324,
"lng": -0.183181
},
"html_instructions": "Walk to Gloucester Road",
"polyline": {
"points": "oohyH`tb@[L@Hx@`B"
},
"start_location": {
"lat": 51.4944821,
"lng": -0.1825667
},
"steps": [
{
"distance": {
"text": "16 m",
"value": 16
},
"duration": {
"text": "1 min",
"value": 10
},
"end_location": {
"lat": 51.494606,
"lng": -0.182694
},
"html_instructions": "Head <b>north</b> on <b>Gloucester Rd</b> toward <b>Cromwell Rd/A4</b>",
"polyline": {
"points": "oohyH`tb@[L@H"
},
"start_location": {
"lat": 51.4944821,
"lng": -0.1825667
},
"travel_mode": "WALKING"
},
{
"distance": {
"text": "46 m",
"value": 46
},
"duration": {
"text": "1 min",
"value": 46
},
"end_location": {
"lat": 51.494324,
"lng": -0.183181
},
"polyline": {
"points": "iphyHxtb@x@`B"
},
"start_location": {
"lat": 51.494606,
"lng": -0.182694
},
"travel_mode": "WALKING"
}
],
"travel_mode": "WALKING"
},
{
"distance": {
"text": "1.9 km",
"value": 1930
},
"duration": {
"text": "5 mins",
"value": 300
},
"end_location": {
"lat": 51.508747,
"lng": -0.196009
},
"html_instructions": "Subway towards Edgware Road",
"polyline": {
"points": "onhyHzwb@SIq@dFu@nEKt@Mp@Oj@Sl@Sh@Yp@Yb@[f@W^YZWVsKnJ[VUXU`@gArBOZQTY`@]^oBtBsBpByAvA{@t@eAt@cDhCKFM@MAMCI?K@_GzAe[hIi@J?@"
},
"start_location": {
"lat": 51.494324,
"lng": -0.183181
},
"transit_details": {
"arrival_stop": {
"location": {
"lat": 51.508747,
"lng": -0.196009
},
"name": "Notting Hill Gate"
},
"arrival_time": {
"text": "12:57pm",
"time_zone": "Europe/London",
"value": 1436615820
},
"departure_stop": {
"location": {
"lat": 51.494324,
"lng": -0.183181
},
"name": "Gloucester Road"
},
"departure_time": {
"text": "12:52pm",
"time_zone": "Europe/London",
"value": 1436615520
},
"headsign": "Edgware Road",
"line": {
"agencies": [
{
"name": "Transport for London",
"url": "http://www.tfl.gov.uk/modes/tube/"
}
],
"color": "#f2c400",
"short_name": "Circle",
"text_color": "#000000",
"vehicle": {
"icon": "//maps.gstatic.com/mapfiles/transit/iw2/6/subway.png",
"local_icon": "//maps.gstatic.com/mapfiles/transit/iw2/6/uk-london-metro.png",
"name": "Subway",
"type": "SUBWAY"
}
},
"num_stops": 2
},
"travel_mode": "TRANSIT"
},
{
"distance": {
"text": "70 m",
"value": 70
},
"duration": {
"text": "1 min",
"value": 70
},
"end_location": {
"lat": 51.508987,
"lng": -0.19695
},
"html_instructions": "Walk to Notting Hill Gate",
"polyline": {
"points": "uhkyH`he@o@zD"
},
"start_location": {
"lat": 51.508747,
"lng": -0.196009
},
"steps": [
{
"distance": {
"text": "70 m",
"value": 70
},
"duration": {
"text": "1 min",
"value": 70
},
"end_location": {
"lat": 51.508987,
"lng": -0.19695
},
"polyline": {
"points": "uhkyH`he@o@zD"
},
"start_location": {
"lat": 51.508747,
"lng": -0.196009
},
"travel_mode": "WALKING"
}
],
"travel_mode": "WALKING"
},
{
"distance": {
"text": "16.3 km",
"value": 16288
},
"duration": {
"text": "24 mins",
"value": 1440
},
"end_location": {
"lat": 51.55696500000001,
"lng": -0.399352
},
"html_instructions": "Subway towards West Ruislip",
"polyline": {
"points": "ejkyH|me@FAbAnOZzFxA|IfDvR~Gv`@jGtf@NfBh@nH@lDMjEMdBSzAWfA_@|@i@r@q@d@c@ZsAf@cBf@_@H_AL}@Lc@@eBJyABsB?iHA]AE?_@Ao@AUCQ?[AeAEcA?c@?i@?}@Fc@DSFWFQHWF]LkA\\kBh@o@RUJULSPQR[^OTMXO\\Mf@Mh@QfAYxAWrAUzAMnASvBMpBE|@GlBCrAAz@@`BBfBFrAFlAJzAFv@Ht@Dn@F~@@zA?z@@`ABhAF~ANjDL`ENpDNxDHzBHhB@nA@jBA~AMnCKzAE\\En@OnACNUpAo@jCsArDk@dAIR]l@k@x@]^qBxB_H`HwAvAe@d@YVcAbAcBdBkAzAcAtAwArCc@hAgAtD]hB?BKj@i@rDUdCWlBOrAY`CQfBUhBGb@QpAc@lCQbAOvAa@~CQdBK|@QlAGh@In@Q~@Mv@WxA?BU`BUnBS`BE`@G\\Gd@Gx@Ep@C`ACz@MnCSpBW`Bk@rC]hBg@tDi@pEi@nEe@|De@zDe@bEe@zDu@vGq@zF[tCoAvKeBjOqAjK}A|Mo@`Gq@lGE`@QG[rD_@`E[lEShCc@|F?BQjBCd@e@fGk@`HIfAg@fFMvAg@rEWtBc@dDw@dFKz@a@`Cw@|EoAzHcAlGe@vCwAzIaB`KeBjK[fBO~@O`AUpAkAlHg@`DI^y@`FCNUvA]zBmAnHyAvI{@rFg@vCc@pC]rB[jBQjAMp@OxAW~AEVQdA[nBYbB[jB_@~Bo@vD]nB_@`Cg@pCO|@ETUtAABa@dCY|A[jBKr@Mt@Mv@UdACNGXGVADG\\Mr@YhBe@pCIj@Mv@Kj@G^G^?BUpAg@~Ca@~BYfB]pBe@xCg@~Cg@`Dc@pCWbB[tBQtAYnB[rBSnA[pBKl@W`BI`@W`B_@zB[hBa@fCi@dDa@`C]vB]tB]vBSpA_@vBg@|Ci@bDUtAi@dDe@tCi@~Ck@pD]tBG\\a@`C[nBe@vCm@xDm@nD]tBa@fCg@|C[jBa@`C[jB]vBq@dE_@|Be@lC_AzFy@nEaAvFuCrOy@~DK`@EVENkAvF{CzMwClMmClLe@tBu@dDk@tCCJKh@GXGV]nA?Do@pCZV"
},
"start_location": {
"lat": 51.508987,
"lng": -0.19695
},
"transit_details": {
"arrival_stop": {
"location": {
"lat": 51.55696500000001,
"lng": -0.399352
},
"name": "South Ruislip"
},
"arrival_time": {
"text": "1:27pm",
"time_zone": "Europe/London",
"value": 1436617620
},
"departure_stop": {
"location": {
"lat": 51.508987,
"lng": -0.19695
},
"name": "Notting Hill Gate"
},
"departure_time": {
"text": "1:03pm",
"time_zone": "Europe/London",
"value": 1436616180
},
"headsign": "West Ruislip",
"line": {
"agencies": [
{
"name": "Transport for London",
"url": "http://www.tfl.gov.uk/modes/tube/"
}
],
"color": "#dc241f",
"short_name": "Central",
"text_color": "#ffffff",
"vehicle": {
"icon": "//maps.gstatic.com/mapfiles/transit/iw2/6/subway.png",
"local_icon": "//maps.gstatic.com/mapfiles/transit/iw2/6/uk-london-metro.png",
"name": "Subway",
"type": "SUBWAY"
}
},
"num_stops": 10
},
"travel_mode": "TRANSIT"
},
{
"distance": {
"text": "0.6 km",
"value": 642
},
"duration": {
"text": "8 mins",
"value": 460
},
"end_location": {
"lat": 51.5525406,
"lng": -0.4028643
},
"html_instructions": "Walk to A4180, Ruislip, Greater London HA4 6RD, UK",
"polyline": {
"points": "avtyH|~lAfBrBhAkBd@`ABB@@@?B?@ABABEn@fBXfA@HfA`DLh@Pd@h@zAJb@z@nCx@lCFT^WP?TQdCuBp@k@^["
},
"start_location": {
"lat": 51.55696500000001,
"lng": -0.399352
},
"steps": [
{
"distance": {
"text": "56 m",
"value": 56
},
"duration": {
"text": "1 min",
"value": 37
},
"end_location": {
"lat": 51.5560848,
"lng": -0.3993867
},
"html_instructions": "Head <b>southeast</b> on <b>The Runway</b>",
"polyline": {
"points": "avtyH|~lAfBrBhAkB"
},
"start_location": {
"lat": 51.55696500000001,
"lng": -0.399352
},
"travel_mode": "WALKING"
},
{
"distance": {
"text": "46 m",
"value": 46
},
"duration": {
"text": "1 min",
"value": 32
},
"end_location": {
"lat": 51.5557764,
"lng": -0.3997005
},
"html_instructions": "Turn <b>right</b> toward <b>Station Approach</b>",
"maneuver": "turn-right",
"polyline": {
"points": "optyHd_mAd@`ABB@@@?B?@ABABE"
},
"start_location": {
"lat": 51.5560848,
"lng": -0.3993867
},
"travel_mode": "WALKING"
},
{
"distance": {
"text": "0.4 km",
"value": 360
},
"duration": {
"text": "4 mins",
"value": 257
},
"end_location": {
"lat": 51.5539803,
"lng": -0.4040205
},
"html_instructions": "Turn <b>right</b> onto <b>Station Approach</b>",
"maneuver": "turn-right",
"polyline": {
"points": "sntyHbamAn@fBXfA@HfA`DLh@Pd@h@zAJb@z@nCx@lCFT"
},
"start_location": {
"lat": 51.5557764,
"lng": -0.3997005
},
"travel_mode": "WALKING"
},
{
"distance": {
"text": "0.2 km",
"value": 180
},
"duration": {
"text": "2 mins",
"value": 134
},
"end_location": {
"lat": 51.5525406,
"lng": -0.4028643
},
"html_instructions": "Turn <b>left</b> onto <b>W End Rd/A4180</b><div style=\"font-size:0.9em\">Destination will be on the left</div>",
"maneuver": "turn-left",
"polyline": {
"points": "kctyHb|mA^WP?TQdCuBp@k@^["
},
"start_location": {
"lat": 51.5539803,
"lng": -0.4040205
},
"travel_mode": "WALKING"
}
],
"travel_mode": "WALKING"
}
],
"via_waypoint": []
}
],
"overview_polyline": {
"points": "oohyH`tb@[L@Hx@`BSIq@dFu@nEYfBc@xAm@zAu@jAq@z@kLfKq@p@_CfEw@`AcFfFuClCiF~DYH[EU@ec@dLi@Lo@zDFA~AjW`Gt]~Gv`@jGtf@x@vK@lDMjEMdBSzAWfA_@|@i@r@q@d@c@ZsAf@cCp@}BZiCLmEBgICkBGwDGmA?aBLuA`@eGhBk@Xe@d@k@t@]v@[pAk@`Dm@nDa@fESnDK`E?|CJzDd@vGLnB@vCDjCVjGv@hTJxD?jEYjFKlAS~AUpAo@jCsArDk@dAg@`AiAxAqBxB_H`H}B|B}AzAcBdBkAzAcAtAwArCc@hAgAtD]lBu@~Em@rFqAfLoAfIoAzKu@fF{@vFw@pGO~AIrBQjESpBW`BiA|FqAfK{ClWiDdZuDb\\oDhZaBnOE`@QG{@tJo@vIy@rKqAhPq@nHu@jH{@zGcA`HyA~IqG|`@sFt\\wFl]gK`o@_@|BOxAW~AW|Au@rEiCrO}AfJwCjQi@fCq@`EoBvL{Gfb@_B~KwAbJcFzZuFf]qP~cAkCfPaFpYuCrOy@~DQx@qAfGsHh\\sDbPaBzH_@fB]tAo@pCZVfBrBhAkBh@dAH?FGn@fBXfAhAjD^nAt@~BtB|GFT^WP?TQvDaD^["
},
"summary": "",
"warnings": [
"Walking directions are in beta. Use caution – This route may be missing sidewalks or pedestrian paths."
],
"waypoint_order": []
}
],
"status": "OK"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment