Google Maps
by siegesan
HTML
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<!-- You are free to copy and use this sample in accordance with the terms of the Apache license (http://www.apache.org/licenses/LICENSE-2.0.html) -->
<title>Google Maps V3 API Sample</title>
<script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=false"></script>
<body style="font-family: Arial; border: 0 none;">
<div id="map-canvas" style="width: 500px; height: 400px"></div>
</body>
JavaScript
var mapDiv = document.getElementById('map-canvas');
var map = new google.maps.Map(mapDiv, {
center: new google.maps.LatLng(0, -180),
zoom: 2,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var path = [new google.maps.LatLng(37.772323, -122.214897),
new google.maps.LatLng(21.291982, -157.821856),
new google.maps.LatLng(-18.142599, 178.431),
new google.maps.LatLng(-27.46758, 153.027892)];
var line = new google.maps.Polyline({
path: path,
strokeColor: '#ff0000',
strokeOpacity: 1.0,
strokeWeight: 2
});
line.setMap(map);