JSFiddle - React, Tailwind, and code Playground

by Lawrence Ross

HTML

<script src="https://maps.googleapis.com/maps/api/js?libraries=geometry,places&amp;ext=.js"></script>
<div id="googleMap"></div>

CSS

html,
body,
#googleMap {
  height: 100%;
  width: 100%;
  margin: 0px;
  padding: 0px
}

JavaScript

function initialize() {
  var mapProp = {
    center: new google.maps.LatLng(56.3, 4.3),
    zoom: 8,
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    disableDefaultUI: true,
    scaleControl: true
  };
  var map = new google.maps.Map(document.getElementById("googleMap"), mapProp);
  map.fitBounds(fitBounds);
}
google.maps.event.addDomListener(window, 'load', initialize);
var fitBounds = new google.maps.LatLngBounds(
  new google.maps.LatLng(53.3, -0.7),
  new google.maps.LatLng(59.3, 9.3)
);