forked from platypush/platypush
Logging geocode response
This commit is contained in:
parent
f4da6ebb1b
commit
2c7880874d
1 changed files with 3 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from platypush.message.response import Response
|
from platypush.message.response import Response
|
||||||
|
@ -29,6 +30,8 @@ class GoogleMapsPlugin(GooglePlugin):
|
||||||
|
|
||||||
if 'results' in response and response['results']:
|
if 'results' in response and response['results']:
|
||||||
result = response['results'][0]
|
result = response['results'][0]
|
||||||
|
logging.info('Google Maps geocode response for latlng ({},{}): {}'.
|
||||||
|
format(latitude, longitude, result))
|
||||||
|
|
||||||
for addr_component in result['address_components']:
|
for addr_component in result['address_components']:
|
||||||
for component_type in addr_component['types']:
|
for component_type in addr_component['types']:
|
||||||
|
|
Loading…
Reference in a new issue