function initialize() { var myLatlng = new google.maps.LatLng(52.164309,4.493694); var myOptions = { zoom: 14, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById("heatmap"), myOptions); var bermudaTriangle; var triangleCoords = [ new google.maps.LatLng(52.162197,4.490733), new google.maps.LatLng(52.162092,4.497428), new google.maps.LatLng(52.159723,4.493222), new google.maps.LatLng(52.162197,4.490733) ]; // Construct the polygon // Note that we don't specify an array or arrays, but instead just // a simple array of LatLngs in the paths property bermudaTriangle = new google.maps.Polygon({ paths: triangleCoords, strokeColor: "#FF0000", strokeOpacity: 0.8, strokeWeight: 2, fillColor: "#FF0000", fillOpacity: 0.35 }); bermudaTriangle.setMap(map); }