I have 2 latlong values. I need to show path between 3 latlong values. how to draw line between 2 markers. I need to show path between the markers so that we can know the movement
<script>
function initMap() {
var myLatLng = { lat: 17.446507, lng: 78.383033};
var myLatLng1 = { lat: 17.428888, lng: 78.384444 };
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 18,
center: myLatLng,
});
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 14,
center: myLatLng1
});
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Asset 1',
animation: google.maps.Animation.DROP,
});
marker.addListener('click', toggleBounce);
var marker = new google.maps.Marker({
position: myLatLng1,
map: map,
title: 'Hello World!',
icon:image
});
}
}
</script>