solid-map-gl 1.3.2 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -27
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/styles.css +1 -1
- package/dist/source/components/{Fog → Atmosphere}/index.jsx +5 -5
- package/dist/source/components/MapGL/index.jsx +10 -11
- package/dist/source/components/Popup/index.jsx +1 -1
- package/dist/source/components/Source/index.jsx +15 -10
- package/dist/source/components/Terrain/index.jsx +18 -4
- package/dist/source/index.jsx +1 -2
- package/dist/source/mapStyles.js +102 -140
- package/dist/types/components/{Fog → Atmosphere}/index.d.ts +1 -1
- package/dist/types/components/Terrain/index.d.ts +1 -2
- package/dist/types/index.d.ts +1 -2
- package/dist/types/mapStyles.d.ts +97 -75
- package/package.json +11 -11
- package/dist/source/components/Sky/index.jsx +0 -18
- package/dist/types/components/Sky/index.d.ts +0 -7
package/dist/source/mapStyles.js
CHANGED
|
@@ -1,145 +1,107 @@
|
|
|
1
1
|
const mapBase = 'mapbox://styles/mapbox';
|
|
2
|
-
const gitBase = 'https://raw.githubusercontent.com';
|
|
3
|
-
const gishub = 'https://raw.githubusercontent.com/GIShub4/map-styles/main';
|
|
2
|
+
const gitBase = 'https://raw.githubusercontent.com/';
|
|
3
|
+
const gishub = 'https://raw.githubusercontent.com/GIShub4/map-styles/main/';
|
|
4
4
|
export const vectorStyleList = {
|
|
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
|
-
|
|
5
|
+
mb: {
|
|
6
|
+
light: `${mapBase}/light-v10`,
|
|
7
|
+
dark: `${mapBase}/dark-v10`,
|
|
8
|
+
street: `${mapBase}/streets-v11`,
|
|
9
|
+
outdoor: `${mapBase}/outdoors-v11`,
|
|
10
|
+
sat: `${mapBase}/satellite-v9`,
|
|
11
|
+
sat_street: `${mapBase}/satellite-streets-v11`,
|
|
12
|
+
nav: `${mapBase}/navigation-guidance-day-v4`,
|
|
13
|
+
nav_night: `${mapBase}/navigation-guidance-night-v4`,
|
|
14
|
+
basic: `${mapBase}/cjf4m44iw0uza2spb3q0a7s41`,
|
|
15
|
+
monochrome: `${mapBase}/cjv6rzz4j3m4b1fqcchuxclhb`,
|
|
16
|
+
leshine: `${mapBase}/cjcunv5ae262f2sm9tfwg8i0w`,
|
|
17
|
+
icecream: `${mapBase}/cj7t3i5yj0unt2rmt3y4b5e32`,
|
|
18
|
+
cali: `${mapBase}/cjerxnqt3cgvp2rmyuxbeqme7`,
|
|
19
|
+
northstar: `${mapBase}/cj44mfrt20f082snokim4ungi`,
|
|
20
|
+
mineral: `${mapBase}/cjtep62gq54l21frr1whf27ak`,
|
|
21
|
+
moonlight: `${mapBase}/cj3kbeqzo00022smj7akz3o1e`,
|
|
22
|
+
frank: `${mapBase}-map-design/ckshxkppe0gge18nz20i0nrwq`,
|
|
23
|
+
minimo: `${mapBase}-map-design/cksjc2nsq1bg117pnekb655h1`,
|
|
24
|
+
decimal: `${mapBase}-map-design/ck4014y110wt61ctt07egsel6`,
|
|
25
|
+
standard: `${mapBase}-map-design/ckr0svm3922ki18qntevm857n`,
|
|
26
|
+
blueprint: `${mapBase}-map-design/cks97e1e37nsd17nzg7p0308g`,
|
|
27
|
+
bubble: `${mapBase}-map-design/cksysy2nl62zp17quosctdtcc`,
|
|
28
|
+
pencil: `${mapBase}-map-design/cks9iema71es417mlrft4go2k`,
|
|
29
|
+
swiss_ski: `${gitBase}mapbox/mapbox-gl-swiss-ski-style/master/cij1zoclj002y8rkkdjl69psd.json`,
|
|
30
|
+
vintage: `${gitBase}mapbox/mapbox-gl-vintage-style/master/cif5p01n202nisaktvljx9mv3.json`,
|
|
31
|
+
whaam: `${gitBase}mapbox/mapbox-gl-whaam-style/master/cii8323c8004w0nlvtss3dbm2.json`,
|
|
32
|
+
neon: `${gitBase}NatEvatt/awesome-mapbox-gl-styles/master/styles/Neon/style.json`,
|
|
33
|
+
camoflauge: `${gitBase}jingsam/mapbox-gl-styles/master/Camouflage.json`,
|
|
34
|
+
emerald: `${gitBase}jingsam/mapbox-gl-styles/master/Emerald.json`,
|
|
35
|
+
runner: `${gitBase}jingsam/mapbox-gl-styles/master/Runner.json`,
|
|
36
|
+
x_ray: `${gitBase}jingsam/mapbox-gl-styles/master/X-ray.json`,
|
|
37
|
+
},
|
|
38
|
+
esri: {
|
|
39
|
+
blueprint: `${gishub}esri:blueprint.json`,
|
|
40
|
+
charted_territory: `${gishub}esri:charted-territory.json`,
|
|
41
|
+
colored_pencil: `${gishub}esri:colored-pencil.json`,
|
|
42
|
+
community: `${gishub}esri:community.json`,
|
|
43
|
+
mid_century: `${gishub}esri:mid-century.json`,
|
|
44
|
+
modern_antique: `${gishub}esri:modern-antique.json`,
|
|
45
|
+
nat_geo: `${gishub}esri:national-geographic.json`,
|
|
46
|
+
newspaper: `${gishub}esri:newspaper.json`,
|
|
47
|
+
open_street_map: `${gishub}esri:open-street-map.json`,
|
|
48
|
+
light_gray_canvas: `${gishub}esri:light-gray-canvas.json`,
|
|
49
|
+
dark_gray_canvas: `${gishub}esri:dark-gray-canvas.json`,
|
|
50
|
+
human_geo_light: `${gishub}esri:human-geography-light.json`,
|
|
51
|
+
human_geo_dark: `${gishub}esri:human-geography-dark.json`,
|
|
52
|
+
world_navigation: `${gishub}esri:world-navigation.json`,
|
|
53
|
+
world_street: `${gishub}esri:world-street.json`,
|
|
54
|
+
world_street_night: `${gishub}esri:world-street-night.json`,
|
|
55
|
+
world_terrain: `${gishub}esri:world-terrain.json`,
|
|
56
|
+
world_terrain_hybrid: `${gishub}esri:world-terrain-hybrid.json`,
|
|
57
|
+
world_topographic: `${gishub}esri:world-topographic.json`,
|
|
58
|
+
chromium: `${gishub}esri:chromium.json`,
|
|
59
|
+
dreamcatcher: `${gishub}esri:dreamcatcher.json`,
|
|
60
|
+
seahaven: `${gishub}esri:seahaven.json`,
|
|
61
|
+
sangria: `${gishub}esri:sangria.json`,
|
|
62
|
+
mercurial: `${gishub}esri:mercurial.json`,
|
|
63
|
+
imagery: `${gishub}esri:imagery.json`,
|
|
64
|
+
imagery_hybrid: `${gishub}esri:imagery-hybrid.json`,
|
|
65
|
+
firefly: `${gishub}esri:firefly.json`,
|
|
66
|
+
firefly_hybrid: `${gishub}esri:firefly-hybrid.json`,
|
|
67
|
+
oceans: `${gishub}esri:oceans.json`,
|
|
68
|
+
},
|
|
59
69
|
};
|
|
70
|
+
const carto = 'https://{s}.basemaps.cartocdn.com/rastertiles/';
|
|
71
|
+
const stamen = 'https://stamen-tiles-{s}.a.ssl.fastly.net/';
|
|
72
|
+
const tf = 'https://{s}.tile.thunderforest.com/';
|
|
60
73
|
export const rasterStyleList = {
|
|
61
|
-
|
|
62
|
-
'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
63
|
-
'
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
'https://
|
|
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
|
-
'https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}.png',
|
|
95
|
-
'Maps © <a href="https://stamen.com" target="_blank"><em>Stamen Design</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
96
|
-
],
|
|
97
|
-
'stamen:watercolor': [
|
|
98
|
-
'https://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.jpg',
|
|
99
|
-
'Maps © <a href="https://stamen.com" target="_blank"><em>Stamen Design</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
100
|
-
],
|
|
101
|
-
'stamen:terrain': [
|
|
102
|
-
'https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.jpg',
|
|
103
|
-
'Maps © <a href="https://stamen.com" target="_blank"><em>Stamen Design</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
104
|
-
],
|
|
105
|
-
'tf:cycle': [
|
|
106
|
-
'https://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}@2x.png?apikey={apikey}',
|
|
107
|
-
'Maps © <a href="https://thunderforest.com" target="_blank"><em>Thunderforest</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
108
|
-
],
|
|
109
|
-
'tf:trans': [
|
|
110
|
-
'https://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey={apikey}',
|
|
111
|
-
'Maps © <a href="https://thunderforest.com" target="_blank"><em>Thunderforest</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
112
|
-
],
|
|
113
|
-
'tf:trans-dark': [
|
|
114
|
-
'https://{s}.tile.thunderforest.com/transport-dark/{z}/{x}/{y}.png?apikey={apikey}',
|
|
115
|
-
'Maps © <a href="https://thunderforest.com" target="_blank"><em>Thunderforest</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
116
|
-
],
|
|
117
|
-
'tf:landscape': [
|
|
118
|
-
'https://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png?apikey={apikey}',
|
|
119
|
-
'Maps © <a href="https://thunderforest.com" target="_blank"><em>Thunderforest</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
120
|
-
],
|
|
121
|
-
'tf:outdoors': [
|
|
122
|
-
'https://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey={apikey}',
|
|
123
|
-
'Maps © <a href="https://thunderforest.com" target="_blank"><em>Thunderforest</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
124
|
-
],
|
|
125
|
-
'tf:neighbourhood': [
|
|
126
|
-
'https://{s}.tile.thunderforest.com/neighbourhood/{z}/{x}/{y}.png?apikey={apikey}',
|
|
127
|
-
'Maps © <a href="https://thunderforest.com" target="_blank"><em>Thunderforest</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
128
|
-
],
|
|
129
|
-
'tf:spinal': [
|
|
130
|
-
'https://{s}.tile.thunderforest.com/spinal-map/{z}/{x}/{y}.png?apikey={apikey}',
|
|
131
|
-
'Maps © <a href="https://thunderforest.com" target="_blank"><em>Thunderforest</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
132
|
-
],
|
|
133
|
-
'tf:pioneer': [
|
|
134
|
-
'https://{s}.tile.thunderforest.com/pioneer/{z}/{x}/{y}.png?apikey={apikey}',
|
|
135
|
-
'Maps © <a href="https://thunderforest.com" target="_blank"><em>Thunderforest</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
136
|
-
],
|
|
137
|
-
'tf:atlas': [
|
|
138
|
-
'https://{s}.tile.thunderforest.com/atlas/{z}/{x}/{y}.png?apikey={apikey}',
|
|
139
|
-
'Maps © <a href="https://thunderforest.com" target="_blank"><em>Thunderforest</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
140
|
-
],
|
|
141
|
-
'tf:mobile': [
|
|
142
|
-
'https://{s}.tile.thunderforest.com/mobile-atlas/{z}/{x}/{y}.png?apikey={apikey}',
|
|
143
|
-
'Maps © <a href="https://thunderforest.com" target="_blank"><em>Thunderforest</em></a>, Data © <a href="http://www.openstreetmap.org/copyright" target="_blank"><em>OpenStreetMap</em></a>',
|
|
144
|
-
],
|
|
74
|
+
osm: {
|
|
75
|
+
org: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
76
|
+
human: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
|
77
|
+
cycle: 'https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
|
|
78
|
+
topo: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
|
|
79
|
+
_copy: '<a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap</a>',
|
|
80
|
+
},
|
|
81
|
+
carto: {
|
|
82
|
+
voyager: `${carto}voyager_labels_under/{z}/{x}/{y}{r}.png`,
|
|
83
|
+
positron: `${carto}light_all/{z}/{x}/{y}{r}.png`,
|
|
84
|
+
dark: `${carto}dark_all/{z}/{x}/{y}{r}.png`,
|
|
85
|
+
_copy: '<a href="https://carto.com/attribution" target="_blank">© Carto</a>',
|
|
86
|
+
},
|
|
87
|
+
stamen: {
|
|
88
|
+
toner: `${stamen}toner/{z}/{x}/{y}{r}.png`,
|
|
89
|
+
toner_lite: `${stamen}toner-lite/{z}/{x}/{y}{r}.png`,
|
|
90
|
+
watercolor: `${stamen}watercolor/{z}/{x}/{y}.png`,
|
|
91
|
+
terrain: `${stamen}terrain/{z}/{x}/{y}{r}.png`,
|
|
92
|
+
_copy: '<a href="https://stamen.com/privacy-policy" target="_blank">© Stamen Design</a>',
|
|
93
|
+
},
|
|
94
|
+
tf: {
|
|
95
|
+
cycle: `${tf}cycle/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
96
|
+
trans: `${tf}transport/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
97
|
+
trans_dark: `${tf}transport-dark/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
98
|
+
landscape: `${tf}landscape/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
99
|
+
outdoors: `${tf}outdoors/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
100
|
+
neighbourhood: `${tf}neighbourhood/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
101
|
+
spinal: `${tf}spinal-map/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
102
|
+
pioneer: `${tf}pioneer/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
103
|
+
atlas: `${tf}atlas/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
104
|
+
mobile: `${tf}mobile-atlas/{z}/{x}/{y}{r}.png?apikey={apikey}`,
|
|
105
|
+
_copy: '<a href="https://thunderforest.com/privacy" target="_blank">© Thunderforest</a>',
|
|
106
|
+
},
|
|
145
107
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export { MapGL as default, useMap } from './components/MapGL';
|
|
2
2
|
export { Source, useSourceId } from './components/Source';
|
|
3
3
|
export { Layer } from './components/Layer';
|
|
4
|
-
export {
|
|
5
|
-
export { Sky } from './components/Sky';
|
|
4
|
+
export { Atmosphere } from './components/Atmosphere';
|
|
6
5
|
export { Terrain } from './components/Terrain';
|
|
7
6
|
export { Control } from './components/Control';
|
|
8
7
|
export { Marker } from './components/Marker';
|
|
@@ -1,79 +1,101 @@
|
|
|
1
1
|
export declare const vectorStyleList: {
|
|
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
|
-
|
|
2
|
+
mb: {
|
|
3
|
+
light: string;
|
|
4
|
+
dark: string;
|
|
5
|
+
street: string;
|
|
6
|
+
outdoor: string;
|
|
7
|
+
sat: string;
|
|
8
|
+
sat_street: string;
|
|
9
|
+
nav: string;
|
|
10
|
+
nav_night: string;
|
|
11
|
+
basic: string;
|
|
12
|
+
monochrome: string;
|
|
13
|
+
leshine: string;
|
|
14
|
+
icecream: string;
|
|
15
|
+
cali: string;
|
|
16
|
+
northstar: string;
|
|
17
|
+
mineral: string;
|
|
18
|
+
moonlight: string;
|
|
19
|
+
frank: string;
|
|
20
|
+
minimo: string;
|
|
21
|
+
decimal: string;
|
|
22
|
+
standard: string;
|
|
23
|
+
blueprint: string;
|
|
24
|
+
bubble: string;
|
|
25
|
+
pencil: string;
|
|
26
|
+
swiss_ski: string;
|
|
27
|
+
vintage: string;
|
|
28
|
+
whaam: string;
|
|
29
|
+
neon: string;
|
|
30
|
+
camoflauge: string;
|
|
31
|
+
emerald: string;
|
|
32
|
+
runner: string;
|
|
33
|
+
x_ray: string;
|
|
34
|
+
};
|
|
35
|
+
esri: {
|
|
36
|
+
blueprint: string;
|
|
37
|
+
charted_territory: string;
|
|
38
|
+
colored_pencil: string;
|
|
39
|
+
community: string;
|
|
40
|
+
mid_century: string;
|
|
41
|
+
modern_antique: string;
|
|
42
|
+
nat_geo: string;
|
|
43
|
+
newspaper: string;
|
|
44
|
+
open_street_map: string;
|
|
45
|
+
light_gray_canvas: string;
|
|
46
|
+
dark_gray_canvas: string;
|
|
47
|
+
human_geo_light: string;
|
|
48
|
+
human_geo_dark: string;
|
|
49
|
+
world_navigation: string;
|
|
50
|
+
world_street: string;
|
|
51
|
+
world_street_night: string;
|
|
52
|
+
world_terrain: string;
|
|
53
|
+
world_terrain_hybrid: string;
|
|
54
|
+
world_topographic: string;
|
|
55
|
+
chromium: string;
|
|
56
|
+
dreamcatcher: string;
|
|
57
|
+
seahaven: string;
|
|
58
|
+
sangria: string;
|
|
59
|
+
mercurial: string;
|
|
60
|
+
imagery: string;
|
|
61
|
+
imagery_hybrid: string;
|
|
62
|
+
firefly: string;
|
|
63
|
+
firefly_hybrid: string;
|
|
64
|
+
oceans: string;
|
|
65
|
+
};
|
|
56
66
|
};
|
|
57
67
|
export declare const rasterStyleList: {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
68
|
+
osm: {
|
|
69
|
+
org: string;
|
|
70
|
+
human: string;
|
|
71
|
+
cycle: string;
|
|
72
|
+
topo: string;
|
|
73
|
+
_copy: string;
|
|
74
|
+
};
|
|
75
|
+
carto: {
|
|
76
|
+
voyager: string;
|
|
77
|
+
positron: string;
|
|
78
|
+
dark: string;
|
|
79
|
+
_copy: string;
|
|
80
|
+
};
|
|
81
|
+
stamen: {
|
|
82
|
+
toner: string;
|
|
83
|
+
toner_lite: string;
|
|
84
|
+
watercolor: string;
|
|
85
|
+
terrain: string;
|
|
86
|
+
_copy: string;
|
|
87
|
+
};
|
|
88
|
+
tf: {
|
|
89
|
+
cycle: string;
|
|
90
|
+
trans: string;
|
|
91
|
+
trans_dark: string;
|
|
92
|
+
landscape: string;
|
|
93
|
+
outdoors: string;
|
|
94
|
+
neighbourhood: string;
|
|
95
|
+
spinal: string;
|
|
96
|
+
pioneer: string;
|
|
97
|
+
atlas: string;
|
|
98
|
+
mobile: string;
|
|
99
|
+
_copy: string;
|
|
100
|
+
};
|
|
79
101
|
};
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.3.
|
|
2
|
+
"version": "1.3.5",
|
|
3
3
|
"name": "solid-map-gl",
|
|
4
4
|
"description": "Solid Component Library for Mapbox GL JS",
|
|
5
5
|
"info": "Solid Component Library for Mapbox GL JS. Mapbox GL JS is a JavaScript library that renders interactive maps from vector tiles and Mapbox styles using WebGL. This project is intended to be as close as possible to the Mapbox GL JS API.",
|
|
@@ -50,21 +50,21 @@
|
|
|
50
50
|
"not ie 11"
|
|
51
51
|
],
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"jsdom": "^
|
|
54
|
-
"mapbox-gl": "^2.
|
|
55
|
-
"rollup": "^2.
|
|
53
|
+
"jsdom": "^20.0.0",
|
|
54
|
+
"mapbox-gl": "^2.9.2",
|
|
55
|
+
"rollup": "^2.77.2",
|
|
56
56
|
"rollup-plugin-import-css": "^3.0.3",
|
|
57
57
|
"rollup-plugin-uglify": "^6.0.4",
|
|
58
58
|
"rollup-preset-solid": "^1.4.0",
|
|
59
|
-
"solid-js": "^1.4.
|
|
59
|
+
"solid-js": "^1.4.8",
|
|
60
60
|
"solid-testing-library": "^0.3.0",
|
|
61
|
-
"typescript": "^4.7.
|
|
62
|
-
"vite": "^
|
|
63
|
-
"vite-plugin-solid": "^2.
|
|
64
|
-
"vitest": "^0.
|
|
61
|
+
"typescript": "^4.7.4",
|
|
62
|
+
"vite": "^3.0.4",
|
|
63
|
+
"vite-plugin-solid": "^2.3.0",
|
|
64
|
+
"vitest": "^0.19.1"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"mapbox-gl": "^2.
|
|
68
|
-
"solid-js": "^1.4.
|
|
67
|
+
"mapbox-gl": "^2.9.2",
|
|
68
|
+
"solid-js": "^1.4.8"
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { onCleanup, createEffect } from 'solid-js';
|
|
2
|
-
import { useMap } from '../MapGL';
|
|
3
|
-
export const Sky = props => {
|
|
4
|
-
const map = useMap();
|
|
5
|
-
const layerId = '_sky';
|
|
6
|
-
// Add Sky Layer
|
|
7
|
-
createEffect(() => {
|
|
8
|
-
map().getLayer(layerId) && map().addLayer({ ...props.style, id: layerId });
|
|
9
|
-
});
|
|
10
|
-
// Remove Sky Layer
|
|
11
|
-
onCleanup(() => map().getLayer(layerId) && map().removeLayer(layerId));
|
|
12
|
-
// Update Visibility
|
|
13
|
-
createEffect(() => {
|
|
14
|
-
props.visible !== undefined &&
|
|
15
|
-
map().setLayoutProperty(layerId, 'visibility', props.visible ? 'visible' : 'none');
|
|
16
|
-
});
|
|
17
|
-
return props.children;
|
|
18
|
-
};
|