JSFiddle - React, Tailwind, and code Playground

HTML

<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <script async defer
    src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDyzYo4TzUruDNwTDHg8XPPlmoV6PPtxAE&callback=initialize">
    </script>
<script type="text/javascript">
var layers = [];
var gmap;

function initialize() {
  
  var varLatLng = new google.maps.LatLng(43.12078764806432,23.7102788506307);
  var myLatLng = new google.maps.LatLng(43.12078764806432,23.7102788506307);
  var myOptions = {
    zoom: 2,
    center: myLatLng,
    mapTypeId: 'satellite'
  };
  gmap = new google.maps.Map(document.getElementById("show_map"),myOptions); 
  //var myLatLng = new google.maps.LatLng(43.1455743, 23.6923548);
  var bounds = new google.maps.LatLngBounds();
  
  
  var image1 = 'images/sa.png';
  //var ctaLayer = new google.maps.KmlLayer({url: 'http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml',
  //        map: gmap});
  //ctaLayer.setMap(gmap);
  

  layers[1] = new google.maps.KmlLayer({url: 'http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml',
          map: gmap});
  //layers[1].setMap(map);
  layers[2] = new google.maps.KmlLayer({url: 'http://***.com/testovoo.kml',
          map: null});
  //layers[2].setMap(map);
  layers[3] = new google.maps.KmlLayer({url: 'http://***.com/mz.kml',
          map: null});
  //layers[3].setMap(map);
  layers[4] = new google.maps.KmlLayer({url: 'http://***.com/lik.kml',
          map: null});
  //layers[4].setMap(map);
  layers[5] = new google.maps.KmlLayer({url: 'http://***.com/varbeshnica.kml',
          map: null});
  //layers[5].setMap(map);
  bounds.extend(varLatLng);
  gmap.fitBounds(bounds);


		
}
function toggleLayer(i) {
		  if(layers[i].getMap() === null) {
			layers[i].setMap(gmap);
		  } else {
			layers[i].setMap(null);
		  }
		}
		
function polyopt(i) {
    setOptions({
        strokeColor: '#FF0000', strokeOpacity: 0.8,
        strokeWeight:...