JSFiddle - React, Tailwind, and code Playground

HTML

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<div id="map_canvas"></div>

CSS

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

JavaScript

var map;
      var mapOptions = { center: new google.maps.LatLng(0.0, 0.0), zoom: 2,
        mapTypeId: google.maps.MapTypeId.ROADMAP };

      function initialize() {
        map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);

var userCoor = [["a", 0, 0],
                ["b", 30, 0],
                ["c", 10, 20]];

var userCoorPath = [new google.maps.LatLng(0,0),
                    new google.maps.LatLng(30,0),
                    new google.maps.LatLng(10,20)]

var userCoordinate = new google.maps.Polyline({
path: userCoorPath,
strokeColor: "#FF0000",
strokeOpacity: 1,
strokeWeight: 2
});
userCoordinate.setMap(map);

var infowindow = new google.maps.InfoWindow();

var marker, i;

for (i = 0; i < userCoor.length; i++) {  
  marker = new google.maps.Marker({
    position: new google.maps.LatLng(userCoor[i][1], userCoor[i][2]),
    map: map
  });


  google.maps.event.addListener(marker, 'click', (function(marker, i) {
    return function() {
      infowindow.setContent(userCoor[i][0]);
      infowindow.open(map, marker);
    }
  })(marker, i));



}

     }
      google.maps.event.addDomListener(window, 'load', initialize);