Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated readme #27

Merged
merged 1 commit into from
Aug 28, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ Valid values are:
* driving (default) indicates standard driving directions using the road network.
* walking requests walking directions via pedestrian paths & sidewalks (where available).
* bicycling requests bicycling directions via bicycle paths & preferred streets (currently only available in the US and some Canadian cities).
* transit requests distance calculation via public transit routes (where available).

Avoid parameter - Directions may be calculated that adhere to certain restrictions. Restrictions are indicated by use of the avoid parameter, and an argument to that parameter indicating the restriction to avoid.

Expand Down Expand Up @@ -176,6 +177,19 @@ for item in items:
print('duration: %s' % item.duration)
```

Mode Transit:
```python
items = google_maps.distance(origins, destinations, const.MODE_TRANSIT).all()

for item in items:
print('origin: %s' % item.origin)
print('destination: %s' % item.destination)
print('km: %s' % item.distance.kilometers)
print('m: %s' % item.distance.meters)
print('miles: %s' % item.distance.miles)
print('duration: %s' % item.duration)
```

Mode Highway:
```python
items = google_maps.distance(origins, destinations, avoid=const.AVOID_HIGHWAYS).all()
Expand Down