Revision 564 org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/lib/geopy/geocoders/opencage.py
opencage.py | ||
---|---|---|
30 | 30 |
scheme=DEFAULT_SCHEME, |
31 | 31 |
timeout=DEFAULT_TIMEOUT, |
32 | 32 |
proxies=None, |
33 |
user_agent=None, |
|
33 | 34 |
): # pylint: disable=R0913 |
34 | 35 |
""" |
35 | 36 |
Initialize a customized Open Cage Data geocoder. |
... | ... | |
52 | 53 |
|
53 | 54 |
""" |
54 | 55 |
super(OpenCage, self).__init__( |
55 |
scheme=scheme, timeout=timeout, proxies=proxies |
|
56 |
scheme=scheme, timeout=timeout, proxies=proxies, user_agent=user_agent
|
|
56 | 57 |
) |
57 | 58 |
|
58 | 59 |
self.api_key = api_key |
... | ... | |
109 | 110 |
} |
110 | 111 |
if bounds: |
111 | 112 |
params['bounds'] = bounds |
112 |
if bounds:
|
|
113 |
if language:
|
|
113 | 114 |
params['language'] = language |
114 |
if bounds:
|
|
115 |
if country:
|
|
115 | 116 |
params['country'] = country |
116 | 117 |
|
117 | 118 |
url = "?".join((self.api, urlencode(params))) |
Also available in: Unified diff