Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@iguigova
Created September 14, 2011 05:46
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 iguigova/1215937 to your computer and use it in GitHub Desktop.
Save iguigova/1215937 to your computer and use it in GitHub Desktop.
Hello GoogleMap API
<!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: 0px; padding: 0px }
</style>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false">
</script>
<script type="text/javascript">
function initialize() {
var latlng = new google.maps.LatLng(49.274076, -123.113719);
var myOptions = {
zoom: 11,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
var layer = new google.maps.FusionTablesLayer(297618);
layer.setMap(map);
/*
var marker = new google.maps.Marker({
position: latlng,
map: map,
title: "Hello World!",
//icon: "images/partlycloudy.png"
});
var infowindow = new google.maps.InfoWindow({
content: "<p>Add more text here.</p><p><a href=''>Go to the property opportunity page</a></p>"
});
google.maps.event.addListener(marker, 'click', function(){
infowindow.open(map, marker);
});
// To add the marker to the map, call setMap();
//marker.setMap(map);
*/
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="margin: 20px; width: 600px; height: 400px;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment