From ea66077c990b4e342e3f29f77ee2e87e51b4a9a6 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 22 May 2021 07:01:21 -0400 Subject: [PATCH] added instructions --- groundstation/loc-add-api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/loc-add-api.py b/groundstation/loc-add-api.py index e85f06af..acd412bb 100644 --- a/groundstation/loc-add-api.py +++ b/groundstation/loc-add-api.py @@ -1,4 +1,6 @@ # code based on https://developer.here.com/blog/understanding-geocoding-with-python +# +# copy or rename to loc.py and add api key import requests @@ -14,7 +16,7 @@ PARAMS = {'apikey':api_key,'q':location} r = requests.get(url = URL, params = PARAMS) data = r.json() -print(data) +#print(data) latitude = data['items'][0]['position']['lat'] longitude = data['items'][0]['position']['lng']