Path: blob/master/Geopy/Geopy_Display_route_itinerary_between_two_locations.ipynb
2973 views
Geopy - Display route itinerary between two locations
Tags: #geopy #folium #polyline #googlemaps #itinerary #navigation
Author: Antonio Georgiev
Last update: 2023-07-28 (Created: 2023-07-28)
Description: This notebook demonstrates how to display a route initnerary between two locations using geopy
, folium
, polyline
and Google Maps API.
Input
Import libraries
Setup variables
Mandatory
Pre-requisite:
Follow the steps in the link - https://developers.google.com/maps/documentation/routes/cloud-setup
Sign up for an account with the Routes API provider.
Make sure to enable "Routes API" in the "Additional APIs" section in the google cloud console (https://console.cloud.google.com/apis/credentials/key/).
api_key
: This variable holds the Google Cloud Platform (GCP) API key. The key is retrieved from the secret variable using the Naas secret manager.origin
: This variable represents the starting location for a journey.destination
: This variable indicates the end location or destination for a journey.
Optional
zoom_start
: This parameter sets the initial zoom level on the map. A value of 0 indicates the lowest level of zoom.