Skip to content

Instantly share code, notes, and snippets.

Created Sep 26, 2019
What would you like to do?
Google maps full background
#map_canvas {
width: 100%;
height: 100vh;
<script src=""></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);
<div id="map_canvas"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment