I am able to get my current location just fine. I create a map with driving directions and then I want to allow my user to navigate to their destination.
How do I set the location for the user to navigate? I do not see a way to set location, there are only location.list() and location.get() methods. I am using Python, below is my attempted code:
work = [lat1, lng1]
#home_location = self.mirror_service.locations().set(home)
body = {
'location': location,
'html': PAGINATED_HTML %
(lat1, lng1, route(home,work), lat1, lng1, distance(home, work)),
'notification': {'level': 'DEFAULT'},
'menuItems': [{'action': 'NAVIGATE'},
{'action': 'READ_ALOUD'},
{'action': 'DELETE'}],
'notification': {'level': 'DEFAULT'}
}
# self.mirror_service is initialized in util.auth_required.
self.mirror_service.timeline().insert(body=body).execute()