// Setup the default map
latlng = [-6.2087634, 106.84559899999999];
latlng = new google.maps.LatLng(23.062521089244896, -68.78645340625002);
map = new google.maps.Map(document.getElementById('map'), {
disableDefaultUI: true,
styles: [{
"elementType": "labels",
"stylers": [{
"visibility": "off"
}]
}],
mapTypeId: google.maps.MapTypeId.ROADMAP
});
map2 = new google.maps.Map(document.getElementById('map2'), {
mapTypeControl: false,
backgroundColor: 'hsla(0, 0%, 0%, 0)',
zoom: 5,
styles: [{
"stylers": [{
"visibility": "off"
}]
}, {
"elementType": "labels",
"stylers": [{
"visibility": "on"
}]
}],
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
map.bindTo('center', map2, 'center');
map.bindTo('zoom', map2, 'zoom');
new google.maps.Polygon({
paths: [
new google.maps.LatLng(15.774252, -80.190262),
new google.maps.LatLng(18.466465, -66.118292),
new google.maps.LatLng(32.321384, -64.75737),
new google.maps.LatLng(25.774252, -80.190262)
],
strokeColor: '#FF0000',
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: '#FF0000',
fillOpacity: 1,
map: map
});
html,
body {
margin: 0;
padding: 0;
height: 100%;
}
.map {
width: 100%;
height: 100%;
background: transparent !important;
}
<script src="http://maps.google.com/maps/api/js?key=AIzaSyCkUOdZ5y7hMm0yrcCQoCvLwzdM6M8s5qk"></script>
<div id="map" class="map"></div>
<div id="map2" class="map" style="top:-100%;"></div>