Google Map Highlight the Path on Drag in the Route
Will this help you?
There were some abilities to Drawing on the Map
https://developers.google.com/maps/documentation/javascript/overlays
Maybe this action will help you
There is a section Custom Overlays
https://developers.google.com/maps/documentation/javascript/customoverlays
Which is using OverlayView
The examples you can find here https://developers.google.com/maps/documentation/javascript/customoverlays
Also, there is the second way you can try Simple Polylines
https://developers.google.com/maps/documentation/javascript/examples/polyline-simple
Here is the part of example
<script>
// This example creates a 2-pixel-wide red polyline showing the path of
// the first trans-Pacific flight between Oakland, CA, and Brisbane,
// Australia which was made by Charles Kingsford Smith.
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 3,
center: {lat: 0, lng: -180},
mapTypeId: 'terrain'
});
var flightPlanCoordinates = [
{lat: 37.772, lng: -122.214},
{lat: 21.291, lng: -157.821},
{lat: -18.142, lng: 178.431},
{lat: -27.467, lng: 153.027}
];
var flightPath = new google.maps.Polyline({
path: flightPlanCoordinates,
geodesic: true,
strokeColor: '#FF0000',
strokeOpacity: 1.0,
strokeWeight: 2
});
flightPath.setMap(map);
}
</script>