-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotes.txt
More file actions
60 lines (53 loc) · 2.04 KB
/
Notes.txt
File metadata and controls
60 lines (53 loc) · 2.04 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
Location organization:
Each location features several properties which will be used later for things like sorting and toggling display
type - 'Feature'
properties: object
{
'name' - location name eg: 'Botswana'
'continent' - which continent this location resides eg: 'Africa'
'seasons' - array of ints eg: [3, 14]
}
geometry: object
type - mapbox point type, only used 'Point' so far
coordinates - an array containing [long, lat] (maddeningly)
Points added with:
map.on('load, () => {
map.addSource('points', {
'type': 'geojson',
'data': {
'type': 'FeatureCollection',
'features': [
// First Location
// Africa
// Nambia
{
'type': 'Feature',
'properties': {'name': 'Nambia', 'continent': 'Africa', 'seasons': [3, 5, 6, 12]},
'geometry': {
'type': 'Point',
'coordinates': [17.4861655, -21.25]
}
},
// Template Location
// Botswana
{
'type': 'Feature',
'properties': {'name': 'Botswana', 'continent': 'Africa', 'seasons': [3, 14]},
'geometry': {
'type': 'Point',
'coordinates': [24.680158000000006, -22.344029499999998]
}
},
// Last Location
{
'type': 'Feature',
'properties': {},
'geometry': {
'type': 'Point',
'coordinates': []
}
}
]
}
});
})