From 91f7e6f2457fff61feab756c6243b66eaa878820 Mon Sep 17 00:00:00 2001 From: siddhi4321 <139329176+Shivani756@users.noreply.github.com> Date: Sat, 15 Jun 2024 18:02:15 +0530 Subject: [PATCH] #870 maps done Co-Authored-By: litesh1123 <139573484+litesh1123@users.noreply.github.com> Co-Authored-By: Shivani <139329176+shivani756@users.noreply.github.com> --- index.html | 2 ++ mapa.html | 20 ++++++++++++++++++++ maps.css | 17 +++++++++++++++++ maps.js | 12 ++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 mapa.html create mode 100644 maps.css create mode 100644 maps.js diff --git a/index.html b/index.html index 735a1470..d6904526 100644 --- a/index.html +++ b/index.html @@ -187,6 +187,8 @@

TourGuide . . .

+ diff --git a/mapa.html b/mapa.html new file mode 100644 index 00000000..56b9c124 --- /dev/null +++ b/mapa.html @@ -0,0 +1,20 @@ + + + Simple Map + + + + + +
+ + + + + + + \ No newline at end of file diff --git a/maps.css b/maps.css new file mode 100644 index 00000000..2b9cd7eb --- /dev/null +++ b/maps.css @@ -0,0 +1,17 @@ +/* + * Always set the map height explicitly to define the size of the div element + * that contains the map. + */ + #map { + height: 100%; + } + + /* + * Optional: Makes the sample page fill the window. + */ + html, + body { + height: 100%; + margin: 0; + padding: 0; + } \ No newline at end of file diff --git a/maps.js b/maps.js new file mode 100644 index 00000000..0a44ebe8 --- /dev/null +++ b/maps.js @@ -0,0 +1,12 @@ +let map; + +async function initMap() { + const { Map } = await google.maps.importLibrary("maps"); + + map = new Map(document.getElementById("map"), { + center: { lat: -34.397, lng: 150.644 }, + zoom: 8, + }); +} + +initMap(); \ No newline at end of file