fixe optional geocoder param
git-svn-id: https://polipoly.googlecode.com/svn/trunk@14 1885ebd5-0a40-0410-88a4-770918bee656
This commit is contained in:
parent
feb9f6ca11
commit
d7a1f2a537
@ -20,7 +20,6 @@ import re
|
||||
from polipoly import AddressToDistrictService, GeocodingError
|
||||
|
||||
PATH_TO_CDFILES = 'congdist/cd99_110'
|
||||
GEOCODER = AddressToDistrictService.GEOCODER_US
|
||||
GMAPS_API_KEY = None
|
||||
|
||||
class ApiException(Exception):
|
||||
@ -65,7 +64,7 @@ def main():
|
||||
raise ApiException(305)
|
||||
|
||||
# create service and get a district
|
||||
service = AddressToDistrictService(PATH_TO_CDFILES, GEOCODER, GMAPS_API_KEY)
|
||||
service = AddressToDistrictService(PATH_TO_CDFILES, geocoder, GMAPS_API_KEY)
|
||||
try:
|
||||
lat, lng, districts = service.address_to_district(addr)
|
||||
except GeocodingError, ge:
|
||||
|
Loading…
Reference in New Issue
Block a user