JSFiddle - React, Tailwind, and code Playground

by karlovac

HTML

<script src="//maps.googleapis.com/maps/api/js?key=&amp;sensor=true"></script>
<div id="map">
</div>

CSS

#map {
    width: 400px;
    height: 400px;
}

JavaScript

var map = new google.maps.Map(
    document.getElementById("map"),
    {
        center: new google.maps.LatLng(this.startLatitude, this.startLongitude),
        zoom: 15,
        mapTypeId: google.maps.MapTypeId.ROADMAP
    }
);


google.maps.event.addListener(map, 'bounds_changed', function() {
    alert(map.getBounds());
});