Getting Directions From Google Maps (on Form Submit) - Apps Script | Maps Service ~ Episode 14.2

Опубликовано: 14 Апрель 2021
на канале: David Weiss
2,250
51

Hey Coders! Creating static maps is a fantastic tool in your Apps Script toolbelt, but unless you're Christopher Columbus or Marco Polo, you'll likely need help interpreting that map and getting directions. Luckily, Maps Service has available methods for just that. You can overlay a path along the static map you just made outlining the directions and/or print out in plain text the route and turns you'll need to take to get to your destination. In this video, we'll hook up an onFormSubmit trigger to fire a function that sends a receipt email with the map and directions of a party to the Form's respondent. Watch the entire video to learn how!

Check out the source code on GitHub:
https://github.com/davidtheweiss/Apps...

❤️ Support the ongoing growth of this channel!   / davidweissprogramming  

🧑‍💻 Apps Script Documentation: https://developers.google.com/apps-sc...

----------------------------------------------------------------------------------------------
🕒 Timestamps
0:00 Intro
0:39 Overview and Problem Statement
5:13 Supplying Directions and Adding the Path to our Map
6:42 The Directions Object
7:34 addPath(directions.overview_polyline.points)
8:24 Getting Step-by-Step Directions and Distance/Duration
10:07 A Small Bug and Quick Fix
11:25 Adding Mode of Transit and "Avoid" Options
13:00 The eval() Javascript Function
13:39 Resolution
----------------------------------------------------------------------------------------------
Other playlists:

-----------------------------------
Google Cloud
-----------------------------------
App Engine:
   • Google Cloud - Season 1 | App Engine  

Google Cloud Orientation:
   • Google Cloud - Season 0 | Orientation  

-----------------------------------
Apps Script
-----------------------------------
Data Studio Service:
   • Apps Script - Season 15 | Data Studio...  

Maps Service:
   • Apps Script - Season 14 | Maps Service  

Utilities Service:
   • Apps Script - Season 13 | Utilities S...  

Properties Service:
   • Apps Script - Season 12 | Properties ...  

URL Fetch Service:
   • Apps Script - Season 11 | URL Fetch S...  

Drive Service:
   • Apps Script - Season 10 | Drive Service  

Forms Service:
   • Apps Script - Season 9 | Forms Service  

Lock Service:
   • Apps Script - Season 8 | Lock Service  

HTML Service:
   • Apps Script - Season 7 | HTML Service  

Document Service:
   • Apps Script - Season 6 | Document Ser...  

Slides Service:
   • Apps Script - Season 5 | Slides Service  

Calendar Service:
   • Apps Script - Season 4 | Calendar Ser...  

Script Service:
   • Apps Script - Season 3 | Script Service  

Gmail Service:
   • Apps Script - Season 2 | Gmail Service  

Spreadsheet Service:
   • Apps Script - Season 1 | Spreadsheet ...  

Apps Script Orientation:
   • Apps Script - Season 0 | Orientation  
----------------------------------------------------------------------------------------------