Skip to content

Instantly share code, notes, and snippets.

@colllin
Created November 9, 2012 05:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save colllin/4043911 to your computer and use it in GitHub Desktop.
Save colllin/4043911 to your computer and use it in GitHub Desktop.
Google Map Marker Example
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<script type="text/javascript"
src="http://maps.googleapis.com/maps/api/js?key=AIzaSyAjilrqWZ_adLaa2lW8nYPFmNsDqokYwdk&sensor=false">
</script>
<script type="text/javascript">
function initialize() {
var myOptions = {
center: new google.maps.LatLng(-34.397, 150.644),
zoom: 2,
mapTypeId: google.maps.MapTypeId.TERRAIN
};
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(-34.397, 150.644),
map: map
});
var marker = new google.maps.Marker({
position: new google.maps.LatLng(-24.397, 160.644),
map: map
});
var marker = new google.maps.Marker({
position: new google.maps.LatLng(-14.397, 170.644),
map: map
});
var marker = new google.maps.Marker({
position: new google.maps.LatLng(-4.397, 180.644),
map: map
});
var marker = new google.maps.Marker({
position: new google.maps.LatLng(6.603, 190.644),
map: map
});
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment