Skip to content

Commit

Permalink
Additional logging in *latlng_to_address()*.
Browse files Browse the repository at this point in the history
Issue #16.
  • Loading branch information
Mike Castle committed Jan 3, 2024
1 parent bbd1b88 commit 471cad6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ingress/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def directions(origin, destination, mode):

def latlng_to_address(latlng, **args):
"""Get a textual address for a specific location."""

args.update({
'latlng': latlng,
}) # yapf: disable
Expand All @@ -103,7 +104,9 @@ def latlng_to_address(latlng, **args):

for entry in result['results']:
logging.info(
'types: %s, addr: %s', entry['types'], entry['formatted_address'])
'entry_types: %s, location_type: %s, addr: %s, loc: %s',
entry['types'], entry['geometry']['location_type'],
entry['formatted_address'], entry['geometry']['location'])
if 'street_address' in entry['types']:
score = LOCATION_TYPE_SCORES[entry['geometry']['location_type']]
answers.append((score, entry['formatted_address']))
Expand Down

0 comments on commit 471cad6

Please sign in to comment.