This page allows a user to grab an array of points by clicking on a Google Maps to draw a path (polyline).
https://jsfiddle.net/Seb__/drjnb9us/
Start clicking on the map.
Points can be added or moved (click or drag) or deleted (right click).
You can accept the location request at the start to center the map on your current position.
The list of points is displayed in real time on a div floating at the top.
Save the page "index.html" on your computer (or any server) and open it with a browser.