I am having difficulty retrieving the latitude and longitude from a Firestore Geopoint object in Python. I've tried multiple ways but none of them seem to work. Any suggestions? The geopoint object is at alertLocation in the dict.
Code:
docs = db.collection(u'users').where(u'first', u'==', u'MyFirstName').stream()
for doc in docs:
logger.log_text(f'{doc.id} => {doc.to_dict()}')
Output:
HHA5pGRN1rBtGtHRgDS7 => {'alertLocation': <google.cloud.firestore_v1._helpers.GeoPoint object at 0x3e1877599e50>, 'first': 'MyFirstName', 'email': 'me@email.com', 'last': 'mylastname'}