Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

distance matrix gogle map python

# Install googlemaps module
# pip3 install googlemaps

# importing googlemaps module
import googlemaps
  
# Requires API key
gmaps = googlemaps.Client(key='Your_API_key')
  
# Requires cities name
my_dist = gmaps.distance_matrix('Source','Destination')['rows'][0]['elements'][0]
  
# Printing the result
print(my_dist)
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #distance #matrix #gogle #map #python
ADD COMMENT
Topic
Name
7+9 =