Skip to content

Commit

Permalink
updated examples
Browse files Browse the repository at this point in the history
  • Loading branch information
slawek87 committed Dec 27, 2015
1 parent 7c0ae80 commit 28dde33
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion examples/city_location.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from geolocation.google_maps import GoogleMaps
from geolocation.main import GoogleMaps

if __name__ == "__main__":
address = "New York City"
Expand Down
16 changes: 8 additions & 8 deletions examples/distance.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- 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

if __name__ == "__main__":
origins = ['rybnik', 'oslo']
Expand All @@ -25,7 +25,7 @@
print('duration minutes: %s' % item.duration.minutes)
print('duration seconds: %s' % item.duration.seconds)

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 @@ -35,7 +35,7 @@
print('miles: %s' % item.distance.miles)
print('duration: %s' % item.duration)

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 @@ -45,7 +45,7 @@
print('miles: %s' % item.distance.miles)
print('duration: %s' % item.duration)

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 @@ -55,7 +55,7 @@
print('miles: %s' % item.distance.miles)
print('duration: %s' % item.duration)

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 @@ -65,7 +65,7 @@
print('miles: %s' % item.distance.miles)
print('duration: %s' % item.duration)

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 @@ -75,7 +75,7 @@
print('miles: %s' % item.distance.miles)
print('duration: %s' % item.duration)

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
2 changes: 1 addition & 1 deletion examples/exact_location.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from geolocation.google_maps import GoogleMaps
from geolocation.main import GoogleMaps

if __name__ == "__main__":
address = "New York City Wall Street 12"
Expand Down
2 changes: 1 addition & 1 deletion examples/reverse_geocode.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from geolocation.google_maps import GoogleMaps
from geolocation.main import GoogleMaps

if __name__ == "__main__":
address = "New York City"
Expand Down
2 changes: 1 addition & 1 deletion examples/street_location.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
from geolocation.google_maps import GoogleMaps
from geolocation.main import GoogleMaps

if __name__ == "__main__":
address = "Wall Street 12"
Expand Down

0 comments on commit 28dde33

Please sign in to comment.