1/*
2Take look in below steps for integrate javascript google map api
3
4We declare the application as HTML5 using the <!DOCTYPE html> declaration.
5We create a div element named "map" to hold the map.
6We define a JavaScript function that creates a map in the div.
7We load the Maps JavaScript API using a script tag.
8These steps are explained below.
9*/
10<!DOCTYPE html>
11<html>
12 <head>
13 <title>Simple Map</title>
14 <meta name="viewport" content="initial-scale=1.0">
15 <meta charset="utf-8">
16 <style>
17 /* Always set the map height explicitly to define the size of the div
18 * element that contains the map. */
19 #map {
20 height: 100%;
21 }
22 /* Optional: Makes the sample page fill the window. */
23 html, body {
24 height: 100%;
25 margin: 0;
26 padding: 0;
27 }
28 </style>
29 </head>
30 <body>
31 <div id="map"></div>
32 <script>
33 var map;
34 function initMap() {
35 map = new google.maps.Map(document.getElementById('map'), {
36 center: {lat: -34.397, lng: 150.644},
37 zoom: 8
38 });
39 }
40 </script>
41 <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
42 async defer></script>
43 </body>
44</html>
45
46/*
47I hope it will help you.
48Namaste
49Stay Home Stay Safe
50*/