JSFiddle - React, Tailwind, and code Playground

by Shidhin C R

HTML

<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
<!doctype html> 
<html>
    <body>
        <div id="mapView"></div>
    </body>
</html>

CSS

#mapView {
    height:500px;
    width:500px;
}

JavaScript

Controller = function(){
    this.dealerMap = jQuery("#mapView");
};
Controller.prototype.init = function()
{
    // Initialize the Google map, centered on the lower 48 states:
    var target = this.dealerMap.get(0),
    centerOfTheUsa = new google.maps.LatLng(37.0, -98.0),
    options =
    {
        zoom: 4,
        center: centerOfTheUsa,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    console.log(target);
    this.map = new google.maps.Map(target, options);
};
jQuery(function(){
        var mycontroller = new Controller();
        mycontroller.init();
});