"Google Maps API v3 - Basic Map"
Bootstrap 4.1.1 Snippet by divyalahad

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div id="map-canvas"></div> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false" type="text/javascript"></script>
#map-canvas{ height: 500px; width: 500px; border: 3px solid black; }
// if HTML DOM Element that contains the map is found... if (document.getElementById('map-canvas')){ // Coordinates to center the map var myLatlng = new google.maps.LatLng(28.632681,77.208162); // Other options for the map, pretty much selfexplanatory var mapOptions = { zoom: 14, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; // Attach a map to the DOM Element, with the defined settings var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); }

Related: See More


Questions / Comments: