-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmapbox_maps_api.html
More file actions
76 lines (55 loc) · 2 KB
/
mapbox_maps_api.html
File metadata and controls
76 lines (55 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src='https://api.mapbox.com/mapbox-gl-js/v3.0.0/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v3.0.0/mapbox-gl.css' rel='stylesheet'/>
<style>
#favePlaces {
display: inline-flex;
}
</style>
</head>
<body>
<div id='map' style='width: 620px; height: 620px;'></div>
<div id="favePlaces"></div>
<script>
mapboxgl.accessToken = 'pk.eyJ1Ijoic2V2YmF1dGlzdGEiLCJhIjoiY2xwanluNzlmMDQ4ZjJpbzcxb2xleTlrMyJ9.Vuq2Tc5q8esCQ1hugjVuPg';
const map = new mapboxgl.Map({
container: 'map', // container ID
style: 'mapbox://styles/mapbox/streets-v11', // style URL
center: [-79.96475569017957, 40.42884827989157,], // starting position [lng, lat]
zoom: 19, // starting zoom
});
const marker1 = new mapboxgl.Marker({
color: "#d293a6",
draggable: false
}).setLngLat([-79.96475569017957, 40.42884827989157,])
.addTo(map);
const codeupPopup1 = new mapboxgl.Popup()
.setHTML("<p>Sikhay Thai Lao Restaurant</p>")
marker1.setPopup(codeupPopup1);
const marker2 = new mapboxgl.Marker({
color: "#d293a6",
draggable: false
}).setLngLat([-97.414319023602, 32.68064132548091,])
.addTo(map);
const codeupPopup2 = new mapboxgl.Popup()
.setHTML("<p></p>")
marker2.setPopup(codeupPopup2);
const marker3 = new mapboxgl.Marker({
color: "#d293a6",
draggable: false
}).setLngLat([-97.29938427493634, 32.79560236754819,])
.addTo(map);
const codeupPopup3 = new mapboxgl.Popup()
.setHTML("<p>Hawaiian Bros</p>")
marker3.setPopup(codeupPopup3);
</script>
<script src="js/mapbox_maps_api.js"></script>
</body>
</html>