Created
September 14, 2011 05:46
-
-
Save iguigova/1215937 to your computer and use it in GitHub Desktop.
Hello GoogleMap API
This file contains 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
<!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