@swr-data-lab/components 1.13.0 → 1.13.2

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.
Files changed (288) hide show
  1. package/dist/Autocomplete/Autocomplete.svelte +237 -0
  2. package/dist/Autocomplete/Autocomplete.svelte.d.ts +34 -0
  3. package/dist/Autocomplete/index.d.ts +2 -0
  4. package/dist/Button/Button.svelte +38 -0
  5. package/dist/Button/Button.svelte.d.ts +10 -0
  6. package/dist/Button/index.d.ts +2 -0
  7. package/dist/Caption/Caption.svelte +21 -0
  8. package/dist/Caption/Caption.svelte.d.ts +8 -0
  9. package/dist/Caption/index.js +2 -0
  10. package/dist/Card/Card.svelte +25 -0
  11. package/dist/Card/Card.svelte.d.ts +7 -0
  12. package/dist/Card/index.d.ts +2 -0
  13. package/dist/ChartFooter/ChartFooter.svelte +38 -0
  14. package/dist/ChartFooter/ChartFooter.svelte.d.ts +8 -0
  15. package/dist/ChartFooter/index.d.ts +2 -0
  16. package/{src → dist}/ChartHeader/ChartHeader.svelte +4 -12
  17. package/dist/ChartHeader/ChartHeader.svelte.d.ts +9 -0
  18. package/dist/ChartHeader/index.d.ts +2 -0
  19. package/{src → dist}/ChartList/ChartList.svelte +2 -16
  20. package/dist/ChartList/ChartList.svelte.d.ts +14 -0
  21. package/dist/ChartList/index.js +2 -0
  22. package/dist/Copy/Copy.svelte +21 -0
  23. package/dist/Copy/Copy.svelte.d.ts +8 -0
  24. package/dist/Copy/index.js +2 -0
  25. package/dist/DesignTokens/DesignTokens.svelte +58 -0
  26. package/dist/DesignTokens/DesignTokens.svelte.d.ts +7 -0
  27. package/dist/DesignTokens/Tokens.d.ts +26 -0
  28. package/dist/DesignTokens/Tokens.js +171 -0
  29. package/dist/DesignTokens/index.d.ts +8 -0
  30. package/{src → dist}/FormLabel/FormLabel.svelte +2 -9
  31. package/dist/FormLabel/FormLabel.svelte.d.ts +9 -0
  32. package/dist/FormLabel/index.js +2 -0
  33. package/{src → dist}/Headline/Headline.svelte +2 -7
  34. package/dist/Headline/Headline.svelte.d.ts +7 -0
  35. package/dist/Headline/index.js +2 -0
  36. package/dist/HighlightCard/HighlightCard.svelte +54 -0
  37. package/dist/HighlightCard/HighlightCard.svelte.d.ts +9 -0
  38. package/dist/HighlightCard/index.d.ts +2 -0
  39. package/dist/Input/Input.svelte +32 -0
  40. package/dist/Input/Input.svelte.d.ts +23 -0
  41. package/dist/Input/index.d.ts +2 -0
  42. package/dist/Logotype/Logotype.svelte.d.ts +26 -0
  43. package/dist/Middot/Middot.svelte.d.ts +26 -0
  44. package/dist/Middot/index.d.ts +2 -0
  45. package/dist/Note/Note.svelte +28 -0
  46. package/dist/Note/Note.svelte.d.ts +7 -0
  47. package/dist/Note/index.js +2 -0
  48. package/dist/Select/Select.svelte +39 -0
  49. package/dist/Select/Select.svelte.d.ts +4 -0
  50. package/{src/Select/Select.types.ts → dist/Select/Select.types.d.ts} +1 -2
  51. package/dist/Select/Select.types.js +1 -0
  52. package/dist/Select/index.d.ts +2 -0
  53. package/dist/Switcher/Switcher.svelte +111 -0
  54. package/dist/Switcher/Switcher.svelte.d.ts +21 -0
  55. package/dist/Switcher/index.d.ts +2 -0
  56. package/dist/assets/close-circle.svg.svelte.d.ts +26 -0
  57. package/dist/assets/grow.svg.svelte.d.ts +26 -0
  58. package/dist/assets/hand-pointer.svg.svelte.d.ts +26 -0
  59. package/dist/assets/shrink.svg.svelte.d.ts +26 -0
  60. package/dist/assets/tap.svg.svelte.d.ts +26 -0
  61. package/dist/assets/times-circle-solid.svg.svelte.d.ts +26 -0
  62. package/dist/index.d.ts +29 -0
  63. package/dist/maplibre/AttributionControl/AttributionControl.svelte +15 -0
  64. package/dist/maplibre/AttributionControl/AttributionControl.svelte.d.ts +8 -0
  65. package/dist/maplibre/AttributionControl/index.d.ts +2 -0
  66. package/dist/maplibre/GeocoderControl/GeocoderAPIs.d.ts +6 -0
  67. package/dist/maplibre/GeocoderControl/GeocoderAPIs.js +40 -0
  68. package/dist/maplibre/GeocoderControl/GeocoderControl.svelte +25 -0
  69. package/dist/maplibre/GeocoderControl/GeocoderControl.svelte.d.ts +27 -0
  70. package/dist/maplibre/GeocoderControl/index.d.ts +2 -0
  71. package/dist/maplibre/Map/FallbackStyle.d.ts +3 -0
  72. package/dist/maplibre/Map/FallbackStyle.js +15 -0
  73. package/dist/maplibre/Map/Map.svelte +91 -0
  74. package/dist/maplibre/Map/Map.svelte.d.ts +23 -0
  75. package/dist/maplibre/Map/index.d.ts +2 -0
  76. package/dist/maplibre/MapControl/MapControl.svelte +29 -0
  77. package/dist/maplibre/MapControl/MapControl.svelte.d.ts +11 -0
  78. package/dist/maplibre/MapControl/index.d.ts +2 -0
  79. package/dist/maplibre/MapStyle/SWRDataLabLight.d.ts +3 -0
  80. package/dist/maplibre/MapStyle/SWRDataLabLight.js +60 -0
  81. package/dist/maplibre/MapStyle/components/Admin.d.ts +1 -0
  82. package/dist/maplibre/MapStyle/components/Admin.js +170 -0
  83. package/dist/maplibre/MapStyle/components/Buildings.d.ts +1 -0
  84. package/dist/maplibre/MapStyle/components/Buildings.js +21 -0
  85. package/dist/maplibre/MapStyle/components/Landuse.d.ts +1 -0
  86. package/dist/maplibre/MapStyle/components/Landuse.js +497 -0
  87. package/dist/maplibre/MapStyle/components/Natural.d.ts +1 -0
  88. package/dist/maplibre/MapStyle/components/Natural.js +1 -0
  89. package/dist/maplibre/MapStyle/components/PlaceLabels.d.ts +4 -0
  90. package/dist/maplibre/MapStyle/components/PlaceLabels.js +194 -0
  91. package/dist/maplibre/MapStyle/components/Roads.d.ts +8 -0
  92. package/dist/maplibre/MapStyle/components/Roads.js +2327 -0
  93. package/dist/maplibre/MapStyle/components/Transit.d.ts +7 -0
  94. package/dist/maplibre/MapStyle/components/Transit.js +499 -0
  95. package/dist/maplibre/MapStyle/components/Walking.d.ts +1 -0
  96. package/dist/maplibre/MapStyle/components/Walking.js +1530 -0
  97. package/dist/maplibre/MapStyle/index.d.ts +2 -0
  98. package/dist/maplibre/MapStyle/tokens.d.ts +20 -0
  99. package/dist/maplibre/MapStyle/tokens.js +20 -0
  100. package/dist/maplibre/NavigationControl/NavigationControl.svelte +9 -0
  101. package/dist/maplibre/NavigationControl/NavigationControl.svelte.d.ts +12 -0
  102. package/dist/maplibre/NavigationControl/index.d.ts +2 -0
  103. package/dist/maplibre/ScaleControl/ScaleControl.svelte +9 -0
  104. package/dist/maplibre/ScaleControl/ScaleControl.svelte.d.ts +9 -0
  105. package/dist/maplibre/ScaleControl/index.d.ts +2 -0
  106. package/dist/maplibre/Source/MapSource.svelte +43 -0
  107. package/dist/maplibre/Source/MapSource.svelte.d.ts +13 -0
  108. package/dist/maplibre/Source/index.d.ts +2 -0
  109. package/dist/maplibre/Source/source.d.ts +28 -0
  110. package/dist/maplibre/Source/source.js +76 -0
  111. package/dist/maplibre/Tooltip/Tooltip.svelte +46 -0
  112. package/dist/maplibre/Tooltip/Tooltip.svelte.d.ts +25 -0
  113. package/dist/maplibre/Tooltip/index.d.ts +2 -0
  114. package/dist/maplibre/VectorLayer/VectorLayer.svelte +73 -0
  115. package/dist/maplibre/VectorLayer/VectorLayer.svelte.d.ts +21 -0
  116. package/dist/maplibre/VectorLayer/index.d.ts +2 -0
  117. package/dist/maplibre/VectorTileSource/VectorTileSource.svelte +13 -0
  118. package/dist/maplibre/VectorTileSource/VectorTileSource.svelte.d.ts +11 -0
  119. package/dist/maplibre/VectorTileSource/index.d.ts +2 -0
  120. package/dist/maplibre/WithLinkLocation/WithLinkLocation.svelte +44 -0
  121. package/dist/maplibre/WithLinkLocation/WithLinkLocation.svelte.d.ts +19 -0
  122. package/dist/maplibre/WithLinkLocation/index.d.ts +2 -0
  123. package/dist/maplibre/context.svelte.d.ts +33 -0
  124. package/dist/maplibre/context.svelte.js +73 -0
  125. package/{src/maplibre/types.ts → dist/maplibre/types.d.ts} +3 -5
  126. package/dist/maplibre/types.js +1 -0
  127. package/dist/maplibre/utils.d.ts +4 -0
  128. package/dist/maplibre/utils.js +34 -0
  129. package/dist/utils/formatDate.d.ts +5 -0
  130. package/dist/utils/formatNumber.d.ts +18 -0
  131. package/dist/utils/getColorsBetween.d.ts +9 -0
  132. package/dist/utils/getComparisonDiffs.d.ts +6 -0
  133. package/dist/utils/getEmbedContext.d.ts +7 -0
  134. package/dist/utils/getEmbedContext.js +27 -0
  135. package/dist/utils/getLaenderFromTopo.d.ts +10 -0
  136. package/dist/utils/getLaenderNicenameFromAgs.d.ts +7 -0
  137. package/dist/utils/isSvelteComponent.d.ts +7 -0
  138. package/dist/utils/prepareSophoraModel.d.ts +2 -0
  139. package/dist/utils/scrollIntoViewWithOffset.d.ts +7 -0
  140. package/dist/utils/slugify.d.ts +1 -0
  141. package/dist/utils/slugify.js +11 -0
  142. package/dist/utils/topoToGeo.d.ts +7 -0
  143. package/package.json +28 -7
  144. package/.storybook/blocks/Mermaid.jsx +0 -9
  145. package/.storybook/main.ts +0 -34
  146. package/.storybook/preview-head.html +0 -13
  147. package/.storybook/preview.ts +0 -47
  148. package/.storybook/vitest.setup.ts +0 -9
  149. package/src/Autocomplete/Autocomplete.stories.svelte +0 -61
  150. package/src/Autocomplete/Autocomplete.svelte +0 -237
  151. package/src/Button/Button.stories.svelte +0 -21
  152. package/src/Button/Button.svelte +0 -52
  153. package/src/Caption/Caption.stories.svelte +0 -24
  154. package/src/Caption/Caption.svelte +0 -29
  155. package/src/Card/Card.stories.svelte +0 -19
  156. package/src/Card/Card.svelte +0 -34
  157. package/src/ChartFooter/ChartFooter.stories.svelte +0 -32
  158. package/src/ChartFooter/ChartFooter.svelte +0 -46
  159. package/src/ChartHeader/ChartHeader.stories.svelte +0 -31
  160. package/src/ChartList/ChartList.stories.svelte +0 -48
  161. package/src/Copy/Copy.stories.svelte +0 -32
  162. package/src/Copy/Copy.svelte +0 -29
  163. package/src/DesignTokens/DesignTokens.svelte +0 -71
  164. package/src/DesignTokens/Tokens.ts +0 -186
  165. package/src/FormLabel/FormLabel.stories.svelte +0 -52
  166. package/src/Headline/Headline.stories.svelte +0 -17
  167. package/src/HighlightCard/HighlightCard.stories.svelte +0 -57
  168. package/src/HighlightCard/HighlightCard.svelte +0 -65
  169. package/src/Input/Input.svelte +0 -21
  170. package/src/Logotype/Logotype.stories.svelte +0 -16
  171. package/src/Middot/Middot.stories.svelte +0 -16
  172. package/src/Note/Note.stories.svelte +0 -23
  173. package/src/Note/Note.svelte +0 -38
  174. package/src/Select/Select.stories.svelte +0 -205
  175. package/src/Select/Select.svelte +0 -76
  176. package/src/Select/SelectStoriesTemplate.svelte +0 -31
  177. package/src/Switcher/Switcher.stories.svelte +0 -44
  178. package/src/Switcher/Switcher.svelte +0 -130
  179. package/src/maplibre/AttributionControl/AttributionControl.stories.svelte +0 -29
  180. package/src/maplibre/AttributionControl/AttributionControl.svelte +0 -45
  181. package/src/maplibre/GeocoderControl/GeocoderAPIs.ts +0 -49
  182. package/src/maplibre/GeocoderControl/GeocoderControl.stories.svelte +0 -78
  183. package/src/maplibre/GeocoderControl/GeocoderControl.svelte +0 -211
  184. package/src/maplibre/Map/FallbackStyle.ts +0 -18
  185. package/src/maplibre/Map/Map.stories.svelte +0 -118
  186. package/src/maplibre/Map/Map.svelte +0 -287
  187. package/src/maplibre/MapControl/MapControl.stories.svelte +0 -56
  188. package/src/maplibre/MapControl/MapControl.svelte +0 -41
  189. package/src/maplibre/MapStyle/SWRDataLabLight.stories.svelte +0 -41
  190. package/src/maplibre/MapStyle/SWRDataLabLight.ts +0 -72
  191. package/src/maplibre/MapStyle/components/Admin.ts +0 -173
  192. package/src/maplibre/MapStyle/components/Buildings.ts +0 -23
  193. package/src/maplibre/MapStyle/components/Landuse.ts +0 -499
  194. package/src/maplibre/MapStyle/components/Natural.ts +0 -1
  195. package/src/maplibre/MapStyle/components/PlaceLabels.ts +0 -199
  196. package/src/maplibre/MapStyle/components/Roads.ts +0 -2345
  197. package/src/maplibre/MapStyle/components/Transit.ts +0 -507
  198. package/src/maplibre/MapStyle/components/Walking.ts +0 -1538
  199. package/src/maplibre/MapStyle/tokens.ts +0 -21
  200. package/src/maplibre/NavigationControl/NavigationControl.stories.svelte +0 -39
  201. package/src/maplibre/NavigationControl/NavigationControl.svelte +0 -36
  202. package/src/maplibre/ScaleControl/ScaleControl.stories.svelte +0 -71
  203. package/src/maplibre/ScaleControl/ScaleControl.svelte +0 -25
  204. package/src/maplibre/Source/MapSource.stories.svelte +0 -9
  205. package/src/maplibre/Source/MapSource.svelte +0 -61
  206. package/src/maplibre/Source/source.ts +0 -89
  207. package/src/maplibre/Tooltip/Tooltip.stories.svelte +0 -192
  208. package/src/maplibre/Tooltip/Tooltip.svelte +0 -183
  209. package/src/maplibre/VectorLayer/VectorLayer.stories.svelte +0 -65
  210. package/src/maplibre/VectorLayer/VectorLayer.svelte +0 -146
  211. package/src/maplibre/VectorTileSource/VectorTileSource.stories.svelte +0 -46
  212. package/src/maplibre/VectorTileSource/VectorTileSource.svelte +0 -24
  213. package/src/maplibre/WithLinkLocation/WithLinkLocation.stories.svelte +0 -29
  214. package/src/maplibre/WithLinkLocation/WithLinkLocation.svelte +0 -83
  215. package/src/maplibre/context.svelte.ts +0 -89
  216. package/src/maplibre/utils.ts +0 -52
  217. package/src/utils/getEmbedContext.js +0 -28
  218. package/src/utils/slugify.ts +0 -12
  219. package/static/favicon.png +0 -0
  220. package/svelte.config.js +0 -18
  221. package/tsconfig.json +0 -19
  222. package/vite.config.ts +0 -6
  223. package/vitest.workspace.ts +0 -32
  224. /package/{src → dist}/Autocomplete/index.js +0 -0
  225. /package/{src → dist}/Button/index.js +0 -0
  226. /package/{src/Caption/index.ts → dist/Caption/index.d.ts} +0 -0
  227. /package/{src → dist}/Card/index.js +0 -0
  228. /package/{src → dist}/ChartFooter/ChartFooter.mdx +0 -0
  229. /package/{src → dist}/ChartFooter/index.js +0 -0
  230. /package/{src → dist}/ChartHeader/ChartHeader.mdx +0 -0
  231. /package/{src → dist}/ChartHeader/index.js +0 -0
  232. /package/{src → dist}/ChartList/ChartList.mdx +0 -0
  233. /package/{src/ChartList/index.ts → dist/ChartList/index.d.ts} +0 -0
  234. /package/{src/Copy/index.ts → dist/Copy/index.d.ts} +0 -0
  235. /package/{src → dist}/DesignTokens/DesignTokens.mdx +0 -0
  236. /package/{src → dist}/DesignTokens/index.js +0 -0
  237. /package/{src → dist}/FormLabel/FormLabel.mdx +0 -0
  238. /package/{src/FormLabel/index.ts → dist/FormLabel/index.d.ts} +0 -0
  239. /package/{src/Headline/index.ts → dist/Headline/index.d.ts} +0 -0
  240. /package/{src → dist}/HighlightCard/index.js +0 -0
  241. /package/{src → dist}/Input/index.js +0 -0
  242. /package/{src → dist}/Intro.mdx +0 -0
  243. /package/{src → dist}/Logotype/Logotype.svelte +0 -0
  244. /package/{src → dist}/Middot/Middot.svelte +0 -0
  245. /package/{src → dist}/Middot/index.js +0 -0
  246. /package/{src/Note/index.ts → dist/Note/index.d.ts} +0 -0
  247. /package/{src → dist}/Select/Select.mdx +0 -0
  248. /package/{src → dist}/Select/index.js +0 -0
  249. /package/{src → dist}/Select/mock_data/jobs.json +0 -0
  250. /package/{src → dist}/Switcher/Switcher.mdx +0 -0
  251. /package/{src → dist}/Switcher/index.js +0 -0
  252. /package/{src → dist}/app.d.ts +0 -0
  253. /package/{src → dist}/app.html +0 -0
  254. /package/{src → dist}/assets/close-circle.svg.svelte +0 -0
  255. /package/{src → dist}/assets/grow.svg.svelte +0 -0
  256. /package/{src → dist}/assets/hand-pointer.svg.svelte +0 -0
  257. /package/{src → dist}/assets/shrink.svg.svelte +0 -0
  258. /package/{src → dist}/assets/tap.svg.svelte +0 -0
  259. /package/{src → dist}/assets/times-circle-solid.svg.svelte +0 -0
  260. /package/{src → dist}/index.js +0 -0
  261. /package/{src → dist}/maplibre/AttributionControl/index.js +0 -0
  262. /package/{src → dist}/maplibre/GeocoderControl/index.js +0 -0
  263. /package/{src → dist}/maplibre/Map/index.js +0 -0
  264. /package/{src → dist}/maplibre/MapControl/MapControl.mdx +0 -0
  265. /package/{src → dist}/maplibre/MapControl/index.js +0 -0
  266. /package/{src → dist}/maplibre/MapStyle/SWRDataLabLight.mdx +0 -0
  267. /package/{src → dist}/maplibre/MapStyle/index.js +0 -0
  268. /package/{src → dist}/maplibre/Maplibre.mdx +0 -0
  269. /package/{src → dist}/maplibre/NavigationControl/index.js +0 -0
  270. /package/{src → dist}/maplibre/ScaleControl/index.js +0 -0
  271. /package/{src → dist}/maplibre/Source/index.js +0 -0
  272. /package/{src → dist}/maplibre/Tooltip/index.js +0 -0
  273. /package/{src → dist}/maplibre/VectorLayer/index.js +0 -0
  274. /package/{src → dist}/maplibre/VectorTileSource/VectorTileSource.mdx +0 -0
  275. /package/{src → dist}/maplibre/VectorTileSource/index.js +0 -0
  276. /package/{src → dist}/maplibre/WithLinkLocation/WithLinkLocation.mdx +0 -0
  277. /package/{src → dist}/maplibre/WithLinkLocation/index.js +0 -0
  278. /package/{src → dist}/styles/base.scss +0 -0
  279. /package/{src → dist}/utils/formatDate.js +0 -0
  280. /package/{src → dist}/utils/formatNumber.js +0 -0
  281. /package/{src → dist}/utils/getColorsBetween.js +0 -0
  282. /package/{src → dist}/utils/getComparisonDiffs.js +0 -0
  283. /package/{src → dist}/utils/getLaenderFromTopo.js +0 -0
  284. /package/{src → dist}/utils/getLaenderNicenameFromAgs.js +0 -0
  285. /package/{src → dist}/utils/isSvelteComponent.js +0 -0
  286. /package/{src → dist}/utils/prepareSophoraModel.js +0 -0
  287. /package/{src → dist}/utils/scrollIntoViewWithOffset.js +0 -0
  288. /package/{src → dist}/utils/topoToGeo.js +0 -0
@@ -0,0 +1,2327 @@
1
+ import {} from '../../types';
2
+ import tokens from '../tokens';
3
+ const street_layout = {
4
+ 'line-join': 'round',
5
+ 'line-cap': 'butt'
6
+ };
7
+ const motorway = {
8
+ line_color: tokens.street_primary,
9
+ line_width: {
10
+ stops: [
11
+ [6, 1],
12
+ [7, 1.5],
13
+ [11, 2],
14
+ [14, 12]
15
+ ]
16
+ },
17
+ line_opacity: {
18
+ stops: [
19
+ [6, 0],
20
+ [7, 1]
21
+ ]
22
+ }
23
+ };
24
+ const motorway_outline = {
25
+ line_color: tokens.street_primary_outline,
26
+ line_width: {
27
+ stops: [
28
+ [10, 0],
29
+ [11, 2],
30
+ [14, 14]
31
+ ]
32
+ }
33
+ };
34
+ const motorway_link = {
35
+ line_width: {
36
+ stops: [
37
+ [6, 0],
38
+ [7, 1],
39
+ [12, 2],
40
+ [14, 6]
41
+ ]
42
+ }
43
+ };
44
+ const motorway_link_outline = {
45
+ line_width: {
46
+ stops: [
47
+ [6, 0],
48
+ [7, 2],
49
+ [12, 3],
50
+ [14, 8]
51
+ ]
52
+ }
53
+ };
54
+ const street_primary = {
55
+ line_color: tokens.street_primary,
56
+ line_width: {
57
+ stops: [
58
+ [8, 0],
59
+ [10, 1],
60
+ [12, 2],
61
+ [14, 3],
62
+ [16, 10],
63
+ [18, 34],
64
+ [19, 70],
65
+ [20, 140]
66
+ ]
67
+ },
68
+ line_opacity: {
69
+ stops: [
70
+ [8, 0],
71
+ [9, 1]
72
+ ]
73
+ }
74
+ };
75
+ const street_primary_outline = {
76
+ line_color: tokens.street_primary_outline,
77
+ line_width: {
78
+ stops: [
79
+ [11, 0],
80
+ [12, 2],
81
+ [14, 5],
82
+ [16, 12],
83
+ [18, 36],
84
+ [19, 74],
85
+ [20, 144]
86
+ ]
87
+ },
88
+ line_opacity: {
89
+ stops: [
90
+ [8, 0],
91
+ [9, 1]
92
+ ]
93
+ }
94
+ };
95
+ const street_secondary = {
96
+ line_width: {
97
+ stops: [
98
+ [11, 1],
99
+ [14, 4],
100
+ [16, 6],
101
+ [18, 28],
102
+ [19, 64],
103
+ [20, 130]
104
+ ]
105
+ }
106
+ };
107
+ const street_secondary_outline = {
108
+ line_width: {
109
+ stops: [
110
+ [12, 2],
111
+ [14, 5],
112
+ [16, 7],
113
+ [18, 14],
114
+ [20, 40]
115
+ ]
116
+ }
117
+ };
118
+ const street_residential = {
119
+ line_color: tokens.street_tertiary,
120
+ line_width: {
121
+ stops: [
122
+ [13, 1],
123
+ [14, 2],
124
+ [16, 5],
125
+ [18, 24],
126
+ [19, 60],
127
+ [20, 120]
128
+ ]
129
+ },
130
+ line_opacity: {
131
+ stops: [
132
+ [12, 0],
133
+ [13, 1]
134
+ ]
135
+ }
136
+ };
137
+ const street_residential_outline = {
138
+ line_color: tokens.street_tertiary_outline,
139
+ line_width: {
140
+ stops: [
141
+ [14, 0],
142
+ [15, 4]
143
+ ]
144
+ },
145
+ line_opacity: {
146
+ stops: [
147
+ [12, 0],
148
+ [13, 1]
149
+ ]
150
+ }
151
+ };
152
+ export default function makeRoads() {
153
+ const roadLabels = [
154
+ {
155
+ id: 'label-street-livingstreet',
156
+ filter: ['==', 'kind', 'living_street'],
157
+ minzoom: 14,
158
+ layout: {
159
+ 'text-field': '{name_de}',
160
+ 'text-font': tokens.sans_regular,
161
+ 'symbol-placement': 'line',
162
+ 'text-anchor': 'center',
163
+ 'text-size': {
164
+ stops: [
165
+ [12, 10],
166
+ [15, 13]
167
+ ]
168
+ }
169
+ },
170
+ paint: {
171
+ 'text-color': 'hsl(240,0%,23%)',
172
+ 'text-halo-color': 'hsla(0,0%,100%,0.8)',
173
+ 'text-halo-width': 2,
174
+ 'text-halo-blur': 1
175
+ }
176
+ },
177
+ {
178
+ id: 'label-street-residential',
179
+ filter: ['==', 'kind', 'residential'],
180
+ minzoom: 15,
181
+ layout: {
182
+ 'text-field': '{name_de}',
183
+ 'text-font': tokens.sans_regular,
184
+ 'symbol-placement': 'line',
185
+ 'text-anchor': 'center',
186
+ 'text-size': {
187
+ stops: [
188
+ [12, 10],
189
+ [15, 13]
190
+ ]
191
+ }
192
+ },
193
+ paint: {
194
+ 'text-color': 'hsl(240,0%,23%)',
195
+ 'text-halo-color': 'hsla(0,0%,100%,0.8)',
196
+ 'text-halo-width': 2,
197
+ 'text-halo-blur': 1
198
+ }
199
+ },
200
+ {
201
+ id: 'label-street-unclassified',
202
+ filter: ['==', 'kind', 'unclassified'],
203
+ minzoom: 14,
204
+ layout: {
205
+ 'text-field': '{name_de}',
206
+ 'text-font': tokens.sans_regular,
207
+ 'symbol-placement': 'line',
208
+ 'text-anchor': 'center',
209
+ 'text-size': {
210
+ stops: [
211
+ [12, 10],
212
+ [15, 13]
213
+ ]
214
+ }
215
+ },
216
+ paint: {
217
+ 'text-color': tokens.label_secondary,
218
+ 'text-halo-color': tokens.background,
219
+ 'text-halo-width': 2
220
+ }
221
+ },
222
+ {
223
+ id: 'label-street-tertiary',
224
+ filter: ['==', 'kind', 'tertiary'],
225
+ minzoom: 14,
226
+ layout: {
227
+ 'text-field': '{name_de}',
228
+ 'text-font': tokens.sans_regular,
229
+ 'symbol-placement': 'line',
230
+ 'text-anchor': 'center',
231
+ 'text-size': {
232
+ stops: [
233
+ [12, 10],
234
+ [15, 13]
235
+ ]
236
+ }
237
+ },
238
+ paint: {
239
+ 'text-color': tokens.label_secondary,
240
+ 'text-halo-color': tokens.background,
241
+ 'text-halo-width': 2,
242
+ 'text-halo-blur': 1
243
+ }
244
+ },
245
+ {
246
+ id: 'label-street-secondary',
247
+ filter: ['==', 'kind', 'secondary'],
248
+ minzoom: 14,
249
+ layout: {
250
+ 'text-field': '{name_de}',
251
+ 'text-font': tokens.sans_regular,
252
+ 'symbol-placement': 'line',
253
+ 'text-anchor': 'center',
254
+ 'text-size': {
255
+ stops: [
256
+ [12, 10],
257
+ [15, 13]
258
+ ]
259
+ }
260
+ },
261
+ paint: {
262
+ 'text-color': tokens.label_primary,
263
+ 'text-halo-color': tokens.background,
264
+ 'text-halo-width': 2
265
+ }
266
+ },
267
+ {
268
+ id: 'label-street-primary',
269
+ filter: ['==', 'kind', 'primary'],
270
+ minzoom: 14,
271
+ layout: {
272
+ 'text-field': '{name_de}',
273
+ 'text-letter-spacing': 0.025,
274
+ 'text-font': tokens.sans_regular,
275
+ 'symbol-placement': 'line',
276
+ 'text-anchor': 'center',
277
+ 'text-size': {
278
+ stops: [
279
+ [12, 10],
280
+ [15, 13]
281
+ ]
282
+ }
283
+ },
284
+ paint: {
285
+ 'text-color': tokens.label_secondary,
286
+ 'text-halo-color': tokens.background,
287
+ 'text-halo-width': 2
288
+ }
289
+ },
290
+ {
291
+ id: 'label-street-trunk',
292
+ filter: ['==', 'kind', 'trunk'],
293
+ minzoom: 13,
294
+ layout: {
295
+ 'text-field': '{name_de}',
296
+ 'text-font': tokens.sans_regular,
297
+ 'symbol-placement': 'line',
298
+ 'text-anchor': 'center',
299
+ 'text-size': {
300
+ stops: [
301
+ [12, 10],
302
+ [15, 13]
303
+ ]
304
+ }
305
+ },
306
+ paint: {
307
+ 'text-color': tokens.label_primary,
308
+ 'text-halo-color': tokens.background,
309
+ 'text-halo-width': 2
310
+ }
311
+ }
312
+ ].map((el) => {
313
+ return {
314
+ type: 'symbol',
315
+ source: 'versatiles-osm',
316
+ 'source-layer': 'street_labels',
317
+ ...el
318
+ };
319
+ });
320
+ const roadBridges = [
321
+ {
322
+ id: 'bridge-street-service:bridge',
323
+ filter: [
324
+ 'all',
325
+ ['==', 'kind', 'service'],
326
+ ['==', 'bridge', true],
327
+ ['!=', 'service', 'driveway']
328
+ ],
329
+ layout: {
330
+ 'line-cap': 'butt',
331
+ 'line-join': 'round'
332
+ },
333
+ paint: {
334
+ 'line-color': 'rgb(239,239,239)',
335
+ 'line-opacity': {
336
+ stops: [
337
+ [14, 0],
338
+ [15, 1]
339
+ ]
340
+ },
341
+ 'line-width': {
342
+ stops: [
343
+ [14, 3],
344
+ [16, 6],
345
+ [18, 25],
346
+ [19, 67],
347
+ [20, 134]
348
+ ]
349
+ }
350
+ }
351
+ },
352
+ {
353
+ id: 'bridge-street-livingstreet:bridge',
354
+ filter: ['all', ['==', 'kind', 'living_street'], ['==', 'bridge', true]],
355
+ layout: {
356
+ 'line-cap': 'butt',
357
+ 'line-join': 'round'
358
+ },
359
+ paint: {
360
+ 'line-color': 'rgb(239,239,239)',
361
+ 'line-opacity': {
362
+ stops: [
363
+ [12, 0],
364
+ [13, 1]
365
+ ]
366
+ },
367
+ 'line-width': {
368
+ stops: [
369
+ [12, 3],
370
+ [14, 4],
371
+ [16, 8],
372
+ [18, 36],
373
+ [19, 90],
374
+ [20, 179]
375
+ ]
376
+ }
377
+ }
378
+ },
379
+ {
380
+ id: 'bridge-street-residential:bridge',
381
+ filter: ['all', ['==', 'kind', 'residential'], ['==', 'bridge', true]],
382
+ layout: {
383
+ 'line-cap': 'butt',
384
+ 'line-join': 'round'
385
+ },
386
+ paint: {
387
+ 'line-color': street_residential.line_color,
388
+ 'line-opacity': street_residential.line_opacity,
389
+ 'line-width': street_residential.line_opacity
390
+ }
391
+ },
392
+ {
393
+ id: 'bridge-street-unclassified:bridge',
394
+ filter: ['all', ['==', 'kind', 'unclassified'], ['==', 'bridge', true]],
395
+ layout: {
396
+ 'line-cap': 'butt',
397
+ 'line-join': 'round'
398
+ },
399
+ paint: {
400
+ 'line-color': 'rgb(239,239,239)',
401
+ 'line-opacity': {
402
+ stops: [
403
+ [12, 0],
404
+ [13, 1]
405
+ ]
406
+ },
407
+ 'line-width': {
408
+ stops: [
409
+ [12, 3],
410
+ [14, 4],
411
+ [16, 8],
412
+ [18, 36],
413
+ [19, 90],
414
+ [20, 179]
415
+ ]
416
+ }
417
+ }
418
+ },
419
+ {
420
+ id: 'bridge-street-tertiary-link:bridge',
421
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'tertiary'], ['==', 'link', true]],
422
+ layout: {
423
+ 'line-cap': 'butt',
424
+ 'line-join': 'round'
425
+ },
426
+ paint: {
427
+ 'line-color': 'rgb(239,239,239)',
428
+ 'line-opacity': {
429
+ stops: [
430
+ [12, 0],
431
+ [13, 1]
432
+ ]
433
+ },
434
+ 'line-width': {
435
+ stops: [
436
+ [12, 3],
437
+ [14, 4],
438
+ [16, 8],
439
+ [18, 36],
440
+ [19, 90],
441
+ [20, 179]
442
+ ]
443
+ }
444
+ }
445
+ },
446
+ {
447
+ id: 'bridge-street-secondary-link:bridge',
448
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'secondary'], ['==', 'link', true]],
449
+ layout: {
450
+ 'line-cap': 'butt',
451
+ 'line-join': 'round'
452
+ },
453
+ paint: {
454
+ 'line-color': 'rgb(239,239,239)',
455
+ 'line-opacity': 0.5,
456
+ 'line-width': {
457
+ stops: [
458
+ [12, 3],
459
+ [14, 4],
460
+ [16, 10],
461
+ [18, 20],
462
+ [20, 56]
463
+ ]
464
+ }
465
+ },
466
+ minzoom: 13
467
+ },
468
+ {
469
+ id: 'bridge-street-primary-link:bridge',
470
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'primary'], ['==', 'link', true]],
471
+ layout: {
472
+ 'line-cap': 'butt',
473
+ 'line-join': 'round'
474
+ },
475
+ paint: {
476
+ 'line-color': street_primary.line_color,
477
+ 'line-width': street_primary.line_width
478
+ },
479
+ minzoom: 13
480
+ },
481
+ {
482
+ id: 'bridge-street-trunk-link:bridge',
483
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'trunk'], ['==', 'link', true]],
484
+ layout: {
485
+ 'line-cap': 'butt',
486
+ 'line-join': 'round'
487
+ },
488
+ paint: {
489
+ 'line-color': motorway.line_color,
490
+ 'line-opacity': 0.5,
491
+ 'line-width': {
492
+ stops: [
493
+ [12, 3],
494
+ [14, 4],
495
+ [16, 10],
496
+ [18, 20],
497
+ [20, 56]
498
+ ]
499
+ }
500
+ },
501
+ minzoom: 13
502
+ },
503
+ {
504
+ id: 'bridge-street-motorway-link:bridge',
505
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'motorway'], ['==', 'link', true]],
506
+ layout: {
507
+ 'line-cap': 'butt',
508
+ 'line-join': 'round'
509
+ },
510
+ paint: {
511
+ 'line-color': tokens.street_primary,
512
+ 'line-width': motorway_link.line_width,
513
+ 'line-opacity': motorway.line_opacity
514
+ },
515
+ minzoom: 12
516
+ },
517
+ {
518
+ id: 'bridge-street-tertiary:bridge',
519
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'tertiary'], ['!=', 'link', true]],
520
+ layout: {
521
+ 'line-cap': 'butt',
522
+ 'line-join': 'round'
523
+ },
524
+ paint: {
525
+ 'line-color': 'rgb(239,239,239)',
526
+ 'line-opacity': {
527
+ stops: [
528
+ [12, 0],
529
+ [13, 1]
530
+ ]
531
+ },
532
+ 'line-width': {
533
+ stops: [
534
+ [12, 3],
535
+ [14, 4],
536
+ [16, 8],
537
+ [18, 36],
538
+ [19, 90],
539
+ [20, 179]
540
+ ]
541
+ }
542
+ }
543
+ },
544
+ {
545
+ id: 'bridge-street-secondary:bridge',
546
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'secondary'], ['!=', 'link', true]],
547
+ layout: {
548
+ 'line-cap': 'butt',
549
+ 'line-join': 'round'
550
+ },
551
+ paint: {
552
+ 'line-color': 'rgb(239,239,239)',
553
+ 'line-opacity': {
554
+ stops: [
555
+ [11, 0],
556
+ [12, 1]
557
+ ]
558
+ },
559
+ 'line-width': {
560
+ stops: [
561
+ [11, 3],
562
+ [14, 7],
563
+ [16, 11],
564
+ [18, 42],
565
+ [19, 95],
566
+ [20, 193]
567
+ ]
568
+ }
569
+ }
570
+ },
571
+ {
572
+ id: 'bridge-street-primary:bridge',
573
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'primary'], ['!=', 'link', true]],
574
+ layout: {
575
+ 'line-cap': 'butt',
576
+ 'line-join': 'round'
577
+ },
578
+ paint: {
579
+ 'line-color': street_primary.line_color,
580
+ 'line-width': street_primary.line_width
581
+ }
582
+ },
583
+ {
584
+ id: 'bridge-street-trunk:bridge',
585
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'trunk'], ['!=', 'link', true]],
586
+ layout: {
587
+ 'line-cap': 'butt',
588
+ 'line-join': 'round'
589
+ },
590
+ paint: {
591
+ 'line-color': motorway.line_color,
592
+ 'line-width': motorway.line_width,
593
+ 'line-opacity': motorway.line_opacity
594
+ }
595
+ },
596
+ {
597
+ id: 'bridge-street-motorway:bridge',
598
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'motorway'], ['!=', 'link', true]],
599
+ layout: {
600
+ 'line-cap': 'butt',
601
+ 'line-join': 'round'
602
+ },
603
+ paint: {
604
+ 'line-color': tokens.street_primary,
605
+ 'line-width': motorway.line_width,
606
+ 'line-opacity': motorway.line_opacity
607
+ }
608
+ },
609
+ {
610
+ id: 'bridge-street-service:outline',
611
+ filter: [
612
+ 'all',
613
+ ['==', 'kind', 'service'],
614
+ ['==', 'bridge', true],
615
+ ['!=', 'service', 'driveway']
616
+ ],
617
+ paint: {
618
+ 'line-color': 'rgb(217,217,217)',
619
+ 'line-width': {
620
+ stops: [
621
+ [14, 2],
622
+ [16, 4],
623
+ [18, 18],
624
+ [19, 48],
625
+ [20, 96]
626
+ ]
627
+ },
628
+ 'line-opacity': {
629
+ stops: [
630
+ [14, 0],
631
+ [15, 1]
632
+ ]
633
+ }
634
+ },
635
+ layout: street_layout
636
+ },
637
+ {
638
+ id: 'bridge-street-livingstreet:outline',
639
+ filter: ['all', ['==', 'kind', 'living_street'], ['==', 'bridge', true]],
640
+ paint: {
641
+ 'line-color': 'rgb(217,217,217)',
642
+ 'line-width': {
643
+ stops: [
644
+ [12, 2],
645
+ [14, 3],
646
+ [16, 6],
647
+ [18, 26],
648
+ [19, 64],
649
+ [20, 128]
650
+ ]
651
+ },
652
+ 'line-opacity': {
653
+ stops: [
654
+ [12, 0],
655
+ [13, 1]
656
+ ]
657
+ }
658
+ },
659
+ layout: street_layout
660
+ },
661
+ {
662
+ id: 'bridge-street-residential:outline',
663
+ filter: ['all', ['==', 'kind', 'residential'], ['==', 'bridge', true]],
664
+ paint: {
665
+ 'line-color': street_residential_outline.line_color,
666
+ 'line-width': street_residential_outline.line_width,
667
+ 'line-opacity': street_residential_outline.line_opacity
668
+ },
669
+ layout: street_layout
670
+ },
671
+ {
672
+ id: 'bridge-street-unclassified:outline',
673
+ filter: ['all', ['==', 'kind', 'unclassified'], ['==', 'bridge', true]],
674
+ paint: {
675
+ 'line-color': 'rgb(217,217,217)',
676
+ 'line-width': {
677
+ stops: [
678
+ [12, 2],
679
+ [14, 3],
680
+ [16, 6],
681
+ [18, 26],
682
+ [19, 64],
683
+ [20, 128]
684
+ ]
685
+ },
686
+ 'line-opacity': {
687
+ stops: [
688
+ [12, 0],
689
+ [13, 1]
690
+ ]
691
+ }
692
+ },
693
+ layout: street_layout
694
+ },
695
+ {
696
+ id: 'bridge-street-tertiary-link:outline',
697
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'tertiary'], ['==', 'link', true]],
698
+ paint: {
699
+ 'line-color': 'rgb(217,217,217)',
700
+ 'line-width': {
701
+ stops: [
702
+ [12, 2],
703
+ [14, 3],
704
+ [16, 6],
705
+ [18, 26],
706
+ [19, 64],
707
+ [20, 128]
708
+ ]
709
+ },
710
+ 'line-opacity': {
711
+ stops: [
712
+ [12, 0],
713
+ [13, 1]
714
+ ]
715
+ }
716
+ },
717
+ layout: street_layout
718
+ },
719
+ {
720
+ id: 'bridge-street-secondary-link:outline',
721
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'secondary'], ['==', 'link', true]],
722
+ paint: {
723
+ 'line-color': tokens.street_secondary_outline,
724
+ 'line-width': street_secondary_outline.line_width
725
+ },
726
+ layout: street_layout,
727
+ minzoom: 13
728
+ },
729
+ {
730
+ id: 'bridge-street-primary-link:outline',
731
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'primary'], ['==', 'link', true]],
732
+ paint: {
733
+ 'line-color': street_primary.line_color,
734
+ 'line-width': street_primary.line_width
735
+ },
736
+ layout: street_layout,
737
+ minzoom: 13
738
+ },
739
+ {
740
+ id: 'bridge-street-trunk-link:outline',
741
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'trunk'], ['==', 'link', true]],
742
+ paint: {
743
+ 'line-color': motorway_outline.line_color,
744
+ 'line-width': motorway_outline.line_width
745
+ },
746
+ layout: street_layout,
747
+ minzoom: 13
748
+ },
749
+ {
750
+ id: 'bridge-street-motorway-link:outline',
751
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'motorway'], ['==', 'link', true]],
752
+ paint: {
753
+ 'line-color': motorway_outline.line_color,
754
+ 'line-width': motorway_link_outline.line_width
755
+ },
756
+ layout: street_layout,
757
+ minzoom: 12
758
+ },
759
+ {
760
+ id: 'bridge-street-tertiary:outline',
761
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'tertiary'], ['!=', 'link', true]],
762
+ paint: {
763
+ 'line-color': 'rgb(217,217,217)',
764
+ 'line-width': {
765
+ stops: [
766
+ [12, 2],
767
+ [14, 3],
768
+ [16, 6],
769
+ [18, 26],
770
+ [19, 64],
771
+ [20, 128]
772
+ ]
773
+ },
774
+ 'line-opacity': {
775
+ stops: [
776
+ [12, 0],
777
+ [13, 1]
778
+ ]
779
+ }
780
+ },
781
+ layout: street_layout
782
+ },
783
+ {
784
+ id: 'bridge-street-secondary:outline',
785
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'secondary'], ['!=', 'link', true]],
786
+ paint: {
787
+ 'line-color': tokens.street_secondary_outline,
788
+ 'line-width': street_secondary_outline.line_width,
789
+ 'line-opacity': {
790
+ stops: [
791
+ [11, 0],
792
+ [12, 1]
793
+ ]
794
+ }
795
+ },
796
+ layout: street_layout
797
+ },
798
+ {
799
+ id: 'bridge-street-primary:outline',
800
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'primary'], ['!=', 'link', true]],
801
+ paint: {
802
+ 'line-color': street_primary_outline.line_color,
803
+ 'line-width': street_primary_outline.line_width
804
+ },
805
+ layout: street_layout
806
+ },
807
+ {
808
+ id: 'bridge-street-trunk:outline',
809
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'trunk'], ['!=', 'link', true]],
810
+ paint: {
811
+ 'line-color': motorway_outline.line_color,
812
+ 'line-width': motorway_outline.line_width
813
+ },
814
+ layout: street_layout
815
+ },
816
+ {
817
+ id: 'bridge-street-motorway:outline',
818
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'motorway'], ['!=', 'link', true]],
819
+ paint: {
820
+ 'line-color': motorway_outline.line_color,
821
+ 'line-width': motorway_outline.line_width
822
+ },
823
+ layout: street_layout
824
+ },
825
+ {
826
+ id: 'bridge-street-service',
827
+ filter: [
828
+ 'all',
829
+ ['==', 'kind', 'service'],
830
+ ['==', 'bridge', true],
831
+ ['!=', 'service', 'driveway']
832
+ ],
833
+ paint: {
834
+ 'line-color': 'hsl(0,0%,100%)',
835
+ 'line-width': {
836
+ stops: [
837
+ [14, 1],
838
+ [16, 3],
839
+ [18, 16],
840
+ [19, 44],
841
+ [20, 88]
842
+ ]
843
+ },
844
+ 'line-opacity': {
845
+ stops: [
846
+ [14, 0],
847
+ [15, 1]
848
+ ]
849
+ }
850
+ },
851
+ layout: street_layout
852
+ },
853
+ {
854
+ id: 'bridge-street-livingstreet',
855
+ filter: ['all', ['==', 'kind', 'living_street'], ['==', 'bridge', true]],
856
+ paint: {
857
+ 'line-color': 'hsl(0,0%,100%)',
858
+ 'line-width': {
859
+ stops: [
860
+ [12, 1],
861
+ [14, 2],
862
+ [16, 5],
863
+ [18, 24],
864
+ [19, 60],
865
+ [20, 120]
866
+ ]
867
+ },
868
+ 'line-opacity': {
869
+ stops: [
870
+ [12, 0],
871
+ [13, 1]
872
+ ]
873
+ }
874
+ },
875
+ layout: street_layout
876
+ },
877
+ {
878
+ id: 'bridge-street-residential',
879
+ filter: ['all', ['==', 'kind', 'residential'], ['==', 'bridge', true]],
880
+ paint: {
881
+ 'line-color': street_residential.line_color,
882
+ 'line-width': street_residential.line_width,
883
+ 'line-opacity': street_residential.line_opacity
884
+ },
885
+ layout: street_layout
886
+ },
887
+ {
888
+ id: 'bridge-street-unclassified',
889
+ filter: ['all', ['==', 'kind', 'unclassified'], ['==', 'bridge', true]],
890
+ paint: {
891
+ 'line-color': 'hsl(0,0%,100%)',
892
+ 'line-width': {
893
+ stops: [
894
+ [12, 1],
895
+ [14, 2],
896
+ [16, 5],
897
+ [18, 24],
898
+ [19, 60],
899
+ [20, 120]
900
+ ]
901
+ },
902
+ 'line-opacity': {
903
+ stops: [
904
+ [12, 0],
905
+ [13, 1]
906
+ ]
907
+ }
908
+ },
909
+ layout: street_layout
910
+ },
911
+ {
912
+ id: 'bridge-street-tertiary-link',
913
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'tertiary'], ['==', 'link', true]],
914
+ paint: {
915
+ 'line-color': 'hsl(0,0%,100%)',
916
+ 'line-width': {
917
+ stops: [
918
+ [12, 1],
919
+ [14, 2],
920
+ [16, 5],
921
+ [18, 24],
922
+ [19, 60],
923
+ [20, 120]
924
+ ]
925
+ },
926
+ 'line-opacity': {
927
+ stops: [
928
+ [12, 0],
929
+ [13, 1]
930
+ ]
931
+ }
932
+ },
933
+ layout: street_layout
934
+ },
935
+ {
936
+ id: 'bridge-street-secondary-link',
937
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'secondary'], ['==', 'link', true]],
938
+ paint: {
939
+ 'line-color': tokens.street_secondary,
940
+ 'line-width': street_secondary.line_width
941
+ },
942
+ layout: street_layout,
943
+ minzoom: 13
944
+ },
945
+ {
946
+ id: 'bridge-street-primary-link',
947
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'primary'], ['==', 'link', true]],
948
+ paint: {
949
+ 'line-color': street_primary.line_color,
950
+ 'line-width': street_primary.line_width
951
+ },
952
+ layout: street_layout,
953
+ minzoom: 13
954
+ },
955
+ {
956
+ id: 'bridge-street-trunk-link',
957
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'trunk'], ['==', 'link', true]],
958
+ paint: {
959
+ 'line-color': tokens.street_primary,
960
+ 'line-width': motorway_link.line_width
961
+ },
962
+ layout: street_layout,
963
+ minzoom: 13
964
+ },
965
+ {
966
+ id: 'bridge-street-motorway-link',
967
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'motorway'], ['==', 'link', true]],
968
+ paint: {
969
+ 'line-color': tokens.street_primary,
970
+ 'line-width': motorway_link.line_width,
971
+ 'line-opacity': motorway.line_opacity
972
+ },
973
+ layout: street_layout,
974
+ minzoom: 12
975
+ },
976
+ {
977
+ id: 'bridge-street-tertiary',
978
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'tertiary'], ['!=', 'link', true]],
979
+ paint: {
980
+ 'line-color': 'hsl(0,0%,100%)',
981
+ 'line-width': {
982
+ stops: [
983
+ [12, 1],
984
+ [14, 2],
985
+ [16, 5],
986
+ [18, 24],
987
+ [19, 60],
988
+ [20, 120]
989
+ ]
990
+ },
991
+ 'line-opacity': {
992
+ stops: [
993
+ [12, 0],
994
+ [13, 1]
995
+ ]
996
+ }
997
+ },
998
+ layout: street_layout
999
+ },
1000
+ {
1001
+ id: 'bridge-street-secondary',
1002
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'secondary'], ['!=', 'link', true]],
1003
+ paint: {
1004
+ 'line-color': tokens.street_secondary,
1005
+ 'line-width': street_secondary.line_width,
1006
+ 'line-opacity': {
1007
+ stops: [
1008
+ [11, 0],
1009
+ [12, 1]
1010
+ ]
1011
+ }
1012
+ },
1013
+ layout: street_layout
1014
+ },
1015
+ {
1016
+ id: 'bridge-street-primary',
1017
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'primary'], ['!=', 'link', true]],
1018
+ paint: {
1019
+ 'line-color': street_primary.line_color,
1020
+ 'line-width': street_primary.line_width,
1021
+ 'line-opacity': {
1022
+ stops: [
1023
+ [8, 0],
1024
+ [9, 1]
1025
+ ]
1026
+ }
1027
+ },
1028
+ layout: street_layout
1029
+ },
1030
+ {
1031
+ id: 'bridge-street-trunk',
1032
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'trunk'], ['!=', 'link', true]],
1033
+ paint: {
1034
+ 'line-color': tokens.street_primary,
1035
+ 'line-width': motorway.line_width,
1036
+ 'line-opacity': motorway.line_opacity
1037
+ },
1038
+ layout: street_layout
1039
+ },
1040
+ {
1041
+ id: 'bridge-street-motorway',
1042
+ filter: ['all', ['==', 'bridge', true], ['in', 'kind', 'motorway'], ['!=', 'link', true]],
1043
+ paint: {
1044
+ 'line-color': tokens.street_primary,
1045
+ 'line-width': motorway.line_width,
1046
+ 'line-opacity': motorway.line_opacity
1047
+ },
1048
+ layout: street_layout
1049
+ }
1050
+ ].map((el) => {
1051
+ return { source: 'versatiles-osm', type: 'line', 'source-layer': 'streets', ...el };
1052
+ });
1053
+ const roadTunnels = [
1054
+ {
1055
+ id: 'tunnel-street-service:outline',
1056
+ type: 'line',
1057
+ 'source-layer': 'streets',
1058
+ filter: [
1059
+ 'all',
1060
+ ['==', 'kind', 'service'],
1061
+ ['==', 'tunnel', true],
1062
+ ['!=', 'service', 'driveway']
1063
+ ],
1064
+ paint: {
1065
+ 'line-color': 'rgb(222,222,222)',
1066
+ 'line-width': {
1067
+ stops: [
1068
+ [14, 2],
1069
+ [16, 4],
1070
+ [18, 18],
1071
+ [19, 48],
1072
+ [20, 96]
1073
+ ]
1074
+ },
1075
+ 'line-opacity': {
1076
+ stops: [
1077
+ [14, 0],
1078
+ [15, 1]
1079
+ ]
1080
+ }
1081
+ },
1082
+ layout: {
1083
+ 'line-join': 'round',
1084
+ 'line-cap': 'round'
1085
+ }
1086
+ },
1087
+ {
1088
+ id: 'tunnel-street-livingstreet:outline',
1089
+ type: 'line',
1090
+ 'source-layer': 'streets',
1091
+ filter: ['all', ['==', 'kind', 'living_street'], ['==', 'tunnel', true]],
1092
+ paint: {
1093
+ 'line-color': 'rgb(222,222,222)',
1094
+ 'line-width': {
1095
+ stops: [
1096
+ [12, 2],
1097
+ [14, 3],
1098
+ [16, 6],
1099
+ [18, 26],
1100
+ [19, 64],
1101
+ [20, 128]
1102
+ ]
1103
+ },
1104
+ 'line-opacity': {
1105
+ stops: [
1106
+ [12, 0],
1107
+ [13, 1]
1108
+ ]
1109
+ }
1110
+ },
1111
+ layout: {
1112
+ 'line-join': 'round',
1113
+ 'line-cap': 'round'
1114
+ }
1115
+ },
1116
+ {
1117
+ id: 'tunnel-street-residential:outline',
1118
+ type: 'line',
1119
+ 'source-layer': 'streets',
1120
+ filter: ['all', ['==', 'kind', 'residential'], ['==', 'tunnel', true]],
1121
+ paint: {
1122
+ 'line-color': street_residential_outline.line_color,
1123
+ 'line-width': street_residential_outline.line_width,
1124
+ 'line-opacity': street_residential_outline.line_opacity
1125
+ },
1126
+ layout: {
1127
+ 'line-join': 'round',
1128
+ 'line-cap': 'butt'
1129
+ }
1130
+ },
1131
+ {
1132
+ id: 'tunnel-street-unclassified:outline',
1133
+ type: 'line',
1134
+ 'source-layer': 'streets',
1135
+ filter: ['all', ['==', 'kind', 'unclassified'], ['==', 'tunnel', true]],
1136
+ paint: {
1137
+ 'line-color': 'rgb(222,222,222)',
1138
+ 'line-width': {
1139
+ stops: [
1140
+ [12, 2],
1141
+ [14, 3],
1142
+ [16, 6],
1143
+ [18, 26],
1144
+ [19, 64],
1145
+ [20, 128]
1146
+ ]
1147
+ },
1148
+ 'line-opacity': {
1149
+ stops: [
1150
+ [12, 0],
1151
+ [13, 1]
1152
+ ]
1153
+ }
1154
+ },
1155
+ layout: {
1156
+ 'line-join': 'round',
1157
+ 'line-cap': 'round'
1158
+ }
1159
+ },
1160
+ {
1161
+ id: 'tunnel-street-tertiary-link:outline',
1162
+ type: 'line',
1163
+ 'source-layer': 'streets',
1164
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'tertiary'], ['==', 'link', true]],
1165
+ paint: {
1166
+ 'line-color': 'rgb(222,222,222)',
1167
+ 'line-width': {
1168
+ stops: [
1169
+ [12, 2],
1170
+ [14, 3],
1171
+ [16, 6],
1172
+ [18, 26],
1173
+ [19, 64],
1174
+ [20, 128]
1175
+ ]
1176
+ },
1177
+ 'line-opacity': {
1178
+ stops: [
1179
+ [12, 0],
1180
+ [13, 1]
1181
+ ]
1182
+ }
1183
+ },
1184
+ layout: {
1185
+ 'line-join': 'round',
1186
+ 'line-cap': 'round'
1187
+ }
1188
+ },
1189
+ {
1190
+ id: 'tunnel-street-secondary-link:outline',
1191
+ type: 'line',
1192
+ 'source-layer': 'streets',
1193
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'secondary'], ['==', 'link', true]],
1194
+ paint: {
1195
+ 'line-color': tokens.street_secondary_outline,
1196
+ 'line-dasharray': [1, 0.3],
1197
+ 'line-width': street_secondary.line_width
1198
+ },
1199
+ layout: {
1200
+ 'line-join': 'round',
1201
+ 'line-cap': 'butt'
1202
+ },
1203
+ minzoom: 13
1204
+ },
1205
+ {
1206
+ id: 'tunnel-street-primary-link:outline',
1207
+ type: 'line',
1208
+ 'source-layer': 'streets',
1209
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'primary'], ['==', 'link', true]],
1210
+ paint: {
1211
+ 'line-color': street_primary_outline.line_color,
1212
+ 'line-dasharray': [1, 0.3],
1213
+ 'line-width': street_primary_outline.line_width
1214
+ },
1215
+ layout: {
1216
+ 'line-join': 'round',
1217
+ 'line-cap': 'butt'
1218
+ },
1219
+ minzoom: 13
1220
+ },
1221
+ {
1222
+ id: 'tunnel-street-trunk-link:outline',
1223
+ type: 'line',
1224
+ 'source-layer': 'streets',
1225
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'trunk'], ['==', 'link', true]],
1226
+ paint: {
1227
+ 'line-color': motorway_outline.line_color,
1228
+ 'line-width': motorway_outline.line_width
1229
+ },
1230
+ layout: {
1231
+ 'line-join': 'round',
1232
+ 'line-cap': 'butt'
1233
+ },
1234
+ minzoom: 13
1235
+ },
1236
+ {
1237
+ id: 'tunnel-street-motorway-link:outline',
1238
+ type: 'line',
1239
+ 'source-layer': 'streets',
1240
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'motorway'], ['==', 'link', true]],
1241
+ paint: {
1242
+ 'line-color': motorway_outline.line_color,
1243
+ 'line-width': motorway_link_outline.line_width,
1244
+ 'line-dasharray': [1, 0.3]
1245
+ },
1246
+ layout: {
1247
+ 'line-join': 'round',
1248
+ 'line-cap': 'round'
1249
+ },
1250
+ minzoom: 12
1251
+ },
1252
+ {
1253
+ id: 'tunnel-street-tertiary:outline',
1254
+ type: 'line',
1255
+ 'source-layer': 'streets',
1256
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'tertiary'], ['!=', 'link', true]],
1257
+ paint: {
1258
+ 'line-color': 'rgb(222,222,222)',
1259
+ 'line-width': {
1260
+ stops: [
1261
+ [12, 2],
1262
+ [14, 3],
1263
+ [16, 6],
1264
+ [18, 26],
1265
+ [19, 64],
1266
+ [20, 128]
1267
+ ]
1268
+ },
1269
+ 'line-opacity': {
1270
+ stops: [
1271
+ [12, 0],
1272
+ [13, 1]
1273
+ ]
1274
+ }
1275
+ },
1276
+ layout: {
1277
+ 'line-join': 'round',
1278
+ 'line-cap': 'round'
1279
+ }
1280
+ },
1281
+ {
1282
+ id: 'tunnel-street-secondary:outline',
1283
+ type: 'line',
1284
+ 'source-layer': 'streets',
1285
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'secondary'], ['!=', 'link', true]],
1286
+ paint: {
1287
+ 'line-color': tokens.street_secondary_outline,
1288
+ 'line-dasharray': [1, 0.3],
1289
+ 'line-width': street_secondary_outline.line_width,
1290
+ 'line-opacity': {
1291
+ stops: [
1292
+ [11, 0],
1293
+ [12, 1]
1294
+ ]
1295
+ }
1296
+ },
1297
+ layout: {
1298
+ 'line-join': 'round',
1299
+ 'line-cap': 'butt'
1300
+ }
1301
+ },
1302
+ {
1303
+ id: 'tunnel-street-primary:outline',
1304
+ type: 'line',
1305
+ 'source-layer': 'streets',
1306
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'primary'], ['!=', 'link', true]],
1307
+ paint: {
1308
+ 'line-color': tokens.street_primary_outline,
1309
+ 'line-width': street_primary_outline.line_width,
1310
+ 'line-dasharray': [1, 0.3]
1311
+ },
1312
+ layout: {
1313
+ 'line-join': 'round',
1314
+ 'line-cap': 'square'
1315
+ }
1316
+ },
1317
+ {
1318
+ id: 'tunnel-street-trunk:outline',
1319
+ type: 'line',
1320
+ 'source-layer': 'streets',
1321
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'trunk'], ['!=', 'link', true]],
1322
+ paint: {
1323
+ 'line-color': motorway_outline.line_color,
1324
+ 'line-dasharray': [1, 0.3],
1325
+ 'line-width': motorway_outline.line_width
1326
+ },
1327
+ layout: {
1328
+ 'line-join': 'round',
1329
+ 'line-cap': 'round'
1330
+ }
1331
+ },
1332
+ {
1333
+ id: 'tunnel-street-motorway:outline',
1334
+ type: 'line',
1335
+ 'source-layer': 'streets',
1336
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'motorway'], ['!=', 'link', true]],
1337
+ paint: {
1338
+ 'line-color': motorway_outline.line_color,
1339
+ 'line-width': motorway_outline.line_width,
1340
+ 'line-dasharray': [1, 0.3]
1341
+ },
1342
+ layout: {
1343
+ 'line-join': 'round',
1344
+ 'line-cap': 'round'
1345
+ }
1346
+ },
1347
+ {
1348
+ id: 'tunnel-street-service',
1349
+ type: 'line',
1350
+ 'source-layer': 'streets',
1351
+ filter: [
1352
+ 'all',
1353
+ ['==', 'kind', 'service'],
1354
+ ['==', 'tunnel', true],
1355
+ ['!=', 'service', 'driveway']
1356
+ ],
1357
+ paint: {
1358
+ 'line-color': 'rgb(247,247,247)',
1359
+ 'line-width': {
1360
+ stops: [
1361
+ [14, 1],
1362
+ [16, 3],
1363
+ [18, 16],
1364
+ [19, 44],
1365
+ [20, 88]
1366
+ ]
1367
+ },
1368
+ 'line-opacity': {
1369
+ stops: [
1370
+ [14, 0],
1371
+ [15, 1]
1372
+ ]
1373
+ }
1374
+ },
1375
+ layout: {
1376
+ 'line-join': 'round',
1377
+ 'line-cap': 'round'
1378
+ }
1379
+ },
1380
+ {
1381
+ id: 'tunnel-street-livingstreet',
1382
+ type: 'line',
1383
+ 'source-layer': 'streets',
1384
+ filter: ['all', ['==', 'kind', 'living_street'], ['==', 'tunnel', true]],
1385
+ paint: {
1386
+ 'line-color': 'rgb(247,247,247)',
1387
+ 'line-width': {
1388
+ stops: [
1389
+ [12, 1],
1390
+ [14, 2],
1391
+ [16, 5],
1392
+ [18, 24],
1393
+ [19, 60],
1394
+ [20, 120]
1395
+ ]
1396
+ },
1397
+ 'line-opacity': {
1398
+ stops: [
1399
+ [12, 0],
1400
+ [13, 1]
1401
+ ]
1402
+ }
1403
+ },
1404
+ layout: {
1405
+ 'line-join': 'round',
1406
+ 'line-cap': 'round'
1407
+ }
1408
+ },
1409
+ {
1410
+ id: 'tunnel-street-residential',
1411
+ type: 'line',
1412
+ 'source-layer': 'streets',
1413
+ filter: ['all', ['==', 'kind', 'residential'], ['==', 'tunnel', true]],
1414
+ paint: {
1415
+ 'line-color': street_residential.line_color,
1416
+ 'line-width': street_residential.line_width,
1417
+ 'line-opacity': {
1418
+ stops: [
1419
+ [12, 0],
1420
+ [13, 1]
1421
+ ]
1422
+ }
1423
+ },
1424
+ layout: {
1425
+ 'line-join': 'round',
1426
+ 'line-cap': 'round'
1427
+ }
1428
+ },
1429
+ {
1430
+ id: 'tunnel-street-unclassified',
1431
+ type: 'line',
1432
+ 'source-layer': 'streets',
1433
+ filter: ['all', ['==', 'kind', 'unclassified'], ['==', 'tunnel', true]],
1434
+ paint: {
1435
+ 'line-color': 'rgb(247,247,247)',
1436
+ 'line-width': {
1437
+ stops: [
1438
+ [12, 1],
1439
+ [14, 2],
1440
+ [16, 5],
1441
+ [18, 24],
1442
+ [19, 60],
1443
+ [20, 120]
1444
+ ]
1445
+ },
1446
+ 'line-opacity': {
1447
+ stops: [
1448
+ [12, 0],
1449
+ [13, 1]
1450
+ ]
1451
+ }
1452
+ },
1453
+ layout: {
1454
+ 'line-join': 'round',
1455
+ 'line-cap': 'round'
1456
+ }
1457
+ },
1458
+ {
1459
+ id: 'tunnel-street-tertiary-link',
1460
+ type: 'line',
1461
+ 'source-layer': 'streets',
1462
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'tertiary'], ['==', 'link', true]],
1463
+ paint: {
1464
+ 'line-color': 'rgb(247,247,247)',
1465
+ 'line-width': {
1466
+ stops: [
1467
+ [12, 1],
1468
+ [14, 2],
1469
+ [16, 5],
1470
+ [18, 24],
1471
+ [19, 60],
1472
+ [20, 120]
1473
+ ]
1474
+ },
1475
+ 'line-opacity': {
1476
+ stops: [
1477
+ [12, 0],
1478
+ [13, 1]
1479
+ ]
1480
+ }
1481
+ },
1482
+ layout: {
1483
+ 'line-join': 'round',
1484
+ 'line-cap': 'round'
1485
+ }
1486
+ },
1487
+ {
1488
+ id: 'tunnel-street-secondary-link',
1489
+ type: 'line',
1490
+ 'source-layer': 'streets',
1491
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'secondary'], ['==', 'link', true]],
1492
+ paint: {
1493
+ 'line-color': tokens.street_secondary,
1494
+ 'line-width': street_secondary.line_width
1495
+ },
1496
+ layout: street_layout,
1497
+ minzoom: 13
1498
+ },
1499
+ {
1500
+ id: 'tunnel-street-primary-link',
1501
+ type: 'line',
1502
+ 'source-layer': 'streets',
1503
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'primary'], ['==', 'link', true]],
1504
+ paint: {
1505
+ 'line-color': street_primary.line_color,
1506
+ 'line-width': street_primary.line_width
1507
+ },
1508
+ layout: street_layout,
1509
+ minzoom: 13
1510
+ },
1511
+ {
1512
+ id: 'tunnel-street-trunk-link',
1513
+ type: 'line',
1514
+ 'source-layer': 'streets',
1515
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'trunk'], ['==', 'link', true]],
1516
+ paint: {
1517
+ 'line-color': tokens.street_primary,
1518
+ 'line-width': motorway_link.line_width
1519
+ },
1520
+ layout: street_layout,
1521
+ minzoom: 13
1522
+ },
1523
+ {
1524
+ id: 'tunnel-street-motorway-link',
1525
+ type: 'line',
1526
+ 'source-layer': 'streets',
1527
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'motorway'], ['==', 'link', true]],
1528
+ paint: {
1529
+ 'line-color': tokens.street_primary,
1530
+ 'line-width': motorway_link.line_width,
1531
+ 'line-opacity': motorway.line_opacity
1532
+ },
1533
+ layout: street_layout,
1534
+ minzoom: 12
1535
+ },
1536
+ {
1537
+ id: 'tunnel-street-tertiary',
1538
+ type: 'line',
1539
+ 'source-layer': 'streets',
1540
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'tertiary'], ['!=', 'link', true]],
1541
+ paint: {
1542
+ 'line-color': 'rgb(247,247,247)',
1543
+ 'line-width': {
1544
+ stops: [
1545
+ [12, 1],
1546
+ [14, 2],
1547
+ [16, 5],
1548
+ [18, 24],
1549
+ [19, 60],
1550
+ [20, 120]
1551
+ ]
1552
+ },
1553
+ 'line-opacity': {
1554
+ stops: [
1555
+ [12, 0],
1556
+ [13, 1]
1557
+ ]
1558
+ }
1559
+ },
1560
+ layout: {
1561
+ 'line-join': 'round',
1562
+ 'line-cap': 'round'
1563
+ }
1564
+ },
1565
+ {
1566
+ id: 'tunnel-street-secondary',
1567
+ type: 'line',
1568
+ 'source-layer': 'streets',
1569
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'secondary'], ['!=', 'link', true]],
1570
+ paint: {
1571
+ 'line-color': tokens.street_secondary,
1572
+ 'line-width': street_secondary.line_width,
1573
+ 'line-opacity': {
1574
+ stops: [
1575
+ [11, 0],
1576
+ [12, 1]
1577
+ ]
1578
+ }
1579
+ },
1580
+ layout: street_layout
1581
+ },
1582
+ {
1583
+ id: 'tunnel-street-primary',
1584
+ type: 'line',
1585
+ 'source-layer': 'streets',
1586
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'primary'], ['!=', 'link', true]],
1587
+ paint: {
1588
+ 'line-color': street_primary.line_color,
1589
+ 'line-width': street_primary.line_width,
1590
+ 'line-opacity': {
1591
+ stops: [
1592
+ [8, 0],
1593
+ [9, 1]
1594
+ ]
1595
+ }
1596
+ },
1597
+ layout: street_layout
1598
+ },
1599
+ {
1600
+ id: 'tunnel-street-trunk',
1601
+ type: 'line',
1602
+ 'source-layer': 'streets',
1603
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'trunk'], ['!=', 'link', true]],
1604
+ paint: {
1605
+ 'line-color': tokens.street_primary,
1606
+ 'line-width': motorway.line_width,
1607
+ 'line-opacity': {
1608
+ stops: [
1609
+ [7, 0],
1610
+ [8, 0.75]
1611
+ ]
1612
+ }
1613
+ },
1614
+ layout: street_layout
1615
+ },
1616
+ {
1617
+ id: 'tunnel-street-motorway',
1618
+ type: 'line',
1619
+ 'source-layer': 'streets',
1620
+ filter: ['all', ['==', 'tunnel', true], ['in', 'kind', 'motorway'], ['!=', 'link', true]],
1621
+ paint: {
1622
+ 'line-color': tokens.street_primary,
1623
+ 'line-width': motorway.line_width,
1624
+ 'line-opacity': motorway.line_opacity
1625
+ },
1626
+ layout: street_layout
1627
+ }
1628
+ ].map((el) => {
1629
+ return { source: 'versatiles-osm', ...el };
1630
+ });
1631
+ const roadSurface = [
1632
+ {
1633
+ id: 'street-service:outline', // See: https://wiki.openstreetmap.org/wiki/Tag:highway%3Dservice
1634
+ type: 'line',
1635
+ filter: [
1636
+ 'all',
1637
+ ['==', 'kind', 'service'],
1638
+ ['!=', 'bridge', true],
1639
+ ['!=', 'tunnel', true],
1640
+ ['!=', 'service', 'driveway']
1641
+ ],
1642
+ paint: {
1643
+ 'line-color': 'hsl(36,0%,80%)',
1644
+ 'line-width': {
1645
+ stops: [
1646
+ [14, 2],
1647
+ [16, 4],
1648
+ [18, 18],
1649
+ [19, 48],
1650
+ [20, 96]
1651
+ ]
1652
+ },
1653
+ 'line-opacity': {
1654
+ stops: [
1655
+ [14, 0],
1656
+ [15, 1]
1657
+ ]
1658
+ }
1659
+ },
1660
+ layout: {
1661
+ 'line-join': 'round',
1662
+ 'line-cap': 'round'
1663
+ }
1664
+ },
1665
+ {
1666
+ id: 'street-livingstreet:outline',
1667
+ type: 'line',
1668
+ filter: [
1669
+ 'all',
1670
+ ['==', 'kind', 'living_street'],
1671
+ ['!=', 'bridge', true],
1672
+ ['!=', 'tunnel', true]
1673
+ ],
1674
+ paint: {
1675
+ 'line-color': 'hsl(36,0%,80%)',
1676
+ 'line-width': {
1677
+ stops: [
1678
+ [12, 2],
1679
+ [14, 3],
1680
+ [16, 6],
1681
+ [18, 26],
1682
+ [19, 64],
1683
+ [20, 128]
1684
+ ]
1685
+ },
1686
+ 'line-opacity': {
1687
+ stops: [
1688
+ [12, 0],
1689
+ [13, 1]
1690
+ ]
1691
+ }
1692
+ },
1693
+ layout: {
1694
+ 'line-join': 'round',
1695
+ 'line-cap': 'round'
1696
+ }
1697
+ },
1698
+ {
1699
+ id: 'street-residential:outline',
1700
+ type: 'line',
1701
+ filter: [
1702
+ 'all',
1703
+ ['==', 'kind', 'residential'],
1704
+ ['!=', 'bridge', true],
1705
+ ['!=', 'tunnel', true]
1706
+ ],
1707
+ paint: {
1708
+ 'line-color': street_residential_outline.line_color,
1709
+ 'line-width': street_residential_outline.line_width,
1710
+ 'line-opacity': street_residential_outline.line_opacity
1711
+ },
1712
+ layout: {
1713
+ 'line-join': 'round',
1714
+ 'line-cap': 'round'
1715
+ }
1716
+ },
1717
+ {
1718
+ id: 'street-unclassified:outline',
1719
+ type: 'line',
1720
+ filter: [
1721
+ 'all',
1722
+ ['==', 'kind', 'unclassified'],
1723
+ ['!=', 'bridge', true],
1724
+ ['!=', 'tunnel', true]
1725
+ ],
1726
+ paint: {
1727
+ 'line-color': 'hsl(36,0%,80%)',
1728
+ 'line-width': {
1729
+ stops: [
1730
+ [12, 2],
1731
+ [14, 3],
1732
+ [16, 6],
1733
+ [18, 26],
1734
+ [19, 64],
1735
+ [20, 128]
1736
+ ]
1737
+ },
1738
+ 'line-opacity': {
1739
+ stops: [
1740
+ [12, 0],
1741
+ [13, 1]
1742
+ ]
1743
+ }
1744
+ },
1745
+ layout: {
1746
+ 'line-join': 'round',
1747
+ 'line-cap': 'butt'
1748
+ }
1749
+ },
1750
+ {
1751
+ id: 'street-tertiary-link:outline',
1752
+ type: 'line',
1753
+ filter: [
1754
+ 'all',
1755
+ ['!=', 'bridge', true],
1756
+ ['!=', 'tunnel', true],
1757
+ ['in', 'kind', 'tertiary'],
1758
+ ['==', 'link', true]
1759
+ ],
1760
+ paint: {
1761
+ 'line-color': 'hsl(36,0%,80%)',
1762
+ 'line-width': {
1763
+ stops: [
1764
+ [12, 2],
1765
+ [14, 3],
1766
+ [16, 6],
1767
+ [18, 26],
1768
+ [19, 64],
1769
+ [20, 128]
1770
+ ]
1771
+ },
1772
+ 'line-opacity': {
1773
+ stops: [
1774
+ [12, 0],
1775
+ [13, 1]
1776
+ ]
1777
+ }
1778
+ },
1779
+ layout: {
1780
+ 'line-join': 'round',
1781
+ 'line-cap': 'butt'
1782
+ }
1783
+ },
1784
+ {
1785
+ id: 'street-secondary-link:outline',
1786
+ type: 'line',
1787
+ filter: [
1788
+ 'all',
1789
+ ['!=', 'bridge', true],
1790
+ ['!=', 'tunnel', true],
1791
+ ['in', 'kind', 'secondary'],
1792
+ ['==', 'link', true]
1793
+ ],
1794
+ paint: {
1795
+ 'line-color': tokens.street_secondary_outline,
1796
+ 'line-width': street_secondary_outline.line_width
1797
+ },
1798
+ layout: {
1799
+ 'line-join': 'round',
1800
+ 'line-cap': 'butt'
1801
+ },
1802
+ minzoom: 13
1803
+ },
1804
+ {
1805
+ id: 'street-primary-link:outline',
1806
+ type: 'line',
1807
+ filter: [
1808
+ 'all',
1809
+ ['!=', 'bridge', true],
1810
+ ['!=', 'tunnel', true],
1811
+ ['in', 'kind', 'primary'],
1812
+ ['==', 'link', true]
1813
+ ],
1814
+ paint: {
1815
+ 'line-color': tokens.street_primary_outline,
1816
+ 'line-width': street_primary_outline.line_width
1817
+ },
1818
+ layout: {
1819
+ 'line-join': 'round',
1820
+ 'line-cap': 'butt'
1821
+ },
1822
+ minzoom: 13
1823
+ },
1824
+ {
1825
+ id: 'street-trunk-link:outline',
1826
+ type: 'line',
1827
+ filter: [
1828
+ 'all',
1829
+ ['!=', 'bridge', true],
1830
+ ['!=', 'tunnel', true],
1831
+ ['in', 'kind', 'trunk'],
1832
+ ['==', 'link', true]
1833
+ ],
1834
+ paint: {
1835
+ 'line-color': motorway_outline.line_color,
1836
+ 'line-width': motorway_link_outline.line_width
1837
+ },
1838
+ layout: {
1839
+ 'line-join': 'round',
1840
+ 'line-cap': 'butt'
1841
+ },
1842
+ minzoom: 13
1843
+ },
1844
+ {
1845
+ id: 'street-motorway-link:outline',
1846
+ type: 'line',
1847
+ filter: [
1848
+ 'all',
1849
+ ['!=', 'bridge', true],
1850
+ ['!=', 'tunnel', true],
1851
+ ['in', 'kind', 'motorway'],
1852
+ ['==', 'link', true]
1853
+ ],
1854
+ paint: {
1855
+ 'line-color': motorway_outline.line_color,
1856
+ 'line-width': motorway_link_outline.line_width
1857
+ },
1858
+ layout: {
1859
+ 'line-join': 'round',
1860
+ 'line-cap': 'butt'
1861
+ },
1862
+ minzoom: 12
1863
+ },
1864
+ {
1865
+ id: 'street-tertiary:outline',
1866
+ type: 'line',
1867
+ filter: [
1868
+ 'all',
1869
+ ['!=', 'bridge', true],
1870
+ ['!=', 'tunnel', true],
1871
+ ['in', 'kind', 'tertiary'],
1872
+ ['!=', 'link', true]
1873
+ ],
1874
+ paint: {
1875
+ 'line-color': 'hsl(36,0%,80%)',
1876
+ 'line-width': {
1877
+ stops: [
1878
+ [12, 2],
1879
+ [14, 3],
1880
+ [16, 6],
1881
+ [18, 26],
1882
+ [19, 64],
1883
+ [20, 128]
1884
+ ]
1885
+ },
1886
+ 'line-opacity': {
1887
+ stops: [
1888
+ [12, 0],
1889
+ [13, 1]
1890
+ ]
1891
+ }
1892
+ },
1893
+ layout: {
1894
+ 'line-join': 'round',
1895
+ 'line-cap': 'round'
1896
+ }
1897
+ },
1898
+ {
1899
+ id: 'street-secondary:outline',
1900
+ type: 'line',
1901
+ filter: [
1902
+ 'all',
1903
+ ['!=', 'bridge', true],
1904
+ ['!=', 'tunnel', true],
1905
+ ['in', 'kind', 'secondary'],
1906
+ ['!=', 'link', true]
1907
+ ],
1908
+ paint: {
1909
+ 'line-color': tokens.street_secondary_outline,
1910
+ 'line-width': street_secondary_outline.line_width,
1911
+ 'line-opacity': {
1912
+ stops: [
1913
+ [11, 0],
1914
+ [12, 1]
1915
+ ]
1916
+ }
1917
+ },
1918
+ layout: {
1919
+ 'line-join': 'round',
1920
+ 'line-cap': 'butt'
1921
+ }
1922
+ },
1923
+ {
1924
+ id: 'street-primary:outline',
1925
+ type: 'line',
1926
+ filter: [
1927
+ 'all',
1928
+ ['!=', 'bridge', true],
1929
+ ['!=', 'tunnel', true],
1930
+ ['in', 'kind', 'primary'],
1931
+ ['!=', 'link', true]
1932
+ ],
1933
+ paint: {
1934
+ 'line-color': street_primary_outline.line_color,
1935
+ 'line-width': street_primary_outline.line_width
1936
+ },
1937
+ layout: {
1938
+ 'line-join': 'round',
1939
+ 'line-cap': 'butt'
1940
+ }
1941
+ },
1942
+ {
1943
+ id: 'street-trunk:outline',
1944
+ type: 'line',
1945
+ filter: [
1946
+ 'all',
1947
+ ['!=', 'bridge', true],
1948
+ ['!=', 'tunnel', true],
1949
+ ['in', 'kind', 'trunk'],
1950
+ ['!=', 'link', true]
1951
+ ],
1952
+ paint: {
1953
+ 'line-color': motorway_outline.line_color,
1954
+ 'line-width': motorway_outline.line_width
1955
+ },
1956
+ layout: {
1957
+ 'line-join': 'round',
1958
+ 'line-cap': 'butt'
1959
+ }
1960
+ },
1961
+ {
1962
+ id: 'street-motorway:outline',
1963
+ type: 'line',
1964
+ filter: [
1965
+ 'all',
1966
+ ['!=', 'bridge', true],
1967
+ ['!=', 'tunnel', true],
1968
+ ['in', 'kind', 'motorway'],
1969
+ ['!=', 'link', true]
1970
+ ],
1971
+ paint: {
1972
+ 'line-color': motorway_outline.line_color,
1973
+ 'line-width': motorway_outline.line_width
1974
+ },
1975
+ layout: {
1976
+ 'line-join': 'round',
1977
+ 'line-cap': 'butt'
1978
+ }
1979
+ },
1980
+ {
1981
+ id: 'street-service',
1982
+ type: 'line',
1983
+ filter: [
1984
+ 'all',
1985
+ ['==', 'kind', 'service'],
1986
+ ['!=', 'bridge', true],
1987
+ ['!=', 'tunnel', true],
1988
+ ['!=', 'service', 'driveway']
1989
+ ],
1990
+ paint: {
1991
+ 'line-color': 'hsl(0,0%,100%)',
1992
+ 'line-width': {
1993
+ stops: [
1994
+ [14, 1],
1995
+ [16, 3],
1996
+ [18, 16],
1997
+ [19, 44],
1998
+ [20, 88]
1999
+ ]
2000
+ },
2001
+ 'line-opacity': {
2002
+ stops: [
2003
+ [14, 0],
2004
+ [15, 1]
2005
+ ]
2006
+ }
2007
+ },
2008
+ layout: {
2009
+ 'line-join': 'round',
2010
+ 'line-cap': 'round'
2011
+ }
2012
+ },
2013
+ {
2014
+ id: 'street-livingstreet',
2015
+ type: 'line',
2016
+ filter: [
2017
+ 'all',
2018
+ ['==', 'kind', 'living_street'],
2019
+ ['!=', 'bridge', true],
2020
+ ['!=', 'tunnel', true]
2021
+ ],
2022
+ paint: {
2023
+ 'line-color': street_residential.line_color,
2024
+ 'line-width': street_residential.line_width,
2025
+ 'line-opacity': street_residential.line_opacity
2026
+ },
2027
+ layout: {
2028
+ 'line-join': 'round',
2029
+ 'line-cap': 'round'
2030
+ }
2031
+ },
2032
+ {
2033
+ id: 'street-residential',
2034
+ type: 'line',
2035
+ filter: [
2036
+ 'all',
2037
+ ['==', 'kind', 'residential'],
2038
+ ['!=', 'bridge', true],
2039
+ ['!=', 'tunnel', true]
2040
+ ],
2041
+ paint: {
2042
+ 'line-color': street_residential.line_color,
2043
+ 'line-width': street_residential.line_width,
2044
+ 'line-opacity': street_residential.line_opacity
2045
+ },
2046
+ layout: {
2047
+ 'line-join': 'round',
2048
+ 'line-cap': 'round'
2049
+ }
2050
+ },
2051
+ {
2052
+ id: 'street-unclassified',
2053
+ type: 'line',
2054
+ filter: [
2055
+ 'all',
2056
+ ['==', 'kind', 'unclassified'],
2057
+ ['!=', 'bridge', true],
2058
+ ['!=', 'tunnel', true]
2059
+ ],
2060
+ paint: {
2061
+ 'line-color': 'hsl(0,0%,100%)',
2062
+ 'line-width': {
2063
+ stops: [
2064
+ [12, 1],
2065
+ [14, 2],
2066
+ [16, 5],
2067
+ [18, 24],
2068
+ [19, 60],
2069
+ [20, 120]
2070
+ ]
2071
+ },
2072
+ 'line-opacity': {
2073
+ stops: [
2074
+ [12, 0],
2075
+ [13, 1]
2076
+ ]
2077
+ }
2078
+ },
2079
+ layout: {
2080
+ 'line-join': 'round',
2081
+ 'line-cap': 'round'
2082
+ }
2083
+ },
2084
+ {
2085
+ id: 'street-tertiary-link',
2086
+ type: 'line',
2087
+ filter: [
2088
+ 'all',
2089
+ ['!=', 'bridge', true],
2090
+ ['!=', 'tunnel', true],
2091
+ ['in', 'kind', 'tertiary'],
2092
+ ['==', 'link', true]
2093
+ ],
2094
+ paint: {
2095
+ 'line-color': 'hsl(0,0%,100%)',
2096
+ 'line-width': {
2097
+ stops: [
2098
+ [12, 1],
2099
+ [14, 2],
2100
+ [16, 5],
2101
+ [18, 24],
2102
+ [19, 60],
2103
+ [20, 120]
2104
+ ]
2105
+ },
2106
+ 'line-opacity': {
2107
+ stops: [
2108
+ [12, 0],
2109
+ [13, 1]
2110
+ ]
2111
+ }
2112
+ },
2113
+ layout: {
2114
+ 'line-join': 'round',
2115
+ 'line-cap': 'round'
2116
+ }
2117
+ },
2118
+ {
2119
+ id: 'street-secondary-link',
2120
+ type: 'line',
2121
+ filter: [
2122
+ 'all',
2123
+ ['!=', 'bridge', true],
2124
+ ['!=', 'tunnel', true],
2125
+ ['in', 'kind', 'secondary'],
2126
+ ['==', 'link', true]
2127
+ ],
2128
+ paint: {
2129
+ 'line-color': tokens.street_secondary,
2130
+ 'line-width': street_secondary.line_width
2131
+ },
2132
+ layout: {
2133
+ 'line-join': 'round',
2134
+ 'line-cap': 'round'
2135
+ },
2136
+ minzoom: 13
2137
+ },
2138
+ {
2139
+ id: 'street-primary-link',
2140
+ type: 'line',
2141
+ filter: [
2142
+ 'all',
2143
+ ['!=', 'bridge', true],
2144
+ ['!=', 'tunnel', true],
2145
+ ['in', 'kind', 'primary'],
2146
+ ['==', 'link', true]
2147
+ ],
2148
+ paint: {
2149
+ 'line-color': street_primary.line_color,
2150
+ 'line-width': street_primary.line_width
2151
+ },
2152
+ layout: {
2153
+ 'line-join': 'round',
2154
+ 'line-cap': 'round'
2155
+ },
2156
+ minzoom: 13
2157
+ },
2158
+ {
2159
+ id: 'street-trunk-link',
2160
+ type: 'line',
2161
+ filter: [
2162
+ 'all',
2163
+ ['!=', 'bridge', true],
2164
+ ['!=', 'tunnel', true],
2165
+ ['in', 'kind', 'trunk'],
2166
+ ['==', 'link', true]
2167
+ ],
2168
+ paint: {
2169
+ 'line-color': tokens.street_primary,
2170
+ 'line-width': motorway_link.line_width
2171
+ },
2172
+ layout: {
2173
+ 'line-join': 'round',
2174
+ 'line-cap': 'round'
2175
+ },
2176
+ minzoom: 13
2177
+ },
2178
+ {
2179
+ id: 'street-motorway-link',
2180
+ type: 'line',
2181
+ filter: [
2182
+ 'all',
2183
+ ['!=', 'bridge', true],
2184
+ ['!=', 'tunnel', true],
2185
+ ['in', 'kind', 'motorway'],
2186
+ ['==', 'link', true]
2187
+ ],
2188
+ paint: {
2189
+ 'line-color': tokens.street_primary,
2190
+ 'line-width': motorway_link.line_width,
2191
+ 'line-opacity': motorway.line_opacity
2192
+ },
2193
+ layout: {
2194
+ 'line-join': 'round',
2195
+ 'line-cap': 'round'
2196
+ },
2197
+ minzoom: 12
2198
+ },
2199
+ {
2200
+ id: 'street-tertiary',
2201
+ type: 'line',
2202
+ filter: [
2203
+ 'all',
2204
+ ['!=', 'bridge', true],
2205
+ ['!=', 'tunnel', true],
2206
+ ['in', 'kind', 'tertiary'],
2207
+ ['!=', 'link', true]
2208
+ ],
2209
+ paint: {
2210
+ 'line-color': 'hsl(0,0%,100%)',
2211
+ 'line-width': {
2212
+ stops: [
2213
+ [12, 1],
2214
+ [14, 2],
2215
+ [16, 5],
2216
+ [18, 24],
2217
+ [19, 60],
2218
+ [20, 120]
2219
+ ]
2220
+ },
2221
+ 'line-opacity': {
2222
+ stops: [
2223
+ [12, 0],
2224
+ [13, 1]
2225
+ ]
2226
+ }
2227
+ },
2228
+ layout: {
2229
+ 'line-join': 'round',
2230
+ 'line-cap': 'round'
2231
+ }
2232
+ },
2233
+ {
2234
+ id: 'street-secondary',
2235
+ type: 'line',
2236
+ filter: [
2237
+ 'all',
2238
+ ['!=', 'bridge', true],
2239
+ ['!=', 'tunnel', true],
2240
+ ['in', 'kind', 'secondary'],
2241
+ ['!=', 'link', true]
2242
+ ],
2243
+ paint: {
2244
+ 'line-color': tokens.street_secondary,
2245
+ 'line-width': street_secondary.line_width,
2246
+ 'line-opacity': {
2247
+ stops: [
2248
+ [9, 0],
2249
+ [10, 1]
2250
+ ]
2251
+ }
2252
+ },
2253
+ layout: {
2254
+ 'line-join': 'round',
2255
+ 'line-cap': 'round'
2256
+ }
2257
+ },
2258
+ {
2259
+ id: 'street-primary',
2260
+ type: 'line',
2261
+ filter: [
2262
+ 'all',
2263
+ ['!=', 'bridge', true],
2264
+ ['!=', 'tunnel', true],
2265
+ ['in', 'kind', 'primary'],
2266
+ ['!=', 'link', true]
2267
+ ],
2268
+ paint: {
2269
+ 'line-color': street_primary.line_color,
2270
+ 'line-width': street_primary.line_width,
2271
+ 'line-opacity': {
2272
+ stops: [
2273
+ [8, 0],
2274
+ [9, 1]
2275
+ ]
2276
+ }
2277
+ },
2278
+ layout: {
2279
+ 'line-join': 'round',
2280
+ 'line-cap': 'round'
2281
+ }
2282
+ },
2283
+ {
2284
+ id: 'street-trunk',
2285
+ type: 'line',
2286
+ filter: [
2287
+ 'all',
2288
+ ['!=', 'bridge', true],
2289
+ ['!=', 'tunnel', true],
2290
+ ['in', 'kind', 'trunk'],
2291
+ ['!=', 'link', true]
2292
+ ],
2293
+ paint: {
2294
+ 'line-color': motorway.line_color,
2295
+ 'line-width': motorway.line_width,
2296
+ 'line-opacity': motorway.line_opacity
2297
+ },
2298
+ layout: {
2299
+ 'line-join': 'round',
2300
+ 'line-cap': 'round'
2301
+ }
2302
+ },
2303
+ {
2304
+ id: 'street-motorway',
2305
+ type: 'line',
2306
+ filter: [
2307
+ 'all',
2308
+ ['!=', 'bridge', true],
2309
+ ['!=', 'tunnel', true],
2310
+ ['in', 'kind', 'motorway'],
2311
+ ['!=', 'link', true]
2312
+ ],
2313
+ paint: {
2314
+ 'line-color': tokens.street_primary,
2315
+ 'line-width': motorway.line_width,
2316
+ 'line-opacity': motorway.line_opacity
2317
+ },
2318
+ layout: {
2319
+ 'line-join': 'round',
2320
+ 'line-cap': 'round'
2321
+ }
2322
+ }
2323
+ ].map((el) => {
2324
+ return { source: 'versatiles-osm', 'source-layer': 'streets', ...el };
2325
+ });
2326
+ return { roadLabels, roadBridges, roadSurface, roadTunnels };
2327
+ }