Created
July 7, 2012 16:21
-
-
Save spmallette/3067060 to your computer and use it in GitHub Desktop.
google maps api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
function initialize() { | |
var myLatLng = new google.maps.LatLng(24.886436490787712, -70.2685546875); | |
var myOptions = { | |
zoom: 5, | |
center: myLatLng, | |
mapTypeId: google.maps.MapTypeId.TERRAIN | |
}; | |
var bermudaTriangle; | |
var map = new google.maps.Map(document.getElementById("map_canvas"), | |
myOptions); | |
var triangleCoords = [ | |
new google.maps.LatLng(25.774252, -80.190262), | |
new google.maps.LatLng(18.466465, -66.118292), | |
new google.maps.LatLng(32.321384, -64.75737), | |
new google.maps.LatLng(25.774252, -80.190262) | |
]; | |
// Construct the polygon | |
bermudaTriangle = new google.maps.Polygon({ | |
paths: triangleCoords, | |
strokeColor: "#FF0000", | |
strokeOpacity: 0.8, | |
strokeWeight: 2, | |
fillColor: "#FF0000", | |
fillOpacity: 0.35 | |
}); | |
bermudaTriangle.setMap(map); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment