JSFiddle - React, Tailwind, and code Playground

by Emanuel Vecchio

HTML

<script src="http://maps.googleapis.com/maps/api/js"></script>
<div id="map"></div>
<!--
THIS EXAMPLE IS BASED ON 
https://developers.google.com/maps/documentation/javascript/markers#add
-->

CSS

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

JavaScript

function initialize() {
    
  var myLatlng = new google.maps.LatLng(-25.363882,131.044922);    
  var mapOptions = {
    zoom: 4,
    center: myLatlng
  }
  
  var map = new google.maps.Map(document.getElementById('map'), mapOptions);

  var marker = new google.maps.Marker({
      position: myLatlng,
      map: map,
      title: 'Hello World!'
  });
    
  marker.setMap(marker);
}

initialize();