Skip to content

Instantly share code, notes, and snippets.

@vilaca
Created September 26, 2019 22:34
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 vilaca/f2000e44534cc066044eb9646d13e370 to your computer and use it in GitHub Desktop.
Save vilaca/f2000e44534cc066044eb9646d13e370 to your computer and use it in GitHub Desktop.
Google maps full background
<html>
<head>
<style>
#map_canvas {
width: 100%;
height: 100vh;
}
</style>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
function initialize() {
var map_canvas = document.getElementById('map_canvas');
var map_options = {
center: new google.maps.LatLng(38.7223,9.1393),
zoom: 8,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(map_canvas, map_options)
}
google.maps.event.addDomListener(window, 'load', initialize);
</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