-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up Maps, using Leaflet instead
- Loading branch information
1 parent
8203089
commit a937785
Showing
7 changed files
with
86 additions
and
28 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,14 +3,14 @@ | |
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> | ||
<title>HÆKÆSHIP: Extraterrestrial Networking Site</title> | ||
<link rel="icon"type="image/x-icon" href="./assets/icons/favicon.ico"> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Orbitron:[email protected]&display=swap" rel="stylesheet"> | ||
<link rel="stylesheet" href="./styles/home.css"> | ||
<script src="https://unpkg.com/axios/dist/axios.min.js" defer></script> | ||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""> | ||
</head> | ||
<body> | ||
<div class="stars"></div> | ||
|
@@ -63,9 +63,7 @@ <h2 id="main" class="main__heading">Our Past and Now</h2> <!--intro section: wha | |
|
||
<section id="location" class="location"> | ||
<h2 class="location__title">Our Location (Live Updates)</h2> | ||
<div class="location__map"> | ||
<iframe id="map-iframe"></iframe> | ||
</div> | ||
<div id="map" class="location__map"></div> | ||
</section> | ||
|
||
<section id="hakaship" class="gallery"><!--detail images of spaceship/look--> | ||
|
@@ -105,13 +103,15 @@ <h2 class="form__heading">Buzz-Connect With Us</h2> | |
|
||
<a href="#top"><button id="button-up" class="button-image"></button></a> | ||
|
||
<!-- JS --> | ||
<script src="./scripts/title.js"></script> | ||
<!-- Scripts --> | ||
<script src="https://unpkg.com/axios/dist/axios.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/leaflet.rotatedMarker.min.js"></script> | ||
<script src="https://unpkg.com/[email protected]/dist/typed.umd.js"></script> | ||
<script type="module" src="./scripts/typing.js"></script> | ||
<script type="module" src="./scripts/index-page.js"></script> | ||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB5IlpYhATifj2bSew0y2eahEjxri15PuM"></script> | ||
<script src="./scripts/stars.js" type="module"></script> | ||
<script src="./scripts/title.js" type="module"></script> | ||
<script src="./scripts/typing.js" type="module"></script> | ||
<script src="./scripts/index-page.js" type="module"></script> | ||
|
||
<script src="./scripts/stars.js"></script> | ||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
export class ISSApi { | ||
constructor() { | ||
this.baseUrl = "http://api.open-notify.org/iss-now.json"; | ||
this.baseUrl = "https://api.wheretheiss.at/v1/satellites/25544"; | ||
} | ||
|
||
async getIssPosition() { | ||
const issPosition = await axios.get(this.baseUrl); | ||
return issPosition.data; | ||
try { | ||
const response = await axios.get(this.baseUrl); | ||
return { | ||
latitude: response.data.latitude, | ||
longitude: response.data.longitude | ||
}; | ||
} catch (error) { | ||
console.error("Error fetching ISS position:", error); | ||
throw error; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters