Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
maps done

Co-Authored-By: litesh1123 <[email protected]>
Co-Authored-By: Shivani <[email protected]>
  • Loading branch information
3 people committed Jun 15, 2024
1 parent 94cb263 commit 91f7e6f
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ <h1>TourGuide . . .</h1>

<a href="newLogin.html" class="contact-btn"><button class="btn" id="btn-style" style="margin: 0;"
data-aos="fade-down">Login/SignUp</button></a>
<a href="mapa.html" class="contact-btn"><button class="btn" id="btn-style" style="margin: 0;"
data-aos="fade-down">view <map name=""></map></button></a>

<a href="loginPage.html" class="contact-btn"><button class="btn" id="logout-btn" style="margin: 0; display: none;"
data-aos="fade-down" disabled>Log Out</button></a>
Expand Down
20 changes: 20 additions & 0 deletions mapa.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html>
<head>
<title>Simple Map</title>

<link rel="stylesheet" type="text/css" href="maps.css" />
<script async
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&loading=async&callback=initMap"

defer>
</script>
</head>
<body>
<div id="map"></div>

<!-- prettier-ignore -->

</body>
<script type="module" src="maps.js"></script>

</html>
17 changes: 17 additions & 0 deletions maps.css
Original file line number Diff line number Diff line change
@@ -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;
}
12 changes: 12 additions & 0 deletions maps.js
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 91f7e6f

Please sign in to comment.