JSFiddle - React, Tailwind, and code Playground

by Osama Qassar

HTML

<script src="https://maps.googleapis.com/maps/api/js"></script>
<p>
map:
</p>
        <div id="googleMap" style="width:500px;height:380px;"></div>

JavaScript

var myCenter = new google.maps.LatLng(51.508742, -0.120850);

function initialize() {
    var mapProp = {
        center: myCenter,
        zoom: 15,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    var map = new google.maps.Map(document.getElementById("googleMap"), mapProp);
    var marker = new google.maps.Marker({
        position: myCenter,
    });
    marker.setMap(map);
}

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