forked from GeorgiaJane03/12b
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
24 lines (15 loc) · 720 Bytes
/
script.js
File metadata and controls
24 lines (15 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
let mapOptions = {
center:[40.75703,-73.98597],
zoom:12
}
let map = new L.map('map', mapOptions);
let layer = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
map.addLayer(layer);
// let marker = new L.Marker([40.75703,-73.98597]);
// marker.addTo(map);
const marker = L.marker([40.75703,-73.98597]).addTo(map)
.bindPopup('<b>Time Square</b><br />Famous for new year celebrations.');
const marker2 = L.marker([40.74214, -73.98807]).addTo(map)
.bindPopup('<b>Madison Square Park</b><br />A great park to walk around.');
const marker3 = L.marker([56.0014, -3.404]).addTo(map)
.bindPopup('<b>Forth Bridge</b><br /> The first major structure in Britain to be made of steel.');