File tree Expand file tree Collapse file tree
geolocation/distance_matrix Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3737
3838 items = google_maps .distance (origins , destinations , const .MODE_WALKING ).all ()
3939
40+ for item in items :
41+ print ('origin: %s' % item .origin )
42+ print ('destination: %s' % item .destination )
43+ print ('km: %s' % item .distance .kilometers )
44+ print ('m: %s' % item .distance .meters )
45+ print ('miles: %s' % item .distance .miles )
46+ print ('duration: %s' % item .duration )
47+
48+ items = google_maps .distance (origins , destinations , const .MODE_TRANSIT ).all ()
49+
4050 for item in items :
4151 print ('origin: %s' % item .origin )
4252 print ('destination: %s' % item .destination )
Original file line number Diff line number Diff line change 1212MODE_DRIVING = 1
1313MODE_WALKING = 2
1414MODE_BICYCLING = 3
15+ MODE_TRANSIT = 4
1516
1617MODES = (
1718 (MODE_DRIVING , 'driving' ),
1819 (MODE_WALKING , 'walking' ),
19- (MODE_BICYCLING , 'bicycling' )
20+ (MODE_BICYCLING , 'bicycling' ),
21+ (MODE_TRANSIT , 'transit' )
2022)
2123
2224
You can’t perform that action at this time.
0 commit comments