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