Skip to content

Instantly share code, notes, and snippets.

@ggoodman
Created April 18, 2009 19:44
Show Gist options
  • Save ggoodman/97749 to your computer and use it in GitHub Desktop.
Save ggoodman/97749 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>You are here!</title>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load('jquery', '1.3');
google.load('maps', '2');
google.setOnLoadCallback(function(){
var map = new google.maps.Map2(document.getElementById("map_canvas"));
var loc = new google.maps.LatLng(google.loader.ClientLocation.latitude, google.loader.ClientLocation.longitude);
map.setCenter(loc, 13);
map.openInfoWindow(loc, document.createTextNode("You are here"));
map.addControl(new google.maps.SmallMapControl());
map.addControl(new google.maps.MapTypeControl());
});
</script>
</head>
<body>
<div id="map_canvas"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment