forked from Nandini-13/Byte-Hacks-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.js
102 lines (100 loc) · 3.22 KB
/
test.js
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
function initMap() {
// The location of New York City
var nyc = {
lng: -74.0060,
lat: 40.7128
};
// The map, centered at New York City
var map = new google.maps.Map(
document.getElementById('map'), {
zoom: 9,
center: nyc
});
// The marker, positioned at New York City
var marker = new google.maps.Marker({
position: nyc,
map: map
});
map.data.addGeoJson(cities);
}
// GeoJSON, describing the locations and names of some tenements in New York City.
const cities = {
type: "FeatureCollection",
features: [
{
type: "Feature",
geometry: { type: "Point", coordinates: [-74.002534, 40.73877] },
properties: { name: "Horatio Street Tenement" }
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [-73.99959, 40.714465] },
properties: { name: "Mulberry Street Tenement" }
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [-74.007964, 40.740295] },
properties: { name: "Washington Street Tenement" }
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.728204, -73.995585] },
properties: { name: "Mercer Street Tenement" }
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.73035, -73.994822] },
properties: { name: "Greene Street Tenement" }
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.742629, -73.986468] },
properties: { name: "Madison Avenue Tenement" }
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.77364, -73.959847] },
properties: { name: "77th Street Tenement" }
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.803232, -73.96389] },
properties: { name: "Amsterdam Avenue Tenement" }
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.623979, -73.920625] },
properties: { name: "East 57th Street Tenement" }
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.71047, -73.793604] },
properties: { name: "169th Street Tenement" }
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.873194, -73.91155] },
properties: { name: "Broadway Street Tenement"}
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.801763, -73.968507] },
properties: { name: "West End Avenue Tenement"}
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.7666, -73.887714] },
properties: { name: "82nd Street Tenement"}
},
{
type: "Feature",
geometry: { type: "Point", coordinates: [40.717667, -73.997006] },
properties: { name: "Mott Street Tenement"}
},
{
type: "Feature",
geometry: { type:"Point", coordinates: [40.725947, -73.99468] },
properties: { name: "Bleecker Street Tenement"}
},
]
};