Add Map Step 2

by rahulsemwal1991

HTML

<h3>My Google Maps Demo</h3>
<!--The div element for the map -->
<div id="map"></div>
<!-- Replace the value of the key parameter with your own API key. -->
<script defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCkUOdZ5y7hMm0yrcCQoCvLwzdM6M8s5qk&callback=initMap">
</script>

CSS

/* Set the size of the div element that contains the map */
#map {
  height: 400px;  /* The height is 400 pixels */
  width: 100%;  /* The width is the width of the web page */
 }

JavaScript

// Initialize and add the map
function initMap() {
  // The location of Uluru
/*   var uluru = {lat: -25.344, lng: 131.036};   */
  var kashipur = {lat: 29.210421, lng: 78.961830};

  // The map, centered at Uluru
  var map = new google.maps.Map(
      document.getElementById('map'), {zoom: 25, center: kashipur});
  // The marker, positioned at Uluru
  var marker = new google.maps.Marker({position: kashipur, map: map});
}