Aug 7, 2012

geo

from geopy import geocoders, distance
g = geocoders.Google(domain='maps.google.ru')

place, location = g.geocode(u"Беларусь, Минская область, Прилесье".encode('utf-8'))
place2, location2 = g.geocode(u"Беларусь, Минск, Рокосовского".encode('utf-8'))

distance.distance(location, location2)
Distance(11.4758281895)

django-chickpea

No comments: