JSFiddle - React, Tailwind, and code Playground

by Amar Nyayapati

HTML

<style type="text/css">
      body, #map_canvas {
        margin: 0;
        padding: 0;
        height: 100%;
      }
</style>
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script>
function initialize() {
        var mapOptions = {
          zoom: 4,
          center: new google.maps.LatLng(25.539574, 81.5660),
          mapTypeId: google.maps.MapTypeId.ROADMAP
        };

        map = new google.maps.Map(document.getElementById('map_canvas'),
            mapOptions);

        var coordInfoWindow = new google.maps.InfoWindow();
        coordInfoWindow.setContent(createInfoWindowContent());
        coordInfoWindow.setPosition(new google.maps.LatLng(25.539574, 81.5660));
        coordInfoWindow.open(map);

        google.maps.event.addListener(map, 'zoom_changed', function() {
          coordInfoWindow.setContent(createInfoWindowContent());
          coordInfoWindow.open(map);
        });
      }

      google.maps.event.addDomListener(window, 'load', initialize);
    </script>

  <body>
    <div id="map_canvas"></div>
  </body>