Google Maps - Polyline

<!DOCTYPE html>
<script src=""></script>

var center = new google.maps.LatLng(31.1471,75.3412);
var delhi = new google.maps.LatLng(28.6139,77.2090);
var punjab = new google.maps.LatLng(31.1471,75.3412);
var gurgaon = new google.maps.LatLng(28.4595,77.0266);

function initialize()
var mapProp = {

var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
var myTrip = [delhi,punjab,gurgaon];
var trip_path=new google.maps.Polyline({
path:myTrip, //specifies several latitude/longitude coordinates for the line
strokeColor:"#0000FF", //specifies a hexadecimal color for the line
strokeOpacity:0.8, // specifies the opacity of the line
strokeWeight:2, // specifies the weight of the line's stroke in pixels
editable: true // false if don't allow user to edit the poly line
}); ...  Read More

Share This: