-
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.
- Loading branch information
Showing
5 changed files
with
221 additions
and
19 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const map = new maplibregl.Map({ | ||
container: 'map', // container ID | ||
style: 'https://api.maptiler.com/maps/streets/style.json?key=Oo1CDYXThbnZ95OKpxHl', // Your style URL | ||
center: [-121.9622, 37.5489], // Starting position [lng, lat] | ||
zoom: 15 // Starting zoom level | ||
}); | ||
|
||
// Add a marker to the map | ||
new maplibregl.Marker() | ||
.setLngLat([-121.9622, 37.5489]) | ||
.setPopup(new maplibregl.Popup({ offset: 25 }) // Add popups | ||
.setHTML('Lake Elizabeth -- the local lake + city park!')) | ||
.addTo(map); |
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
|
||
<title>Hello World with MapLibreGL</title> | ||
|
||
<meta charset="utf-8" /> | ||
<link rel="shortcut icon" href="#"> | ||
<link rel="stylesheet" href="styles/style.css"> | ||
|
||
<!-- MapLibreGL's css--> | ||
<link rel="stylesheet" href="https://unpkg.com/maplibre-gl/dist/maplibre-gl.css" /> | ||
|
||
<!-- MapLibreGL's JavaScript--> | ||
<script src="https://unpkg.com/maplibre-gl/dist/maplibre-gl.js"></script> | ||
</head> | ||
|
||
<body> | ||
|
||
<header> | ||
<h1>Places I've Been To!</h1> | ||
</header> | ||
|
||
<main> | ||
<!-- hint: majority of your lab assignment can go here --> | ||
<div class="col1"> | ||
<!-- Portfolio content goes here --> | ||
<img id="avatar" src="images/avatar.jpg" alt="A photo of the site creator"> | ||
<div id="description"> | ||
<p>Hi! My name is Michelle, and I'm currently a junior at UCLA majoring in | ||
Computer Science as well as double minoring in Digital Humanities and Philosophy. | ||
As a critical digital map maker, | ||
</p> | ||
<br> | ||
<p>On this website, I've added a few maps marking some places I've visited!</p> | ||
<br> | ||
<p>Navigation:</p> | ||
<ul> | ||
<li><a href="./index.html">Map of Seattle</a></li> | ||
<li><a href="./page.html">Map of Shanghai</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
||
<div class="col2"> | ||
<div class="title"><h2>Map of Shanghai</h2></div> | ||
<div id="map"> | ||
<!-- Map will be inserted here --> | ||
</div> | ||
<div class="caption"> | ||
<p>ipsum</p> | ||
<ol> | ||
<li>item</li> | ||
</ol> | ||
</div> | ||
</div> | ||
</main> | ||
|
||
<div id="footer"> | ||
Copyright (2024) | ||
</div> | ||
|
||
<script src="js/map2.js"></script> | ||
|
||
</body> | ||
|
||
</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