-
Notifications
You must be signed in to change notification settings - Fork 12
/
local.example.js
76 lines (71 loc) · 2.08 KB
/
local.example.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
// Replace with your Mapbox GL token, if any
const mapboxGlAccessToken = 'pk.eyAAAABBBCCC';
// Example of setting up a gazetteer object. This is described in the `README`
// but these are the options that populate the dropdown in the UI that take you
// to specific locations or map views. You can add as many as you like here and
// create groupings (in this example, the only group is called Locations).
const gazetteer = {
Locations: [
{
'San Francisco, CA': {
zoom: 18,
center: { lng: -122.4193, lat: 37.7648 },
},
},
{
'Washington DC': { zoom: 12, center: { lng: -77.0435, lat: 38.9098 } },
},
],
};
const stylePresets = [
{
id: 'mapbox-streets',
name: 'Mapbox Streets',
type: 'mapbox-gl',
url: 'mapbox://styles/mapbox/streets-v11',
},
// sublist is used to nest style options in the dropdown
// this is helpful if you need to organize a large amount of styles
{
name: 'Data viz styles',
type: 'sublist',
presets: [
{
id: 'mapbox-light',
name: 'Mapbox Light',
type: 'mapbox-gl',
url: 'mapbox://styles/mapbox/light-v10',
},
{
id: 'mapbox-dark',
name: 'Mapbox Dark',
type: 'mapbox-gl',
url: 'mapbox://styles/mapbox/dark-v10',
},
],
},
{
id: 'openstreetmap',
name: 'OpenStreetMap',
type: 'leaflet',
url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
attribution:
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
},
];
// Commented out example for branchpattern
// const branchPatterns = [
// {
// pattern: 'https://website.com/dist/{branch}/dir-a/path/to/{style}.json',
// styles: ['style_1', 'style_2'],
// type: 'mapbox-gl',
// },
// {
// pattern: 'https://website.com/dist/{branch}/dir-b/path/to/{style}.json',
// styles: ['style_3', 'style_4'],
// type: 'mapbox-gl',
// },
// ];
// Example of stylePresetUrls
// const stylePresetUrls = ['./presets/example.json'];
export { gazetteer, mapboxGlAccessToken, stylePresets };