从python代码生成静态映射

时间:2015-10-31 20:31:24

标签: python google-maps-api-3

以下python代码有效,但我不知道如何使用谷歌地图在浏览器中显示行车路线。我不知道要继续。欢迎提示。

import googlemaps
import datetime

gmaps = googlemaps.Client(key)

# Geocoding and address
geocode_result = gmaps.geocode('1600 Amphitheatre Parkway, Mountain View, CA')

# Look up an address with reverse geocoding
reverse_geocode_result = gmaps.reverse_geocode((40.714224, -73.961452))

# Request directions via public transit
now = datetime.datetime.now()
directions_result = gmaps.directions("Sydney Town Hall",
                                     "Parramatta, NSW",
                                     mode="transit",
                                     departure_time=now)

print directions_result

这是directions_result的打印输出(没有完全显示以保留空间

[{u' overview_polyline':{u' points&#39 ;: u' lzvmEsr {y [m @ EO | @Z ?? KGQNK @EVB @ D @ KTBMBHCKRT @ bCVnAZvCXjAE ^ GXOnBcBbDiDzAeApAq @ | @ WhBWZCf @频率ALpEr@pF斧5 R | BV @ d @ Tt的3 H @ BAZ @升@ d @ NJIMHLlBvAVRv 5 R 6〜@ BAZ @ HAZ @ vAVTPTRf @ Xf中@ {{1 }} BrAhDtCxAnAtArApB〜屋宇署@ N @ v□的RAN @ xAbEtKf @ ZAB @ zAZvA ^ rBXlB ^ bCfF BdCpCbEfAtAj@j@hDhC AvDnA〜DN @ |了Bf @ VC ^ P Cl值@ jCXdB U BcArD {@ nDwA〜EM @公元前] rB中[〜CEjBAnAB @zCRfCHfCDjMOpFClCKhCWpBq@xCk@fBm@|AaAnByAjCs@℃@ zCSfD] hCwAxG [XBW | CE〜BJ BTbFZhEb@rEN D_ @ ZFG @ nFObAUrAy @ HDO @ PC} @jE}平均} @ PDW @ NDE @ rBkArE_BdFo @ | BG @ FCO @ vEOjBIbCSjKOfHG〜AKbAUzBYrBe @ EdArLHpCC安永@ JD} AdGuAlEsAfDwDhI} BfFaAfB} AdCyCnFaA C{@pDkBxHeAzDo@zCq@rC{B|Iy@如@ fBuArC_ @升@ q因子@ X @ kBnBgAjAsAlAaAx @} @ BmAdBkE~F}AtBuAvBeAlB}@vBm@lBk@xBqBrK[vB[bCw@~Hu@nHSpAe@nB[ @一个@ fAPH ^ Q | @沃顿的bG {B_ @米@钪@ [qCmDI @ IIuBxB [RQDq @ CoRyFeAh @ QXa @ pCSnBiAlIsAhIwBbKoAjFiC Au@~@s@jA{AbDy@zAm@x@QRACbAn@ M @米@ XBI @ JyArEqGzQmTħ{ArIgD Cc@pC{@nLo@ N} EbLoEnJqCfFaBrC {DhGaa @ JJ @ uBnDcAvBmEdKmJlUuM LaFË} DqBsBy @ AAS} EUwSs @ C_ @ yCoDSw @ | H_Cle @ d \\}@rC[xA_@jAg@~@eA|AqChD}CrG{AxDqAdEqAvFiBfJmBdI@LaA~CiCzFm@fB]bBc@ A} C〜了Bw 1 L {广告@克@ ^ o @ x @ QLm @ JBxCa​​AbDHDKCMp @ WzA?@ @ FJJqAP_Cd @ {@ f @ s @ FJq @'},你警告':[你的步行路线处于测试阶段。谨慎使用\ u2013这条路线可能缺少人行道或人行道。'],你的界限':{u' northeast':{u' lat': - 33.8150365,你':

(没有完全显示要占用空间)

0 个答案:

没有答案