@swr-data-lab/components 2.7.1 → 2.9.0

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 (183) hide show
  1. package/dist/maplibre/MapStyle/SWRDataLabLight.js +1 -0
  2. package/dist/maplibre/MapStyle/SpriteImage.d.ts +8 -0
  3. package/dist/maplibre/MapStyle/SpriteImage.jsx +23 -0
  4. package/dist/maplibre/MapStyle/components/Admin.js +12 -12
  5. package/dist/maplibre/MapStyle/components/Buildings.js +2 -2
  6. package/dist/maplibre/MapStyle/components/Landuse.js +17 -116
  7. package/dist/maplibre/MapStyle/components/PlaceLabels.js +17 -35
  8. package/dist/maplibre/MapStyle/components/Roads.js +2 -2
  9. package/dist/maplibre/MapStyle/icons/airport-14.svg +40 -0
  10. package/dist/maplibre/MapStyle/icons/alcohol-14.svg +40 -0
  11. package/dist/maplibre/MapStyle/icons/alpine-hut-14.svg +37 -0
  12. package/dist/maplibre/MapStyle/icons/archaeological-site-14.svg +40 -0
  13. package/dist/maplibre/MapStyle/icons/atm-14.svg +40 -0
  14. package/dist/maplibre/MapStyle/icons/bakery-14.svg +40 -0
  15. package/dist/maplibre/MapStyle/icons/bank-14.svg +40 -0
  16. package/dist/maplibre/MapStyle/icons/bar-14.svg +40 -0
  17. package/dist/maplibre/MapStyle/icons/basic-hut-14.svg +37 -0
  18. package/dist/maplibre/MapStyle/icons/beauty-14.svg +40 -0
  19. package/dist/maplibre/MapStyle/icons/bench-14.svg +40 -0
  20. package/dist/maplibre/MapStyle/icons/beverages-14.svg +70 -0
  21. package/dist/maplibre/MapStyle/icons/bicycle-14.svg +40 -0
  22. package/dist/maplibre/MapStyle/icons/biergarten-14.svg +40 -0
  23. package/dist/maplibre/MapStyle/icons/bollard-10.svg +40 -0
  24. package/dist/maplibre/MapStyle/icons/bollard-14.svg +40 -0
  25. package/dist/maplibre/MapStyle/icons/books-14.svg +40 -0
  26. package/dist/maplibre/MapStyle/icons/buddhist-14.svg +40 -0
  27. package/dist/maplibre/MapStyle/icons/bus-station-14.svg +40 -0
  28. package/dist/maplibre/MapStyle/icons/bus-stop-10.svg +40 -0
  29. package/dist/maplibre/MapStyle/icons/bus-stop-14.svg +40 -0
  30. package/dist/maplibre/MapStyle/icons/butcher-14.svg +40 -0
  31. package/dist/maplibre/MapStyle/icons/cafe-14.svg +40 -0
  32. package/dist/maplibre/MapStyle/icons/camping-14.svg +40 -0
  33. package/dist/maplibre/MapStyle/icons/car-14.svg +40 -0
  34. package/dist/maplibre/MapStyle/icons/car-parts-14.svg +40 -0
  35. package/dist/maplibre/MapStyle/icons/caravan-14.svg +40 -0
  36. package/dist/maplibre/MapStyle/icons/castle-defensive-14.svg +40 -0
  37. package/dist/maplibre/MapStyle/icons/castle-fortress-14.svg +40 -0
  38. package/dist/maplibre/MapStyle/icons/castle-manor-14.svg +40 -0
  39. package/dist/maplibre/MapStyle/icons/castle-palace-14.svg +40 -0
  40. package/dist/maplibre/MapStyle/icons/castle-stately-14.svg +40 -0
  41. package/dist/maplibre/MapStyle/icons/cattle-grid-10.svg +40 -0
  42. package/dist/maplibre/MapStyle/icons/cattle-grid-14.svg +40 -0
  43. package/dist/maplibre/MapStyle/icons/cemetery-14.svg +40 -0
  44. package/dist/maplibre/MapStyle/icons/charging-station-14.svg +40 -0
  45. package/dist/maplibre/MapStyle/icons/chemist-14.svg +40 -0
  46. package/dist/maplibre/MapStyle/icons/christian-14.svg +40 -0
  47. package/dist/maplibre/MapStyle/icons/christian-orthodox-14.svg +40 -0
  48. package/dist/maplibre/MapStyle/icons/cinema-14.svg +40 -0
  49. package/dist/maplibre/MapStyle/icons/city-gate-14.svg +40 -0
  50. package/dist/maplibre/MapStyle/icons/clock-14.svg +40 -0
  51. package/dist/maplibre/MapStyle/icons/clothes-14.svg +40 -0
  52. package/dist/maplibre/MapStyle/icons/computer-14.svg +40 -0
  53. package/dist/maplibre/MapStyle/icons/confectionery-14.svg +40 -0
  54. package/dist/maplibre/MapStyle/icons/convenience-14.svg +40 -0
  55. package/dist/maplibre/MapStyle/icons/copyshop-14.svg +40 -0
  56. package/dist/maplibre/MapStyle/icons/courthouse-10.svg +40 -0
  57. package/dist/maplibre/MapStyle/icons/courthouse-14.svg +40 -0
  58. package/dist/maplibre/MapStyle/icons/dentist-14.svg +40 -0
  59. package/dist/maplibre/MapStyle/icons/doctor-14.svg +40 -0
  60. package/dist/maplibre/MapStyle/icons/doityourself-14.svg +40 -0
  61. package/dist/maplibre/MapStyle/icons/drinking-water-14.svg +40 -0
  62. package/dist/maplibre/MapStyle/icons/electronics-14.svg +40 -0
  63. package/dist/maplibre/MapStyle/icons/elevator-14.svg +40 -0
  64. package/dist/maplibre/MapStyle/icons/embassy-10.svg +40 -0
  65. package/dist/maplibre/MapStyle/icons/embassy-14.svg +40 -0
  66. package/dist/maplibre/MapStyle/icons/emergency-phone-14.svg +40 -0
  67. package/dist/maplibre/MapStyle/icons/entrance-10.svg +40 -0
  68. package/dist/maplibre/MapStyle/icons/entrance-14.svg +40 -0
  69. package/dist/maplibre/MapStyle/icons/exit-10.svg +40 -0
  70. package/dist/maplibre/MapStyle/icons/exit-14.svg +40 -0
  71. package/dist/maplibre/MapStyle/icons/fast-food-14.svg +40 -0
  72. package/dist/maplibre/MapStyle/icons/ferry-14.svg +40 -0
  73. package/dist/maplibre/MapStyle/icons/fire-station-14.svg +40 -0
  74. package/dist/maplibre/MapStyle/icons/florist-14.svg +40 -0
  75. package/dist/maplibre/MapStyle/icons/ford-14.svg +40 -0
  76. package/dist/maplibre/MapStyle/icons/fort-14.svg +40 -0
  77. package/dist/maplibre/MapStyle/icons/fountain-14.svg +40 -0
  78. package/dist/maplibre/MapStyle/icons/fuel-14.svg +40 -0
  79. package/dist/maplibre/MapStyle/icons/furniture-14.svg +40 -0
  80. package/dist/maplibre/MapStyle/icons/garden-centre-14.svg +40 -0
  81. package/dist/maplibre/MapStyle/icons/gate-10.svg +40 -0
  82. package/dist/maplibre/MapStyle/icons/gate-14.svg +40 -0
  83. package/dist/maplibre/MapStyle/icons/gift-14.svg +40 -0
  84. package/dist/maplibre/MapStyle/icons/government-14.svg +40 -0
  85. package/dist/maplibre/MapStyle/icons/greengrocer-14.svg +40 -0
  86. package/dist/maplibre/MapStyle/icons/guidepost-14.svg +40 -0
  87. package/dist/maplibre/MapStyle/icons/hairdresser-14.svg +40 -0
  88. package/dist/maplibre/MapStyle/icons/heliport-14.svg +40 -0
  89. package/dist/maplibre/MapStyle/icons/hifi-14.svg +40 -0
  90. package/dist/maplibre/MapStyle/icons/hinduist-14.svg +40 -0
  91. package/dist/maplibre/MapStyle/icons/hospital-14.svg +40 -0
  92. package/dist/maplibre/MapStyle/icons/hostel-14.svg +40 -0
  93. package/dist/maplibre/MapStyle/icons/hotel-14.svg +40 -0
  94. package/dist/maplibre/MapStyle/icons/hunting-stand-14.svg +40 -0
  95. package/dist/maplibre/MapStyle/icons/ice-cream-14.svg +40 -0
  96. package/dist/maplibre/MapStyle/icons/information-14.svg +40 -0
  97. package/dist/maplibre/MapStyle/icons/jewellery-14.svg +40 -0
  98. package/dist/maplibre/MapStyle/icons/jewish-14.svg +40 -0
  99. package/dist/maplibre/MapStyle/icons/kiosk-14.svg +40 -0
  100. package/dist/maplibre/MapStyle/icons/laundry-14.svg +40 -0
  101. package/dist/maplibre/MapStyle/icons/library-14.svg +40 -0
  102. package/dist/maplibre/MapStyle/icons/lift-gate-10.svg +40 -0
  103. package/dist/maplibre/MapStyle/icons/lift-gate-14.svg +40 -0
  104. package/dist/maplibre/MapStyle/icons/lighthouse-14.svg +40 -0
  105. package/dist/maplibre/MapStyle/icons/luggage-14.svg +40 -0
  106. package/dist/maplibre/MapStyle/icons/mast-14.svg +40 -0
  107. package/dist/maplibre/MapStyle/icons/mast-communications-14.svg +40 -0
  108. package/dist/maplibre/MapStyle/icons/memorial-10.svg +40 -0
  109. package/dist/maplibre/MapStyle/icons/memorial-14.svg +40 -0
  110. package/dist/maplibre/MapStyle/icons/metro-14.svg +40 -0
  111. package/dist/maplibre/MapStyle/icons/mobile-phone-14.svg +40 -0
  112. package/dist/maplibre/MapStyle/icons/monument-14.svg +40 -0
  113. package/dist/maplibre/MapStyle/icons/motel-14.svg +40 -0
  114. package/dist/maplibre/MapStyle/icons/museum-14.svg +40 -0
  115. package/dist/maplibre/MapStyle/icons/muslim-14.svg +40 -0
  116. package/dist/maplibre/MapStyle/icons/news-14.svg +40 -0
  117. package/dist/maplibre/MapStyle/icons/nightclub-14.svg +40 -0
  118. package/dist/maplibre/MapStyle/icons/optician-14.svg +40 -0
  119. package/dist/maplibre/MapStyle/icons/parking-bicycle-14.svg +40 -0
  120. package/dist/maplibre/MapStyle/icons/parking-car-14.svg +40 -0
  121. package/dist/maplibre/MapStyle/icons/parking-garage-car-14.svg +40 -0
  122. package/dist/maplibre/MapStyle/icons/peak-10.svg +40 -0
  123. package/dist/maplibre/MapStyle/icons/peak-14.svg +40 -0
  124. package/dist/maplibre/MapStyle/icons/pet-14.svg +40 -0
  125. package/dist/maplibre/MapStyle/icons/pharmacy-14.svg +40 -0
  126. package/dist/maplibre/MapStyle/icons/photo-14.svg +40 -0
  127. package/dist/maplibre/MapStyle/icons/pin-14.svg +10 -0
  128. package/dist/maplibre/MapStyle/icons/place-of-worship-14.svg +40 -0
  129. package/dist/maplibre/MapStyle/icons/playground-14.svg +40 -0
  130. package/dist/maplibre/MapStyle/icons/police-14.svg +40 -0
  131. package/dist/maplibre/MapStyle/icons/post-office-10.svg +40 -0
  132. package/dist/maplibre/MapStyle/icons/post-office-14.svg +40 -0
  133. package/dist/maplibre/MapStyle/icons/power-wind-14.svg +40 -0
  134. package/dist/maplibre/MapStyle/icons/prison-14.svg +40 -0
  135. package/dist/maplibre/MapStyle/icons/pub-14.svg +40 -0
  136. package/dist/maplibre/MapStyle/icons/railway-halt-14.svg +40 -0
  137. package/dist/maplibre/MapStyle/icons/railway-station-14.svg +40 -0
  138. package/dist/maplibre/MapStyle/icons/recycling-14.svg +40 -0
  139. package/dist/maplibre/MapStyle/icons/rental-bicycle-14.svg +40 -0
  140. package/dist/maplibre/MapStyle/icons/rental-car-14.svg +40 -0
  141. package/dist/maplibre/MapStyle/icons/repair-bicycle-14.svg +40 -0
  142. package/dist/maplibre/MapStyle/icons/repair-car-14.svg +40 -0
  143. package/dist/maplibre/MapStyle/icons/restaurant-14.svg +40 -0
  144. package/dist/maplibre/MapStyle/icons/saddle-10.svg +40 -0
  145. package/dist/maplibre/MapStyle/icons/saddle-14.svg +40 -0
  146. package/dist/maplibre/MapStyle/icons/shared-car-14.svg +40 -0
  147. package/dist/maplibre/MapStyle/icons/shelter-14.svg +37 -0
  148. package/dist/maplibre/MapStyle/icons/shintoist-14.svg +40 -0
  149. package/dist/maplibre/MapStyle/icons/shoes-14.svg +40 -0
  150. package/dist/maplibre/MapStyle/icons/sikhist-14.svg +40 -0
  151. package/dist/maplibre/MapStyle/icons/spring-14.svg +40 -0
  152. package/dist/maplibre/MapStyle/icons/stationery-14.svg +40 -0
  153. package/dist/maplibre/MapStyle/icons/steps-10.svg +40 -0
  154. package/dist/maplibre/MapStyle/icons/steps-14.svg +40 -0
  155. package/dist/maplibre/MapStyle/icons/supermarket-14.svg +40 -0
  156. package/dist/maplibre/MapStyle/icons/swimming-14.svg +40 -0
  157. package/dist/maplibre/MapStyle/icons/table-14.svg +40 -0
  158. package/dist/maplibre/MapStyle/icons/taoist-14.svg +40 -0
  159. package/dist/maplibre/MapStyle/icons/taxi-14.svg +40 -0
  160. package/dist/maplibre/MapStyle/icons/telephone-14.svg +40 -0
  161. package/dist/maplibre/MapStyle/icons/theatre-14.svg +40 -0
  162. package/dist/maplibre/MapStyle/icons/toilets-14.svg +40 -0
  163. package/dist/maplibre/MapStyle/icons/town-hall-14.svg +40 -0
  164. package/dist/maplibre/MapStyle/icons/toys-14.svg +40 -0
  165. package/dist/maplibre/MapStyle/icons/tram-stop-14.svg +40 -0
  166. package/dist/maplibre/MapStyle/icons/tree-coniferous-14.svg +40 -0
  167. package/dist/maplibre/MapStyle/icons/tree-deciduous-14.svg +40 -0
  168. package/dist/maplibre/MapStyle/icons/tree-unspecified-14.svg +40 -0
  169. package/dist/maplibre/MapStyle/icons/veterinary-14.svg +17 -0
  170. package/dist/maplibre/MapStyle/icons/viewpoint-14.svg +40 -0
  171. package/dist/maplibre/MapStyle/icons/waste-basket-10.svg +40 -0
  172. package/dist/maplibre/MapStyle/icons/waste-basket-14.svg +40 -0
  173. package/dist/maplibre/MapStyle/icons/watchtower-14.svg +40 -0
  174. package/dist/maplibre/MapStyle/icons/water-tower-14.svg +40 -0
  175. package/dist/maplibre/MapStyle/icons/waterfall-14.svg +40 -0
  176. package/dist/maplibre/MapStyle/icons/wilderness-hut-14.svg +37 -0
  177. package/dist/maplibre/MapStyle/icons/windmill-14.svg +40 -0
  178. package/dist/maplibre/MapStyle/make_sprite.sh +5 -0
  179. package/dist/maplibre/MapStyle/sprite/sprite.json +1 -0
  180. package/dist/maplibre/MapStyle/sprite/sprite.png +0 -0
  181. package/dist/maplibre/MapStyle/tokens.js +9 -9
  182. package/dist/maplibre/VectorLayer/sample-points.json +75 -0
  183. package/package.json +2 -2
@@ -22,6 +22,7 @@ const style = (opts) => {
22
22
  name: 'swr-datalab-light',
23
23
  metadata: { license: 'https://creativecommons.org/publicdomain/zero/1.0/' },
24
24
  glyphs: 'https://static.datenhub.net/maps/fonts/{fontstack}/{range}.pbf',
25
+ sprite: 'https://static.datenhub.net/maps/styles/swr-datalab-light/sprite/sprite',
25
26
  sources: {
26
27
  'versatiles-osm': {
27
28
  attribution: '<a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
@@ -0,0 +1,8 @@
1
+ export default function SpriteImage({ x, y, width, height, data }: {
2
+ x: any;
3
+ y: any;
4
+ width: any;
5
+ height: any;
6
+ data: any;
7
+ }): React.JSX.Element;
8
+ import React from 'react';
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import img from './sprite/sprite.png';
3
+
4
+ export default function SpriteImage({ x, y, width, height, data }) {
5
+ let w = 0;
6
+ Object.values(data).forEach((d) => {
7
+ if (d.x + d.width > w) {
8
+ w = d.x + d.width;
9
+ }
10
+ });
11
+
12
+ return (
13
+ <div
14
+ style={{
15
+ backgroundSize: `auto`,
16
+ backgroundImage: `url(${img})`,
17
+ width: `${width}px`,
18
+ height: `${height}px`,
19
+ backgroundPosition: `${-x}px ${-y}px`
20
+ }}
21
+ ></div>
22
+ );
23
+ }
@@ -12,16 +12,16 @@ export default function makeAdmin() {
12
12
  ['!=', 'coastline', true]
13
13
  ],
14
14
  paint: {
15
- 'line-color': tokens.background,
15
+ 'line-color': '#ffffff',
16
16
  'line-blur': 1,
17
17
  'line-width': {
18
18
  stops: [
19
19
  [2, 0],
20
- [3, 2],
21
- [10, 8]
20
+ [3, 6],
21
+ [10, 7]
22
22
  ]
23
23
  },
24
- 'line-opacity': 0.75
24
+ 'line-opacity': 0.95
25
25
  }
26
26
  },
27
27
  {
@@ -55,13 +55,13 @@ export default function makeAdmin() {
55
55
  ['!=', 'coastline', true]
56
56
  ],
57
57
  paint: {
58
- 'line-color': tokens.background,
58
+ 'line-color': 'white',
59
59
  'line-blur': 1,
60
60
  'line-width': {
61
61
  stops: [
62
62
  [7, 0],
63
- [8, 2],
64
- [10, 4]
63
+ [8, 5],
64
+ [10, 6]
65
65
  ]
66
66
  },
67
67
  'line-opacity': 0.75
@@ -79,15 +79,15 @@ export default function makeAdmin() {
79
79
  paint: {
80
80
  'line-color': {
81
81
  stops: [
82
- [7, '#dedede'],
83
- [10, '#161616']
82
+ [7, '#a5a5a5'],
83
+ [10, '#3f3b39']
84
84
  ]
85
85
  },
86
86
  'line-width': {
87
87
  stops: [
88
88
  [2, 0],
89
89
  [5, 1],
90
- [8, 1],
90
+ [7, 1.5],
91
91
  [12, 3]
92
92
  ]
93
93
  }
@@ -124,7 +124,7 @@ export default function makeAdmin() {
124
124
  ['!=', 'coastline', true]
125
125
  ],
126
126
  paint: {
127
- 'line-color': 'hsl(37, 34%, 79%)',
127
+ 'line-color': 'hsl(37, 10%, 75%)',
128
128
  'line-width': {
129
129
  stops: [
130
130
  [7, 1],
@@ -134,7 +134,7 @@ export default function makeAdmin() {
134
134
  'line-opacity': {
135
135
  stops: [
136
136
  [7, 0],
137
- [8, 1]
137
+ [7.5, 1]
138
138
  ]
139
139
  }
140
140
  }
@@ -21,8 +21,8 @@ export default function makeBuildings() {
21
21
  'fill-color': tokens.building,
22
22
  'fill-opacity': {
23
23
  stops: [
24
- [14, 0],
25
- [15, 1]
24
+ [15, 0],
25
+ [16, 1]
26
26
  ]
27
27
  }
28
28
  }
@@ -6,7 +6,12 @@ export default function makeLanduse() {
6
6
  id: 'background',
7
7
  type: 'background',
8
8
  paint: {
9
- 'background-color': tokens.background
9
+ 'background-color': {
10
+ stops: [
11
+ [8, tokens.background],
12
+ [10, 'white']
13
+ ]
14
+ }
10
15
  }
11
16
  },
12
17
  {
@@ -100,26 +105,14 @@ export default function makeLanduse() {
100
105
  }
101
106
  }
102
107
  },
103
- {
104
- id: 'land-burial',
105
- type: 'fill',
106
- 'source-layer': 'land',
107
- filter: ['all', ['in', 'kind', 'cemetery', 'grave_yard']],
108
- paint: {
109
- 'fill-color': tokens.grass,
110
- 'fill-opacity': {
111
- stops: [
112
- [12, 0],
113
- [13, 1]
114
- ]
115
- }
116
- }
117
- },
118
108
  {
119
109
  id: 'land-leisure',
120
110
  type: 'fill',
121
111
  'source-layer': 'land',
122
- filter: ['all', ['in', 'kind', 'miniature_golf', 'playground', 'golf_course']],
112
+ filter: [
113
+ 'all',
114
+ ['in', 'kind', 'cemetery', 'grave_yard', 'miniature_golf', 'playground', 'golf_course']
115
+ ],
123
116
  paint: {
124
117
  'fill-color': tokens.grass_dark
125
118
  }
@@ -152,22 +145,10 @@ export default function makeLanduse() {
152
145
  id: 'land-grass',
153
146
  type: 'fill',
154
147
  'source-layer': 'land',
155
- filter: ['all', ['in', 'kind', 'grass', 'grassland', 'meadow', 'wet_meadow']],
156
- paint: {
157
- 'fill-color': tokens.grass,
158
- 'fill-opacity': {
159
- stops: [
160
- [11, 0],
161
- [12, 1]
162
- ]
163
- }
164
- }
165
- },
166
- {
167
- id: 'land-vegetation',
168
- type: 'fill',
169
- 'source-layer': 'land',
170
- filter: ['all', ['in', 'kind', 'heath', 'scrub']],
148
+ filter: [
149
+ 'all',
150
+ ['in', 'kind', 'heath', 'scrub', 'grass', 'grassland', 'meadow', 'wet_meadow']
151
+ ],
171
152
  paint: {
172
153
  'fill-color': tokens.grass,
173
154
  'fill-opacity': {
@@ -300,7 +281,7 @@ export default function makeLanduse() {
300
281
  'source-layer': 'water_polygons',
301
282
  filter: ['==', 'kind', 'water'],
302
283
  paint: {
303
- 'fill-color': tokens.water_ocean,
284
+ 'fill-color': tokens.water,
304
285
  'fill-opacity': {
305
286
  stops: [
306
287
  [3, 0],
@@ -402,91 +383,11 @@ export default function makeLanduse() {
402
383
  }
403
384
  },
404
385
  {
405
- id: 'site-dangerarea',
406
- type: 'fill',
407
- 'source-layer': 'sites',
408
- filter: ['in', 'kind', 'danger_area'],
409
- paint: {
410
- 'fill-color': 'hsl(0,0%,50%)',
411
- 'fill-outline-color': 'hsl(0,0%,50%)',
412
- 'fill-opacity': 0.3
413
- }
414
- },
415
- {
416
- id: 'site-university',
417
- type: 'fill',
418
- 'source-layer': 'sites',
419
- filter: ['in', 'kind', 'university'],
420
- paint: {
421
- 'fill-color': 'hsl(60,0%,75%)',
422
- 'fill-opacity': 0.1
423
- }
424
- },
425
- {
426
- id: 'site-college',
427
- type: 'fill',
428
- 'source-layer': 'sites',
429
- filter: ['in', 'kind', 'college'],
430
- paint: {
431
- 'fill-color': 'hsl(60,0%,75%)',
432
- 'fill-opacity': 0.1
433
- }
434
- },
435
- {
436
- id: 'site-school',
386
+ id: 'site-any',
437
387
  type: 'fill',
438
388
  'source-layer': 'sites',
439
- filter: ['in', 'kind', 'school'],
440
389
  paint: {
441
- 'fill-color': 'hsl(60,0%,75%)',
442
- 'fill-opacity': 0.1
443
- }
444
- },
445
- {
446
- id: 'site-hospital',
447
- type: 'fill',
448
- 'source-layer': 'sites',
449
- filter: ['in', 'kind', 'hospital'],
450
- paint: {
451
- 'fill-color': 'hsl(0,0%,70%)',
452
- 'fill-opacity': 0.1
453
- }
454
- },
455
- {
456
- id: 'site-prison',
457
- type: 'fill',
458
- 'source-layer': 'sites',
459
- filter: ['in', 'kind', 'prison'],
460
- paint: {
461
- 'fill-color': 'hsl(305,0%,97%)',
462
- 'fill-opacity': 0.1
463
- }
464
- },
465
- {
466
- id: 'site-parking',
467
- type: 'fill',
468
- 'source-layer': 'sites',
469
- filter: ['in', 'kind', 'parking'],
470
- paint: {
471
- 'fill-color': 'hsl(24,0%,95%)'
472
- }
473
- },
474
- {
475
- id: 'site-bicycleparking',
476
- type: 'fill',
477
- 'source-layer': 'sites',
478
- filter: ['in', 'kind', 'bicycle_parking'],
479
- paint: {
480
- 'fill-color': 'hsl(24,0%,95%)'
481
- }
482
- },
483
- {
484
- id: 'site-construction',
485
- type: 'fill',
486
- 'source-layer': 'sites',
487
- filter: ['in', 'kind', 'construction'],
488
- paint: {
489
- 'fill-color': 'hsl(0,0%,66%)',
390
+ 'fill-color': tokens.street_tertiary,
490
391
  'fill-opacity': 0.1
491
392
  }
492
393
  }
@@ -2,28 +2,7 @@ import tokens from '../tokens';
2
2
  // Hand-authored list of place labes we want to show at low zoom levels
3
3
  // Ideally majorCities would include Frankfurt and Leipzig, but they're not
4
4
  // state capitals so they're not available in the versatiles data until z6
5
- const majorCities = [
6
- 'Berlin',
7
- 'Stuttgart',
8
- 'München',
9
- 'Frankfurt',
10
- 'Hamburg',
11
- 'Mainz'
12
- ];
13
- const majorCountries = [
14
- 'Deutschland',
15
- 'Dänemark',
16
- 'Frankreich',
17
- 'Niederlande',
18
- 'Belgien',
19
- 'Schweiz',
20
- 'Polen',
21
- 'Österreich',
22
- 'Tschechien',
23
- 'Slowakei',
24
- 'Italien',
25
- 'Ungarn'
26
- ];
5
+ const majorCities = ['Berlin', 'Stuttgart', 'München', 'Frankfurt', 'Hamburg', 'Mainz'];
27
6
  // For smaller cities we use the population field to derive our hierarchy,
28
7
  // though that's limited by the fact that versatiles hard-codes population
29
8
  // values for "city" and anything below.
@@ -137,30 +116,30 @@ export default function makePlaceLabels() {
137
116
  layout: {
138
117
  'text-size': {
139
118
  stops: [
140
- [7, 14],
119
+ [7, 16],
141
120
  [15, 20]
142
121
  ]
143
122
  }
144
123
  },
145
124
  paint: {
146
- 'text-color': tokens.label_primary
125
+ 'text-color': tokens.label_secondary
147
126
  }
148
127
  },
149
128
  {
150
129
  id: 'label-place-major-city',
151
130
  filter: ['in', 'name_de', ...majorCities],
152
- minzoom: 5,
131
+ minzoom: 5.5,
153
132
  maxzoom: 12,
154
133
  layout: {
155
134
  'text-size': {
156
135
  stops: [
157
- [7, 13],
158
- [15, 21]
136
+ [7, 14],
137
+ [15, 25]
159
138
  ]
160
139
  }
161
140
  },
162
141
  paint: {
163
- 'text-color': tokens.label_secondary
142
+ 'text-color': tokens.label_tertiary
164
143
  }
165
144
  }
166
145
  ].map((el) => {
@@ -171,7 +150,7 @@ export default function makePlaceLabels() {
171
150
  'source-layer': 'place_labels',
172
151
  layout: {
173
152
  'text-font': tokens.sans_regular,
174
- 'text-letter-spacing': 0.05,
153
+ 'text-letter-spacing': 0.01,
175
154
  'text-field': '{name_de}',
176
155
  ...el.layout
177
156
  },
@@ -187,25 +166,28 @@ export default function makePlaceLabels() {
187
166
  const boundaryLabels = [
188
167
  {
189
168
  id: 'label-boundary-country',
190
- filter: ['all', ['==', 'admin_level', 2], ['in', 'name_de', ...majorCountries]],
169
+ filter: [
170
+ 'all',
171
+ ['==', 'admin_level', 2],
172
+ ['!in', 'name_de', 'Jersey', 'Guernsey', 'Insel Man']
173
+ ],
191
174
  minzoom: 4,
192
175
  maxzoom: 8,
193
176
  layout: {
194
177
  'text-field': '{name_de}',
195
- 'text-letter-spacing': 0.085,
178
+ 'text-letter-spacing': 0.02,
196
179
  'text-font': tokens.sans_regular,
197
- 'text-transform': 'uppercase',
198
180
  'text-size': {
199
181
  stops: [
200
- [4, 11],
182
+ [4, 13],
201
183
  [7, 18]
202
184
  ]
203
185
  }
204
186
  },
205
187
  paint: {
206
188
  'text-color': tokens.label_tertiary,
207
- 'text-halo-color': tokens.background,
208
- 'text-halo-width': 2.5,
189
+ 'text-halo-color': 'white',
190
+ 'text-halo-width': 2,
209
191
  'text-halo-blur': 0.5
210
192
  }
211
193
  }
@@ -22,8 +22,8 @@ const motorway = {
22
22
  },
23
23
  line_opacity: {
24
24
  stops: [
25
- [6, 0],
26
- [7, 0.8],
25
+ [4, 0],
26
+ [5, 0.8],
27
27
  [11, 0.8],
28
28
  [12, 1]
29
29
  ]
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ version="1.1"
11
+ width="100%"
12
+ height="100%"
13
+ viewBox="0 0 14 14"
14
+ id="svg2">
15
+ <metadata
16
+ id="metadata8">
17
+ <rdf:RDF>
18
+ <cc:Work
19
+ rdf:about="">
20
+ <dc:format>image/svg+xml</dc:format>
21
+ <dc:type
22
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
23
+ <dc:title></dc:title>
24
+ </cc:Work>
25
+ </rdf:RDF>
26
+ </metadata>
27
+ <defs
28
+ id="defs6" />
29
+ <rect
30
+ width="14"
31
+ height="14"
32
+ x="0"
33
+ y="0"
34
+ id="canvas"
35
+ style="fill:none;stroke:none;visibility:hidden" />
36
+ <path
37
+ d="m 14,8 0,1 -6,-1 0,3 2,2 0,1 L 7,13 4,14 4,13 6,11 6,8 0,9 0,8 6,5 6,2 C 6,1 6.22222,0 7,0 7.77777,0 8,1 8,2 l 0,3 z"
38
+ id="airport"
39
+ style="fill:#000000;fill-opacity:1;stroke:none" />
40
+ </svg>
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ version="1.1"
11
+ width="100%"
12
+ height="100%"
13
+ viewBox="0 0 14 14"
14
+ id="svg2">
15
+ <metadata
16
+ id="metadata8">
17
+ <rdf:RDF>
18
+ <cc:Work
19
+ rdf:about="">
20
+ <dc:format>image/svg+xml</dc:format>
21
+ <dc:type
22
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
23
+ <dc:title></dc:title>
24
+ </cc:Work>
25
+ </rdf:RDF>
26
+ </metadata>
27
+ <defs
28
+ id="defs6" />
29
+ <rect
30
+ width="14"
31
+ height="14"
32
+ x="0"
33
+ y="0"
34
+ id="canvas"
35
+ style="fill:none;stroke:none;visibility:hidden" />
36
+ <path
37
+ d="M 3,0 C 2,0 2,0.4670568 2,1 L 2,3 C 2,4 0,4 0,6 l 0,7 c 0,0.566252 0.467057,1 1,1 l 4,0 c 0.599561,0 1,-0.400439 1,-1 L 6,6 C 6,4 4,4 4,3 L 4,1 C 4,0.4337479 4,0 3,0 z m 4,5 c 0,3 0.47106,5 3,5 l 0,2 c 0,0.666911 -1,1 -1.5,1 -1,0 -1.5,0 -1.5,1 l 7,0 C 14,13 13.5,13 12.5,13 12,13 11,12.633602 11,12 l 0,-2 c 2.47106,0 3,-2 3,-5 L 7,5 z"
38
+ id="alcohol"
39
+ style="fill:#000000;fill-opacity:1;stroke:none" />
40
+ </svg>
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
4
+ xmlns:cc="http://creativecommons.org/ns#"
5
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
+ xmlns:svg="http://www.w3.org/2000/svg"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ id="svg2"
9
+ viewBox="0 0 14 14"
10
+ height="100%"
11
+ width="100%"
12
+ version="1.1">
13
+ <metadata
14
+ id="metadata8">
15
+ <rdf:RDF>
16
+ <cc:Work
17
+ rdf:about="">
18
+ <dc:format>image/svg+xml</dc:format>
19
+ <dc:type
20
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
21
+ <dc:title></dc:title>
22
+ </cc:Work>
23
+ </rdf:RDF>
24
+ </metadata>
25
+ <defs
26
+ id="defs6" />
27
+ <rect
28
+ style="fill:none;stroke:none;visibility:hidden"
29
+ id="canvas"
30
+ y="0"
31
+ x="0"
32
+ height="14"
33
+ width="14" />
34
+ <path
35
+ id="alpine-hut"
36
+ d="M 7 1 L 0 5 L 0 7 L 1.5 6.3496094 L 1.5 14 L 3 14 L 3 5.6992188 L 7 4 L 11 5.6992188 L 11 14 L 12.5 14 L 12.5 6.3496094 L 14 7 L 14 5 L 7 1 z M 5.5 6 C 4.9285714 6 4 7.2857142 4 9 C 4 10.714286 5 11 5 11 L 5 14 L 6 14 L 6 11 C 6 11 7 10.714286 7 9 C 7 7.2857142 6.0714286 6 5.5 6 z M 8 6 L 8 14 L 9 14 L 9 11 L 10 11 L 10 10 C 10 8 9 6 8 6 z " style="fill:#000000;fill-opacity:1;stroke:none" />
37
+ </svg>
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ version="1.1"
11
+ width="100%"
12
+ height="100%"
13
+ viewBox="0 0 14 14"
14
+ id="svg2">
15
+ <metadata
16
+ id="metadata8">
17
+ <rdf:RDF>
18
+ <cc:Work
19
+ rdf:about="">
20
+ <dc:format>image/svg+xml</dc:format>
21
+ <dc:type
22
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
23
+ <dc:title></dc:title>
24
+ </cc:Work>
25
+ </rdf:RDF>
26
+ </metadata>
27
+ <defs
28
+ id="defs6" />
29
+ <rect
30
+ width="14"
31
+ height="14"
32
+ x="0"
33
+ y="0"
34
+ id="canvas"
35
+ style="fill:none;stroke:none;visibility:hidden" />
36
+ <path
37
+ d="M 3,0 3,1 4,1 C 4.5988688,1 4.8411383,2.0430706 4.9375,2.90625 3.9652283,2.1499026 3.0249855,1.8795933 2.21875,2.03125 1.1884439,2.2250555 0.5,3.1743045 0.5,4.25 c 0,0.8419164 0.31211643,1.5788561 0.84375,2.34375 0.464621,0.6684787 1.1198438,1.4400576 1.9375,2.375 C 3.6476993,10.327756 4.3223039,11.572304 5,12.25 L 5,13 4,13.5 4,14 10,14 10,13.5 9,13 9,12.25 c 0.6776961,-0.677696 1.352301,-1.922244 1.71875,-3.28125 0.817656,-0.9349424 1.472879,-1.7065213 1.9375,-2.375 C 13.187884,5.8288561 13.5,5.0919164 13.5,4.25 13.5,3.1743045 12.811556,2.2250555 11.78125,2.03125 10.975015,1.8795933 10.034772,2.1499026 9.0625,2.90625 9.1588617,2.0430706 9.4011312,1 10,1 L 11,1 11,0 3,0 z M 2.375,3.03125 c 0.5098367,-0.095903 1.3604039,0.1012462 2.34375,1 C 3.603741,4.1696287 3,5.1495633 3,7 3,7.0311958 2.9995172,7.0624382 3,7.09375 2.6594765,6.6981019 2.3761871,6.3476871 2.15625,6.03125 1.6878836,5.3573824 1.5,4.8627724 1.5,4.25 1.5,3.5496757 1.8109254,3.1373551 2.375,3.03125 z m 8.75,0 c 0.188111,-0.027114 0.358981,-0.026526 0.5,0 C 12.189075,3.1373551 12.5,3.5496757 12.5,4.25 12.5,4.8627724 12.312116,5.3573824 11.84375,6.03125 11.623813,6.3476871 11.340524,6.6981019 11,7.09375 11.000483,7.0624382 11,7.0311958 11,7 11,5.1495633 10.396259,4.1696287 9.28125,4.03125 c 0.7113567,-0.6501623 1.351767,-0.9290858 1.84375,-1 z"
38
+ id="archaeological-site"
39
+ style="fill:#000000;fill-opacity:1;stroke:none" />
40
+ </svg>
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ version="1.1"
11
+ width="100%"
12
+ height="100%"
13
+ viewBox="0 0 14 14"
14
+ id="svg2">
15
+ <metadata
16
+ id="metadata8">
17
+ <rdf:RDF>
18
+ <cc:Work
19
+ rdf:about="">
20
+ <dc:format>image/svg+xml</dc:format>
21
+ <dc:type
22
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
23
+ <dc:title></dc:title>
24
+ </cc:Work>
25
+ </rdf:RDF>
26
+ </metadata>
27
+ <defs
28
+ id="defs6" />
29
+ <rect
30
+ width="14"
31
+ height="14"
32
+ x="0"
33
+ y="0"
34
+ id="canvas"
35
+ style="fill:none;stroke:none;visibility:hidden" />
36
+ <path
37
+ d="M 1,0 C 0.457627,0 0,0.4576271 0,1 l 0,2 c 0,0.559322 0.488617,1 1,1 l 0,-2 12,0 0,2 c 0.511382,0 1,-0.4857094 1,-1 L 14,1 C 14,0.4576271 13.508475,0 13,0 z m 1,3 0,8 c 0,0.599243 0.400757,1 1,1 l 8,0 c 0.527334,0 1,-0.448696 1,-1 l 0,-8 -1,0 0,6 C 10,9 9,10 9,11 L 5,11 C 5,10 4,9 3,9 L 3,3 z M 7,4 C 5.429204,4 4,4.9528024 4,6 4,7.047198 5.429204,8 7,8 8.570796,8 10,7.047198 10,6 10,4.9528024 8.570796,4 7,4 z M 2,12.5 C 2,13.554668 2.424727,14 3,14 l 8,0 c 0.527334,0 1,-0.445332 1,-1.5 -0.305085,0.271186 -0.496636,0.49272 -1,0.46875 l -8,0.0625 C 2.520606,13.00728 2.305085,12.805085 2,12.5 z"
38
+ id="atm"
39
+ style="fill:#000000;fill-opacity:1;stroke:none" />
40
+ </svg>
@@ -0,0 +1,40 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!-- Created with Inkscape (http://www.inkscape.org/) -->
3
+
4
+ <svg
5
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
6
+ xmlns:cc="http://creativecommons.org/ns#"
7
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
+ xmlns:svg="http://www.w3.org/2000/svg"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ version="1.1"
11
+ width="100%"
12
+ height="100%"
13
+ viewBox="0 0 14 14"
14
+ id="svg2">
15
+ <metadata
16
+ id="metadata8">
17
+ <rdf:RDF>
18
+ <cc:Work
19
+ rdf:about="">
20
+ <dc:format>image/svg+xml</dc:format>
21
+ <dc:type
22
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
23
+ <dc:title></dc:title>
24
+ </cc:Work>
25
+ </rdf:RDF>
26
+ </metadata>
27
+ <defs
28
+ id="defs6" />
29
+ <rect
30
+ width="14"
31
+ height="14"
32
+ x="0"
33
+ y="0"
34
+ id="canvas"
35
+ style="fill:none;stroke:none;visibility:hidden" />
36
+ <path
37
+ d="M 6.75,3 8.25,7 6.75,7 5.25,3 C 5.25,3 3.494833,3 3.5,3 L 5,7 3.5,7 2.176907,3.5762712 C 1.291044,4.2640693 0,6.1983848 0,8 l 0,2 c 0,0.59322 0.423729,1 1,1 l 12,0 c 0.576271,0 1,-0.423729 1,-1 L 14,8 C 14,5.5355945 12.272623,3.5853602 10,3 L 11.5,7 10,7 8.5,3 c 0,0 -1.743955,0 -1.75,0 z"
38
+ id="bakery"
39
+ style="fill:#000000;fill-opacity:1;stroke:none" />
40
+ </svg>