Skip to content

Commit 814d44f

Browse files
committed
Add note about direction types
1 parent 61a730a commit 814d44f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

optimal-road-trip/Computing the optimal road trip across the U.S..ipynb

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"metadata": {
33
"name": "",
4-
"signature": "sha256:7359e5638b3227cc8b9d0e57a2da21b4184a594a25b9f90e68b412038ba80666"
4+
"signature": "sha256:dfb64f9f4a0b2f9c06b891fa7f30835e43ab001d544752da71133a00114e5db8"
55
},
66
"nbformat": 3,
77
"nbformat_minor": 0,
@@ -193,7 +193,8 @@
193193
" try:\n",
194194
" route = gmaps.distance_matrix(origins=[waypoint1],\n",
195195
" destinations=[waypoint2],\n",
196-
" mode=\"driving\",\n",
196+
" mode=\"driving\", # Change this to \"walking\" for walking directions,\n",
197+
" # \"bicycling\" for biking directions, etc.\n",
197198
" language=\"English\",\n",
198199
" units=\"metric\")\n",
199200
"\n",

optimal-road-trip/OptimalRoadTripHtmlSaveAndDisplay.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ def run_genetic_algorithm(generations=5000, population_size=100):
297297
try:
298298
route = gmaps.distance_matrix(origins=[waypoint1],
299299
destinations=[waypoint2],
300-
mode="driving",
300+
mode="driving", # Change to "walking" for walking directions,
301+
# "bicycling" for biking directions, etc.
301302
language="English",
302303
units="metric")
303304

0 commit comments

Comments
 (0)