Tryit Editor v2.3

Edit This Code:
<!DOCTYPE html> <html> <head> <script src="http://maps.googleapis.com/maps/api/js"> </script> <script> var x=new google.maps.LatLng(52.395715,4.888916); var stavanger=new google.maps.LatLng(58.983991,5.734863); var amsterdam=new google.maps.LatLng(52.395715,4.888916); var london=new google.maps.LatLng(51.508742,-0.120850); function initialize() { var mapProp = { center:x, zoom:4, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map=new google.maps.Map(document.getElementById("googleMap"),mapProp); var myTrip=[stavanger,amsterdam,london,stavanger]; var flightPath=new google.maps.Polygon({ path:myTrip, strokeColor:"#0000FF", strokeOpacity:0.8, strokeWeight:2, fillColor:"#0000FF", fillOpacity:0.4 }); flightPath.setMap(map); } google.maps.event.addDomListener(window, 'load', initialize); </script> </head> <body> <div id="googleMap" style="width:500px;height:380px;"></div> </body> <!-- Mirrored from www.w3schools.com/googleAPI/tryit.asp?filename=tryhtml_map_overlays_polygon by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 23 Jan 2015 08:08:37 GMT --> </html>
Result:
Try it Yourself - © w3schools.com