JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=geometry&sensor=false"></script>
<div id="map-canvas"></div>
<div id="overlay"><h2>I am an overlay-div</h2></div>
CSS
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#map-canvas{
height: 100%;
}
#overlay {
background-color: white;
height: 80%;
width: 100%;
}
JavaScript
function initialize() {
var mapOptions = {
zoom: 6,
center: new google.maps.LatLng(56.05, 10.4),
mapTypeId: google.maps.MapTypeId.TERRAIN
};
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
//add overlay
map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(document.getElementById('overlay'));
}
google.maps.event.addDomListener(window, 'load', initialize);