Skip to content

Commit

Permalink
Geocoder uses viewport insteadd of bounds
Browse files Browse the repository at this point in the history
Geocoder uses viewport insteadd of bounds
  • Loading branch information
geduldig committed Feb 19, 2013
1 parent 8ed5953 commit fea9a42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ v0.1.2, 20 Jan 2013 -- Improved exception handling for less fragile connections

v1.0.0, 30 Jan 2013 -- Uploaded to github.

v1.1.0, 12 Feb 2013 -- Replaced TwitterAPI with puttytat for Twitter requests.
v1.1.0, 12 Feb 2013 -- Replaced TwitterAPI with puttytat for Twitter requests.

v1.1.1, 19 Feb 2013 -- Geocoder uses viewport instead of bounds.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='TwitterGeo',
version='1.1.0',
version='1.1.1',
author='Jonas Geduldig',
author_email='[email protected]',
packages=['twittergeo'],
Expand Down
4 changes: 2 additions & 2 deletions twittergeo/Geocoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ def get_region_box(self, place):
results = self.geocode(place)
geometry = results.raw[0]['geometry']
latC, lngC = geometry['location']['lat'], geometry['location']['lng']
latSW, lngSW = geometry['bounds']['southwest']['lat'], geometry['bounds']['southwest']['lng']
latNE, lngNE = geometry['bounds']['northeast']['lat'], geometry['bounds']['northeast']['lng']
latSW, lngSW = geometry['viewport']['southwest']['lat'], geometry['viewport']['southwest']['lng']
latNE, lngNE = geometry['viewport']['northeast']['lat'], geometry['viewport']['northeast']['lng']
return latC, lngC, latSW, lngSW, latNE, lngNE

def get_region_circle(self, place):
Expand Down

0 comments on commit fea9a42

Please sign in to comment.