Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
slawek87 committed Dec 27, 2015
1 parent 71e405a commit 7c0ae80
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ How to use Geocode Module?
```python
# -*- coding: utf-8 -*-

from geolocation.google_maps import GoogleMaps
from geolocation.main import GoogleMaps

address = "New York City Wall Street 12"

Expand Down Expand Up @@ -127,15 +127,15 @@ The following restrictions are supported:
```python
# -*- coding: utf-8 -*-

from geolocation.google_maps import GoogleMaps
from geolocation.distance_matrix import const
from geolocation.main import GoogleMaps
from geolocation.distance_matrix.client import DistanceMatrixApiClient

origins = ['rybnik', 'oslo']
destinations = ['zagrzeb']

google_maps = GoogleMaps(api_key='your_google_maps_key')

items = google_maps.distance(origins, destinations).all() # default mode parameter is const.MODE_DRIVING.
items = google_maps.distance(origins, destinations).all() # default mode parameter is DistanceMatrixApiClient.MODE_DRIVING.

for item in items:
print('origin: %s' % item.origin)
Expand All @@ -155,7 +155,7 @@ for item in items:

Mode Bicycling:
```python
items = google_maps.distance(origins, destinations, const.MODE_BICYCLING).all()
items = google_maps.distance(origins, destinations, DistanceMatrixApiClient.MODE_BICYCLING).all()

for item in items:
print('origin: %s' % item.origin)
Expand All @@ -168,7 +168,7 @@ for item in items:

Mode Walking:
```python
items = google_maps.distance(origins, destinations, const.MODE_WALKING).all()
items = google_maps.distance(origins, destinations, DistanceMatrixApiClient.MODE_WALKING).all()

for item in items:
print('origin: %s' % item.origin)
Expand All @@ -181,7 +181,7 @@ for item in items:

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

for item in items:
print('origin: %s' % item.origin)
Expand All @@ -194,7 +194,7 @@ for item in items:

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

for item in items:
print('origin: %s' % item.origin)
Expand All @@ -207,7 +207,7 @@ for item in items:

Avoid Ferries:
```python
items = google_maps.distance(origins, destinations, avoid=const.AVOID_FERRIES).all()
items = google_maps.distance(origins, destinations, avoid=DistanceMatrixApiClient.AVOID_FERRIES).all()

for item in items:
print('origin: %s' % item.origin)
Expand All @@ -220,7 +220,7 @@ for item in items:

Avoid Tolls:
```python
items = google_maps.distance(origins, destinations, avoid=const.AVOID_TOLLS).all()
items = google_maps.distance(origins, destinations, avoid=DistanceMatrixApiClient.AVOID_TOLLS).all()

for item in items:
print('origin: %s' % item.origin)
Expand Down

0 comments on commit 7c0ae80

Please sign in to comment.