@ndwnu/map 2.1.1 → 3.0.1

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.
@@ -825,11 +825,11 @@ var sprite = [
825
825
  },
826
826
  {
827
827
  id: "sdf",
828
- url: "https://maps.ndw.nu/styles/ndw-basemap/dev/sdf"
828
+ url: "https://design.ndw.nu/map-storybook/assets/sprites/sdf"
829
829
  },
830
830
  {
831
831
  id: "custom",
832
- url: "https://maps.ndw.nu/styles/ndw-basemap/dev/custom_ndw"
832
+ url: "https://design.ndw.nu/map-storybook/assets/sprites/custom_ndw"
833
833
  }
834
834
  ];
835
835
  var glyphs = "https://maps.ndw.nu/styles/glyphs/{fontstack}/{range}.pbf";
@@ -896,6 +896,13 @@ var sources = {
896
896
  "ndw-wkd-parking-areas": {
897
897
  type: "vector",
898
898
  url: "https://maps.ndw.nu/api/v1/wkdParkingAreas/latest/mbtiles/segments/"
899
+ },
900
+ openmaptiles: {
901
+ type: "vector",
902
+ url: "https://maps.ndw.nu/api/v1/osm/latest/mbtiles/osm/",
903
+ minzoom: 0,
904
+ maxzoom: 14,
905
+ attribution: "<a href='https://www.openstreetmap.org/copyright'>© OpenStreetMap</a>"
899
906
  }
900
907
  };
901
908
  var layers = [
@@ -4039,221 +4046,1041 @@ var layers = [
4039
4046
  }
4040
4047
  },
4041
4048
  {
4042
- id: "brt-railway-center-line",
4049
+ id: "osm-road-sections-casing",
4043
4050
  type: "line",
4044
- source: "pdok-brt",
4045
- "source-layer": "spoorbaandeellijn",
4046
- minzoom: 9,
4051
+ source: "openmaptiles",
4052
+ "source-layer": "transportation",
4047
4053
  metadata: {
4048
- group: "context-map",
4049
- "sub-group": "railway",
4054
+ group: "osm",
4055
+ "sub-group": "osm-road-sections",
4050
4056
  type: "context",
4051
- "legend-name": "Spoorlijnen",
4052
- desc: "trein, metro, tram. beschikbaar van z9. Over de wegen heen.",
4053
- "insert-before": "lines-overlay"
4057
+ "legend-name": "OSM Wegvakken omlijning",
4058
+ desc: "OpenStreetMap wegen omlijning",
4059
+ "insert-before": "background"
4054
4060
  },
4061
+ filter: [
4062
+ "!in",
4063
+ "class",
4064
+ "path",
4065
+ "track",
4066
+ "rail",
4067
+ "transit",
4068
+ "ferry"
4069
+ ],
4055
4070
  layout: {
4056
- visibility: "visible",
4071
+ visibility: "none",
4057
4072
  "line-cap": "round",
4058
- "line-join": "round"
4073
+ "line-join": "round",
4074
+ "line-sort-key": [
4075
+ "match",
4076
+ [
4077
+ "get",
4078
+ "class"
4079
+ ],
4080
+ "motorway",
4081
+ 7,
4082
+ "trunk",
4083
+ 6,
4084
+ "primary",
4085
+ 5,
4086
+ "secondary",
4087
+ 4,
4088
+ "tertiary",
4089
+ 3,
4090
+ "minor",
4091
+ 2,
4092
+ "service",
4093
+ 1,
4094
+ 0
4095
+ ]
4059
4096
  },
4060
4097
  paint: {
4061
4098
  "line-color": [
4062
4099
  "match",
4063
4100
  [
4064
4101
  "get",
4065
- "vistext"
4102
+ "class"
4066
4103
  ],
4067
- "treinspoor",
4068
- "#a3a7aa",
4069
- "spoor in tunnel",
4070
- "#a3a7aa",
4071
- "metro / sneltram",
4072
- "#cbcdd9",
4073
- "metro / sneltram in tunnel",
4074
- "#cbcdd9",
4075
- "tram",
4076
- "#a3a7aa",
4077
- "tram in tunnel",
4078
- "#a3a7aa",
4079
- "overig",
4080
- "#a3a7aa",
4081
- "spoor onder ander object",
4082
- "#a3a7aa",
4083
- "transparent"
4104
+ "motorway",
4105
+ "#DAAD3A",
4106
+ "trunk",
4107
+ "#DAAD3A",
4108
+ "primary",
4109
+ "#DAAD3A",
4110
+ "secondary",
4111
+ "#E2C16C",
4112
+ "tertiary",
4113
+ "#E5CA85",
4114
+ "minor",
4115
+ "hsl(192, 5%, 82%)",
4116
+ "service",
4117
+ "hsl(192, 5%, 82%)",
4118
+ "hsl(0, 0%, 100%)"
4084
4119
  ],
4085
4120
  "line-width": [
4086
4121
  "interpolate",
4087
4122
  [
4088
- "linear"
4123
+ "exponential",
4124
+ 1.1
4089
4125
  ],
4090
4126
  [
4091
4127
  "zoom"
4092
4128
  ],
4093
- 12,
4129
+ 10,
4094
4130
  [
4095
4131
  "match",
4096
4132
  [
4097
4133
  "get",
4098
- "vistext"
4134
+ "class"
4099
4135
  ],
4100
- "treinspoor",
4101
- 0.8,
4102
- "spoor in tunnel",
4103
- 0.5,
4104
- "metro / sneltram",
4105
- 0.1,
4106
- "metro / sneltram in tunnel",
4107
- 0.1,
4108
- "tram",
4109
- 0.1,
4110
- "tram in tunnel",
4111
- 0.1,
4112
- "overig",
4113
- 0.1,
4114
- "spoor onder ander object",
4115
- 1,
4116
- 10
4136
+ "motorway",
4137
+ 3.5,
4138
+ "trunk",
4139
+ 3.5,
4140
+ "primary",
4141
+ 3.5,
4142
+ "secondary",
4143
+ 2.5,
4144
+ "tertiary",
4145
+ 2.5,
4146
+ "minor",
4147
+ 0,
4148
+ "service",
4149
+ 0,
4150
+ 0
4117
4151
  ],
4118
- 16,
4152
+ 13,
4119
4153
  [
4120
4154
  "match",
4121
4155
  [
4122
4156
  "get",
4123
- "vistext"
4157
+ "class"
4124
4158
  ],
4125
- "treinspoor",
4126
- 1.5,
4127
- "spoor in tunnel",
4128
- 1.5,
4129
- "metro / sneltram",
4130
- 3,
4131
- "metro / sneltram in tunnel",
4132
- 3,
4133
- "tram",
4134
- 1,
4135
- "tram in tunnel",
4136
- 1,
4137
- "overig",
4138
- 0.5,
4139
- "spoor onder ander object",
4140
- 1.5,
4141
- 10
4142
- ]
4143
- ],
4144
- "line-opacity": [
4145
- "match",
4159
+ "motorway",
4160
+ 7.5,
4161
+ "trunk",
4162
+ 6,
4163
+ "primary",
4164
+ 6,
4165
+ "secondary",
4166
+ 6,
4167
+ "tertiary",
4168
+ 6,
4169
+ "minor",
4170
+ 4.5,
4171
+ "service",
4172
+ 3.5,
4173
+ 0
4174
+ ],
4175
+ 15,
4146
4176
  [
4147
- "get",
4148
- "vistext"
4177
+ "match",
4178
+ [
4179
+ "get",
4180
+ "class"
4181
+ ],
4182
+ "motorway",
4183
+ 12.5,
4184
+ "trunk",
4185
+ 12,
4186
+ "primary",
4187
+ 11,
4188
+ "secondary",
4189
+ 9,
4190
+ "tertiary",
4191
+ 9,
4192
+ "minor",
4193
+ 8,
4194
+ "service",
4195
+ 5,
4196
+ 0
4149
4197
  ],
4150
- "spoor onder ander object",
4151
- 0.5,
4152
- "spoor in tunnel",
4153
- 0.5,
4154
- "metro / sneltram in tunnel",
4155
- 0.5,
4156
- "tram in tunnel",
4157
- 0.5,
4158
- 1
4159
- ]
4198
+ 20,
4199
+ [
4200
+ "match",
4201
+ [
4202
+ "get",
4203
+ "class"
4204
+ ],
4205
+ "motorway",
4206
+ 27,
4207
+ "trunk",
4208
+ 27,
4209
+ "primary",
4210
+ 25,
4211
+ "secondary",
4212
+ 23,
4213
+ "tertiary",
4214
+ 23,
4215
+ "minor",
4216
+ 22,
4217
+ "service",
4218
+ 20,
4219
+ 0
4220
+ ]
4221
+ ],
4222
+ "line-opacity": 1
4160
4223
  }
4161
4224
  },
4162
4225
  {
4163
- id: "brt-railway-center-dash",
4226
+ id: "osm-road-sections-fill",
4164
4227
  type: "line",
4165
- source: "pdok-brt",
4166
- "source-layer": "spoorbaandeellijn",
4167
- minzoom: 14,
4228
+ source: "openmaptiles",
4229
+ "source-layer": "transportation",
4168
4230
  metadata: {
4169
- group: "context-map",
4170
- "sub-group": "railway",
4231
+ group: "osm",
4232
+ "sub-group": "osm-road-sections",
4171
4233
  type: "context",
4172
- "legend-name": "Spoorlijnen dash voor trein",
4173
- desc: "trein. beschikbaar van z14. Over de wegen heen.",
4174
- "insert-before": "lines-overlay"
4234
+ "legend-name": "OSM Wegvakken vulling",
4235
+ desc: "OpenStreetMap wegen vulling",
4236
+ "insert-before": "background"
4175
4237
  },
4176
4238
  filter: [
4177
- "any",
4178
- [
4179
- "==",
4180
- [
4181
- "get",
4182
- "vistext"
4183
- ],
4184
- "treinspoor"
4185
- ],
4186
- [
4187
- "==",
4188
- [
4189
- "get",
4190
- "vistext"
4191
- ],
4192
- "overig"
4193
- ],
4194
- [
4195
- "==",
4239
+ "!in",
4240
+ "class",
4241
+ "path",
4242
+ "track",
4243
+ "rail",
4244
+ "transit",
4245
+ "ferry"
4246
+ ],
4247
+ layout: {
4248
+ visibility: "none",
4249
+ "line-cap": "round",
4250
+ "line-join": "round",
4251
+ "line-sort-key": [
4252
+ "match",
4196
4253
  [
4197
4254
  "get",
4198
- "vistext"
4255
+ "class"
4199
4256
  ],
4200
- "spoor in tunnel"
4257
+ "motorway",
4258
+ 7,
4259
+ "trunk",
4260
+ 6,
4261
+ "primary",
4262
+ 5,
4263
+ "secondary",
4264
+ 4,
4265
+ "tertiary",
4266
+ 3,
4267
+ "minor",
4268
+ 2,
4269
+ "service",
4270
+ 1,
4271
+ 0
4201
4272
  ]
4202
- ],
4203
- layout: {
4204
- visibility: "visible",
4205
- "line-cap": "butt",
4206
- "line-join": "round"
4207
4273
  },
4208
4274
  paint: {
4209
- "line-dasharray": [
4210
- 0.1,
4211
- 5
4212
- ],
4213
4275
  "line-color": [
4214
4276
  "match",
4215
4277
  [
4216
4278
  "get",
4217
- "vistext"
4279
+ "class"
4218
4280
  ],
4219
- "treinspoor",
4220
- "#a3a7aa",
4221
- "spoor in tunnel",
4222
- "#a3a7aa",
4223
- "overig",
4224
- "#a3a7aa",
4225
- "spoor onder ander object",
4226
- "#a3a7aa",
4227
- "transparent"
4281
+ "motorway",
4282
+ "hsl(43, 93%, 88%)",
4283
+ "trunk",
4284
+ "hsl(43, 93%, 88%)",
4285
+ "primary",
4286
+ "hsl(43, 93%, 88%)",
4287
+ "secondary",
4288
+ "hsl(44, 42%, 94%)",
4289
+ "tertiary",
4290
+ "hsl(44, 42%, 94%)",
4291
+ "minor",
4292
+ "#ffffff",
4293
+ "service",
4294
+ "#ffffff",
4295
+ "hsl(0, 0%, 100%)"
4228
4296
  ],
4229
4297
  "line-width": [
4230
4298
  "interpolate",
4231
4299
  [
4232
- "linear"
4300
+ "exponential",
4301
+ 1.1
4233
4302
  ],
4234
4303
  [
4235
4304
  "zoom"
4236
4305
  ],
4237
- 14,
4306
+ 10,
4238
4307
  [
4239
4308
  "match",
4240
4309
  [
4241
4310
  "get",
4242
- "vistext"
4311
+ "class"
4243
4312
  ],
4244
- "treinspoor",
4245
- 3,
4246
- "spoor in tunnel",
4247
- 3.5,
4248
- "overig",
4249
- 3.1,
4250
- "spoor onder ander object",
4251
- 3,
4252
- 10
4253
- ],
4254
- 16,
4255
- [
4256
- "match",
4313
+ "motorway",
4314
+ 2.5,
4315
+ "trunk",
4316
+ 2.5,
4317
+ "primary",
4318
+ 2.5,
4319
+ "secondary",
4320
+ 1.5,
4321
+ "tertiary",
4322
+ 1.5,
4323
+ "minor",
4324
+ 1,
4325
+ 0
4326
+ ],
4327
+ 13,
4328
+ [
4329
+ "match",
4330
+ [
4331
+ "get",
4332
+ "class"
4333
+ ],
4334
+ "motorway",
4335
+ 6,
4336
+ "trunk",
4337
+ 4,
4338
+ "primary",
4339
+ 4,
4340
+ "secondary",
4341
+ 4.1,
4342
+ "tertiary",
4343
+ 4.1,
4344
+ "minor",
4345
+ 2.7,
4346
+ "service",
4347
+ 1.5,
4348
+ 0
4349
+ ],
4350
+ 15,
4351
+ [
4352
+ "match",
4353
+ [
4354
+ "get",
4355
+ "class"
4356
+ ],
4357
+ "motorway",
4358
+ 10,
4359
+ "trunk",
4360
+ 9.5,
4361
+ "primary",
4362
+ 8.4,
4363
+ "secondary",
4364
+ 6.4,
4365
+ "tertiary",
4366
+ 6.4,
4367
+ "minor",
4368
+ 5.4,
4369
+ "service",
4370
+ 4,
4371
+ 0
4372
+ ],
4373
+ 20,
4374
+ [
4375
+ "match",
4376
+ [
4377
+ "get",
4378
+ "class"
4379
+ ],
4380
+ "motorway",
4381
+ 24,
4382
+ "trunk",
4383
+ 24,
4384
+ "primary",
4385
+ 22,
4386
+ "secondary",
4387
+ 20,
4388
+ "tertiary",
4389
+ 18,
4390
+ "minor",
4391
+ 17,
4392
+ "service",
4393
+ 15,
4394
+ 0
4395
+ ]
4396
+ ],
4397
+ "line-opacity": 1
4398
+ }
4399
+ },
4400
+ {
4401
+ id: "osm-road-sections-single",
4402
+ type: "line",
4403
+ source: "openmaptiles",
4404
+ "source-layer": "transportation",
4405
+ metadata: {
4406
+ group: "osm",
4407
+ "sub-group": "osm-road-sections",
4408
+ type: "context",
4409
+ "legend-name": "OSM Fietspaden en voetpaden",
4410
+ desc: "OpenStreetMap paden en tracks",
4411
+ "insert-before": "background"
4412
+ },
4413
+ filter: [
4414
+ "in",
4415
+ "class",
4416
+ "path",
4417
+ "track"
4418
+ ],
4419
+ layout: {
4420
+ visibility: "none",
4421
+ "line-cap": "round",
4422
+ "line-join": "round"
4423
+ },
4424
+ paint: {
4425
+ "line-color": [
4426
+ "match",
4427
+ [
4428
+ "get",
4429
+ "class"
4430
+ ],
4431
+ "path",
4432
+ "hsl(19, 50%, 90%)",
4433
+ "track",
4434
+ "#f3e4d3",
4435
+ "#ffffff"
4436
+ ],
4437
+ "line-width": [
4438
+ "interpolate",
4439
+ [
4440
+ "exponential",
4441
+ 1.1
4442
+ ],
4443
+ [
4444
+ "zoom"
4445
+ ],
4446
+ 10,
4447
+ 0,
4448
+ 13,
4449
+ 1.5,
4450
+ 15,
4451
+ 3.5,
4452
+ 20,
4453
+ 10
4454
+ ],
4455
+ "line-opacity": 1
4456
+ }
4457
+ },
4458
+ {
4459
+ id: "osm-road-sections-casing-rel",
4460
+ type: "line",
4461
+ source: "openmaptiles",
4462
+ "source-layer": "transportation",
4463
+ metadata: {
4464
+ group: "osm",
4465
+ "sub-group": "osm-road-sections",
4466
+ type: "relevant",
4467
+ "legend-name": "OSM Wegvakken omlijning",
4468
+ desc: "OpenStreetMap wegen omlijning relevant",
4469
+ "insert-before": "background"
4470
+ },
4471
+ filter: [
4472
+ "!in",
4473
+ "class",
4474
+ "path",
4475
+ "track",
4476
+ "rail",
4477
+ "transit",
4478
+ "ferry"
4479
+ ],
4480
+ layout: {
4481
+ visibility: "none",
4482
+ "line-cap": "round",
4483
+ "line-join": "round",
4484
+ "line-sort-key": [
4485
+ "match",
4486
+ [
4487
+ "get",
4488
+ "class"
4489
+ ],
4490
+ "motorway",
4491
+ 7,
4492
+ "trunk",
4493
+ 6,
4494
+ "primary",
4495
+ 5,
4496
+ "secondary",
4497
+ 4,
4498
+ "tertiary",
4499
+ 3,
4500
+ "minor",
4501
+ 2,
4502
+ "service",
4503
+ 1,
4504
+ 0
4505
+ ]
4506
+ },
4507
+ paint: {
4508
+ "line-color": [
4509
+ "match",
4510
+ [
4511
+ "get",
4512
+ "class"
4513
+ ],
4514
+ "motorway",
4515
+ "#dd5208",
4516
+ "trunk",
4517
+ "#dd5208",
4518
+ "primary",
4519
+ "#dd5208",
4520
+ "secondary",
4521
+ "#DC7019",
4522
+ "tertiary",
4523
+ "#DB9E32",
4524
+ "minor",
4525
+ "#E3C474",
4526
+ "service",
4527
+ "hsl(192, 5%, 72%)",
4528
+ "hsl(0, 0%, 100%)"
4529
+ ],
4530
+ "line-width": [
4531
+ "interpolate",
4532
+ [
4533
+ "exponential",
4534
+ 1.1
4535
+ ],
4536
+ [
4537
+ "zoom"
4538
+ ],
4539
+ 10,
4540
+ [
4541
+ "match",
4542
+ [
4543
+ "get",
4544
+ "class"
4545
+ ],
4546
+ "motorway",
4547
+ 3.5,
4548
+ "trunk",
4549
+ 3.5,
4550
+ "primary",
4551
+ 3.5,
4552
+ "secondary",
4553
+ 2.5,
4554
+ "tertiary",
4555
+ 2.5,
4556
+ "minor",
4557
+ 0,
4558
+ "service",
4559
+ 0,
4560
+ 0
4561
+ ],
4562
+ 13,
4563
+ [
4564
+ "match",
4565
+ [
4566
+ "get",
4567
+ "class"
4568
+ ],
4569
+ "motorway",
4570
+ 7.5,
4571
+ "trunk",
4572
+ 6,
4573
+ "primary",
4574
+ 6,
4575
+ "secondary",
4576
+ 6,
4577
+ "tertiary",
4578
+ 6,
4579
+ "minor",
4580
+ 4.5,
4581
+ "service",
4582
+ 3.5,
4583
+ 0
4584
+ ],
4585
+ 15,
4586
+ [
4587
+ "match",
4588
+ [
4589
+ "get",
4590
+ "class"
4591
+ ],
4592
+ "motorway",
4593
+ 12.5,
4594
+ "trunk",
4595
+ 12,
4596
+ "primary",
4597
+ 11,
4598
+ "secondary",
4599
+ 9,
4600
+ "tertiary",
4601
+ 9,
4602
+ "minor",
4603
+ 8,
4604
+ "service",
4605
+ 5,
4606
+ 0
4607
+ ],
4608
+ 20,
4609
+ [
4610
+ "match",
4611
+ [
4612
+ "get",
4613
+ "class"
4614
+ ],
4615
+ "motorway",
4616
+ 27,
4617
+ "trunk",
4618
+ 27,
4619
+ "primary",
4620
+ 25,
4621
+ "secondary",
4622
+ 23,
4623
+ "tertiary",
4624
+ 23,
4625
+ "minor",
4626
+ 22,
4627
+ "service",
4628
+ 20,
4629
+ 0
4630
+ ]
4631
+ ],
4632
+ "line-opacity": 1
4633
+ }
4634
+ },
4635
+ {
4636
+ id: "osm-road-sections-fill-rel",
4637
+ type: "line",
4638
+ source: "openmaptiles",
4639
+ "source-layer": "transportation",
4640
+ metadata: {
4641
+ group: "osm",
4642
+ "sub-group": "osm-road-sections",
4643
+ type: "relevant",
4644
+ "legend-name": "OSM Wegvakken vulling",
4645
+ desc: "OpenStreetMap wegen vulling relevant",
4646
+ "insert-before": "background"
4647
+ },
4648
+ filter: [
4649
+ "!in",
4650
+ "class",
4651
+ "path",
4652
+ "track",
4653
+ "rail",
4654
+ "transit",
4655
+ "ferry"
4656
+ ],
4657
+ layout: {
4658
+ visibility: "none",
4659
+ "line-cap": "round",
4660
+ "line-join": "round",
4661
+ "line-sort-key": [
4662
+ "match",
4663
+ [
4664
+ "get",
4665
+ "class"
4666
+ ],
4667
+ "motorway",
4668
+ 7,
4669
+ "trunk",
4670
+ 6,
4671
+ "primary",
4672
+ 5,
4673
+ "secondary",
4674
+ 4,
4675
+ "tertiary",
4676
+ 3,
4677
+ "minor",
4678
+ 2,
4679
+ "service",
4680
+ 1,
4681
+ 0
4682
+ ]
4683
+ },
4684
+ paint: {
4685
+ "line-color": [
4686
+ "match",
4687
+ [
4688
+ "get",
4689
+ "class"
4690
+ ],
4691
+ "motorway",
4692
+ "#DB9E32",
4693
+ "trunk",
4694
+ "#DB9E32",
4695
+ "primary",
4696
+ "#DB9E32",
4697
+ "secondary",
4698
+ "#E3C474",
4699
+ "tertiary",
4700
+ "#E3C474",
4701
+ "minor",
4702
+ "#EDDBAF",
4703
+ "service",
4704
+ "#ffffff",
4705
+ "hsl(0, 0%, 100%)"
4706
+ ],
4707
+ "line-width": [
4708
+ "interpolate",
4709
+ [
4710
+ "exponential",
4711
+ 1.1
4712
+ ],
4713
+ [
4714
+ "zoom"
4715
+ ],
4716
+ 10,
4717
+ [
4718
+ "match",
4719
+ [
4720
+ "get",
4721
+ "class"
4722
+ ],
4723
+ "motorway",
4724
+ 2.5,
4725
+ "trunk",
4726
+ 2.5,
4727
+ "primary",
4728
+ 2.5,
4729
+ "secondary",
4730
+ 1.5,
4731
+ "tertiary",
4732
+ 1.5,
4733
+ "minor",
4734
+ 1,
4735
+ 0
4736
+ ],
4737
+ 13,
4738
+ [
4739
+ "match",
4740
+ [
4741
+ "get",
4742
+ "class"
4743
+ ],
4744
+ "motorway",
4745
+ 6,
4746
+ "trunk",
4747
+ 4,
4748
+ "primary",
4749
+ 4,
4750
+ "secondary",
4751
+ 4.1,
4752
+ "tertiary",
4753
+ 4.1,
4754
+ "minor",
4755
+ 2.7,
4756
+ "service",
4757
+ 1.5,
4758
+ 0
4759
+ ],
4760
+ 15,
4761
+ [
4762
+ "match",
4763
+ [
4764
+ "get",
4765
+ "class"
4766
+ ],
4767
+ "motorway",
4768
+ 10,
4769
+ "trunk",
4770
+ 9.5,
4771
+ "primary",
4772
+ 8.4,
4773
+ "secondary",
4774
+ 6.4,
4775
+ "tertiary",
4776
+ 6.4,
4777
+ "minor",
4778
+ 5.4,
4779
+ "service",
4780
+ 4,
4781
+ 0
4782
+ ],
4783
+ 20,
4784
+ [
4785
+ "match",
4786
+ [
4787
+ "get",
4788
+ "class"
4789
+ ],
4790
+ "motorway",
4791
+ 24,
4792
+ "trunk",
4793
+ 24,
4794
+ "primary",
4795
+ 22,
4796
+ "secondary",
4797
+ 20,
4798
+ "tertiary",
4799
+ 18,
4800
+ "minor",
4801
+ 17,
4802
+ "service",
4803
+ 15,
4804
+ 0
4805
+ ]
4806
+ ],
4807
+ "line-opacity": 1
4808
+ }
4809
+ },
4810
+ {
4811
+ id: "osm-road-sections-single-rel",
4812
+ type: "line",
4813
+ source: "openmaptiles",
4814
+ "source-layer": "transportation",
4815
+ metadata: {
4816
+ group: "osm",
4817
+ "sub-group": "osm-road-sections",
4818
+ type: "relevant",
4819
+ "legend-name": "OSM Fietspaden en voetpaden",
4820
+ desc: "OpenStreetMap paden en tracks relevant",
4821
+ "insert-before": "background"
4822
+ },
4823
+ filter: [
4824
+ "in",
4825
+ "class",
4826
+ "path",
4827
+ "track"
4828
+ ],
4829
+ layout: {
4830
+ visibility: "none",
4831
+ "line-cap": "round",
4832
+ "line-join": "round"
4833
+ },
4834
+ paint: {
4835
+ "line-color": [
4836
+ "match",
4837
+ [
4838
+ "get",
4839
+ "class"
4840
+ ],
4841
+ "path",
4842
+ "hsl(19, 80%, 80%)",
4843
+ "track",
4844
+ "#f3e4d3",
4845
+ "#ffffff"
4846
+ ],
4847
+ "line-width": [
4848
+ "interpolate",
4849
+ [
4850
+ "exponential",
4851
+ 1.1
4852
+ ],
4853
+ [
4854
+ "zoom"
4855
+ ],
4856
+ 10,
4857
+ 0,
4858
+ 13,
4859
+ 0.5,
4860
+ 15,
4861
+ 3.5,
4862
+ 20,
4863
+ 10
4864
+ ],
4865
+ "line-opacity": 1
4866
+ }
4867
+ },
4868
+ {
4869
+ id: "brt-railway-center-line",
4870
+ type: "line",
4871
+ source: "pdok-brt",
4872
+ "source-layer": "spoorbaandeellijn",
4873
+ minzoom: 9,
4874
+ metadata: {
4875
+ group: "context-map",
4876
+ "sub-group": "railway",
4877
+ type: "context",
4878
+ "legend-name": "Spoorlijnen",
4879
+ desc: "trein, metro, tram. beschikbaar van z9. Over de wegen heen.",
4880
+ "insert-before": "lines-overlay"
4881
+ },
4882
+ layout: {
4883
+ visibility: "visible",
4884
+ "line-cap": "round",
4885
+ "line-join": "round"
4886
+ },
4887
+ paint: {
4888
+ "line-color": [
4889
+ "match",
4890
+ [
4891
+ "get",
4892
+ "vistext"
4893
+ ],
4894
+ "treinspoor",
4895
+ "#a3a7aa",
4896
+ "spoor in tunnel",
4897
+ "#a3a7aa",
4898
+ "metro / sneltram",
4899
+ "#cbcdd9",
4900
+ "metro / sneltram in tunnel",
4901
+ "#cbcdd9",
4902
+ "tram",
4903
+ "#a3a7aa",
4904
+ "tram in tunnel",
4905
+ "#a3a7aa",
4906
+ "overig",
4907
+ "#a3a7aa",
4908
+ "spoor onder ander object",
4909
+ "#a3a7aa",
4910
+ "transparent"
4911
+ ],
4912
+ "line-width": [
4913
+ "interpolate",
4914
+ [
4915
+ "linear"
4916
+ ],
4917
+ [
4918
+ "zoom"
4919
+ ],
4920
+ 12,
4921
+ [
4922
+ "match",
4923
+ [
4924
+ "get",
4925
+ "vistext"
4926
+ ],
4927
+ "treinspoor",
4928
+ 0.8,
4929
+ "spoor in tunnel",
4930
+ 0.5,
4931
+ "metro / sneltram",
4932
+ 0.1,
4933
+ "metro / sneltram in tunnel",
4934
+ 0.1,
4935
+ "tram",
4936
+ 0.1,
4937
+ "tram in tunnel",
4938
+ 0.1,
4939
+ "overig",
4940
+ 0.1,
4941
+ "spoor onder ander object",
4942
+ 1,
4943
+ 10
4944
+ ],
4945
+ 16,
4946
+ [
4947
+ "match",
4948
+ [
4949
+ "get",
4950
+ "vistext"
4951
+ ],
4952
+ "treinspoor",
4953
+ 1.5,
4954
+ "spoor in tunnel",
4955
+ 1.5,
4956
+ "metro / sneltram",
4957
+ 3,
4958
+ "metro / sneltram in tunnel",
4959
+ 3,
4960
+ "tram",
4961
+ 1,
4962
+ "tram in tunnel",
4963
+ 1,
4964
+ "overig",
4965
+ 0.5,
4966
+ "spoor onder ander object",
4967
+ 1.5,
4968
+ 10
4969
+ ]
4970
+ ],
4971
+ "line-opacity": [
4972
+ "match",
4973
+ [
4974
+ "get",
4975
+ "vistext"
4976
+ ],
4977
+ "spoor onder ander object",
4978
+ 0.5,
4979
+ "spoor in tunnel",
4980
+ 0.5,
4981
+ "metro / sneltram in tunnel",
4982
+ 0.5,
4983
+ "tram in tunnel",
4984
+ 0.5,
4985
+ 1
4986
+ ]
4987
+ }
4988
+ },
4989
+ {
4990
+ id: "brt-railway-center-dash",
4991
+ type: "line",
4992
+ source: "pdok-brt",
4993
+ "source-layer": "spoorbaandeellijn",
4994
+ minzoom: 14,
4995
+ metadata: {
4996
+ group: "context-map",
4997
+ "sub-group": "railway",
4998
+ type: "context",
4999
+ "legend-name": "Spoorlijnen dash voor trein",
5000
+ desc: "trein. beschikbaar van z14. Over de wegen heen.",
5001
+ "insert-before": "lines-overlay"
5002
+ },
5003
+ filter: [
5004
+ "any",
5005
+ [
5006
+ "==",
5007
+ [
5008
+ "get",
5009
+ "vistext"
5010
+ ],
5011
+ "treinspoor"
5012
+ ],
5013
+ [
5014
+ "==",
5015
+ [
5016
+ "get",
5017
+ "vistext"
5018
+ ],
5019
+ "overig"
5020
+ ],
5021
+ [
5022
+ "==",
5023
+ [
5024
+ "get",
5025
+ "vistext"
5026
+ ],
5027
+ "spoor in tunnel"
5028
+ ]
5029
+ ],
5030
+ layout: {
5031
+ visibility: "visible",
5032
+ "line-cap": "butt",
5033
+ "line-join": "round"
5034
+ },
5035
+ paint: {
5036
+ "line-dasharray": [
5037
+ 0.1,
5038
+ 5
5039
+ ],
5040
+ "line-color": [
5041
+ "match",
5042
+ [
5043
+ "get",
5044
+ "vistext"
5045
+ ],
5046
+ "treinspoor",
5047
+ "#a3a7aa",
5048
+ "spoor in tunnel",
5049
+ "#a3a7aa",
5050
+ "overig",
5051
+ "#a3a7aa",
5052
+ "spoor onder ander object",
5053
+ "#a3a7aa",
5054
+ "transparent"
5055
+ ],
5056
+ "line-width": [
5057
+ "interpolate",
5058
+ [
5059
+ "linear"
5060
+ ],
5061
+ [
5062
+ "zoom"
5063
+ ],
5064
+ 14,
5065
+ [
5066
+ "match",
5067
+ [
5068
+ "get",
5069
+ "vistext"
5070
+ ],
5071
+ "treinspoor",
5072
+ 3,
5073
+ "spoor in tunnel",
5074
+ 3.5,
5075
+ "overig",
5076
+ 3.1,
5077
+ "spoor onder ander object",
5078
+ 3,
5079
+ 10
5080
+ ],
5081
+ 16,
5082
+ [
5083
+ "match",
4257
5084
  [
4258
5085
  "get",
4259
5086
  "vistext"
@@ -5133,6 +5960,208 @@ var layers = [
5133
5960
  "text-halo-width": 1.5
5134
5961
  }
5135
5962
  },
5963
+ {
5964
+ id: "osm-road-names",
5965
+ type: "symbol",
5966
+ source: "openmaptiles",
5967
+ "source-layer": "transportation_name",
5968
+ metadata: {
5969
+ group: "osm",
5970
+ "sub-group": "osm-road-names",
5971
+ type: "context",
5972
+ "legend-name": "OSM Weg namen",
5973
+ desc: "OpenStreetMap straatnamen",
5974
+ "insert-before": "label"
5975
+ },
5976
+ minzoom: 12,
5977
+ filter: [
5978
+ "all",
5979
+ [
5980
+ "!in",
5981
+ "class",
5982
+ "path",
5983
+ "track",
5984
+ "motorway",
5985
+ "trunk",
5986
+ "primary"
5987
+ ]
5988
+ ],
5989
+ layout: {
5990
+ visibility: "none",
5991
+ "symbol-sort-key": [
5992
+ "match",
5993
+ [
5994
+ "get",
5995
+ "class"
5996
+ ],
5997
+ "secondary",
5998
+ 5,
5999
+ "tertiary",
6000
+ 4,
6001
+ "minor",
6002
+ 3,
6003
+ "service",
6004
+ 2,
6005
+ 0
6006
+ ],
6007
+ "symbol-placement": "line",
6008
+ "text-field": "{name}",
6009
+ "text-max-angle": 50,
6010
+ "text-padding": 30,
6011
+ "text-font": [
6012
+ "case",
6013
+ [
6014
+ "==",
6015
+ [
6016
+ "get",
6017
+ "class"
6018
+ ],
6019
+ "secondary"
6020
+ ],
6021
+ [
6022
+ "literal",
6023
+ [
6024
+ "Noto Sans Bold"
6025
+ ]
6026
+ ],
6027
+ [
6028
+ "literal",
6029
+ [
6030
+ "Noto Sans Regular"
6031
+ ]
6032
+ ]
6033
+ ],
6034
+ "text-size": [
6035
+ "match",
6036
+ [
6037
+ "get",
6038
+ "class"
6039
+ ],
6040
+ "secondary",
6041
+ 14,
6042
+ "tertiary",
6043
+ 12,
6044
+ "minor",
6045
+ 11,
6046
+ "service",
6047
+ 11,
6048
+ 0
6049
+ ],
6050
+ "text-rotation-alignment": "map"
6051
+ },
6052
+ paint: {
6053
+ "text-color": "hsl(196, 13%, 29%)",
6054
+ "text-halo-color": "#f8f4f0",
6055
+ "text-halo-width": 1.5
6056
+ }
6057
+ },
6058
+ {
6059
+ id: "osm-road-names-number",
6060
+ type: "symbol",
6061
+ source: "openmaptiles",
6062
+ "source-layer": "transportation_name",
6063
+ metadata: {
6064
+ group: "osm",
6065
+ "sub-group": "osm-road-names",
6066
+ type: "context",
6067
+ "legend-name": "OSM Weg nummers",
6068
+ desc: "OpenStreetMap A en N wegnummers",
6069
+ "insert-before": "label"
6070
+ },
6071
+ minzoom: 6,
6072
+ filter: [
6073
+ "all",
6074
+ [
6075
+ "has",
6076
+ "ref"
6077
+ ],
6078
+ [
6079
+ "in",
6080
+ "class",
6081
+ "motorway",
6082
+ "trunk",
6083
+ "primary",
6084
+ "secondary"
6085
+ ]
6086
+ ],
6087
+ layout: {
6088
+ visibility: "none",
6089
+ "symbol-sort-key": [
6090
+ "match",
6091
+ [
6092
+ "get",
6093
+ "class"
6094
+ ],
6095
+ "motorway",
6096
+ 7,
6097
+ "trunk",
6098
+ 6,
6099
+ "primary",
6100
+ 5,
6101
+ "secondary",
6102
+ 4,
6103
+ 0
6104
+ ],
6105
+ "symbol-placement": "line",
6106
+ "symbol-spacing": [
6107
+ "interpolate",
6108
+ [
6109
+ "linear"
6110
+ ],
6111
+ [
6112
+ "zoom"
6113
+ ],
6114
+ 8,
6115
+ 400,
6116
+ 10,
6117
+ 250,
6118
+ 20,
6119
+ 500
6120
+ ],
6121
+ "text-field": "{ref}",
6122
+ "text-max-angle": [
6123
+ "interpolate",
6124
+ [
6125
+ "linear"
6126
+ ],
6127
+ [
6128
+ "zoom"
6129
+ ],
6130
+ 6,
6131
+ 20,
6132
+ 8,
6133
+ 5,
6134
+ 20,
6135
+ 0
6136
+ ],
6137
+ "text-padding": 8,
6138
+ "text-font": [
6139
+ "Noto Sans Bold"
6140
+ ],
6141
+ "text-size": [
6142
+ "match",
6143
+ [
6144
+ "get",
6145
+ "class"
6146
+ ],
6147
+ "motorway",
6148
+ 12,
6149
+ "trunk",
6150
+ 11,
6151
+ "primary",
6152
+ 11,
6153
+ "secondary",
6154
+ 10,
6155
+ 0
6156
+ ],
6157
+ "text-rotation-alignment": "viewport"
6158
+ },
6159
+ paint: {
6160
+ "text-color": "#f8f4f0",
6161
+ "text-halo-color": "hsl(196, 13%, 50%)",
6162
+ "text-halo-width": 30
6163
+ }
6164
+ },
5136
6165
  {
5137
6166
  id: "brt-district-names",
5138
6167
  type: "symbol",
@@ -5896,11 +6925,55 @@ var style = {
5896
6925
  layers: layers
5897
6926
  };
5898
6927
 
5899
- const NDWMapStyle = style;
6928
+ const SPRITE_HOST = 'https://design.ndw.nu/map-storybook';
6929
+ function resolveSprites(sprites) {
6930
+ const s = sprites;
6931
+ if (!Array.isArray(s))
6932
+ return s;
6933
+ if (typeof location === 'undefined')
6934
+ return s;
6935
+ const spriteBase = location.hostname === 'localhost' ? location.origin : location.origin + '/map-storybook';
6936
+ return s.map((entry) => ({
6937
+ ...entry,
6938
+ url: entry.url.includes(SPRITE_HOST) ? entry.url.replace(SPRITE_HOST, spriteBase) : entry.url,
6939
+ }));
6940
+ }
6941
+ function isNwbRoadLayer(id) {
6942
+ return id.startsWith('ndw-nwb-') || id.startsWith('nwb-');
6943
+ }
6944
+ const OSM_DEFAULT_VISIBLE = new Set([
6945
+ 'osm-road-sections-casing',
6946
+ 'osm-road-sections-fill',
6947
+ 'osm-road-sections-single',
6948
+ ]);
6949
+ function swapRoadVisibility(layers, hide, show) {
6950
+ return layers.map((layer) => {
6951
+ if (hide(layer.id) && layer.layout?.visibility !== 'none') {
6952
+ return { ...layer, layout: { ...layer.layout, visibility: 'none' } };
6953
+ }
6954
+ if (show.has(layer.id) && layer.layout?.visibility === 'none') {
6955
+ return { ...layer, layout: { ...layer.layout, visibility: 'visible' } };
6956
+ }
6957
+ return layer;
6958
+ });
6959
+ }
6960
+ const NDWMapStyle = {
6961
+ ...style,
6962
+ get sprite() {
6963
+ return resolveSprites(style.sprite);
6964
+ },
6965
+ };
6966
+ const NDWOSMMapStyle = {
6967
+ ...style,
6968
+ layers: swapRoadVisibility(style.layers, isNwbRoadLayer, OSM_DEFAULT_VISIBLE),
6969
+ get sprite() {
6970
+ return resolveSprites(style.sprite);
6971
+ },
6972
+ };
5900
6973
 
5901
6974
  /**
5902
6975
  * Generated bundle index. Do not edit.
5903
6976
  */
5904
6977
 
5905
- export { ApiBackgroundLayer, ApiElement, ApiLayer, ApiSource, BOUNDS_AMERSFOORT, BOUNDS_NL, COMMON_BOUNDS, DEFAULT_MAP_CONFIG, MapComponent, MapElement, MapElementRepository, MapLayer, MapSource, MaplibreCursorService, NDWMapStyle, lineWidthFrcSpecification };
6978
+ export { ApiBackgroundLayer, ApiElement, ApiLayer, ApiSource, BOUNDS_AMERSFOORT, BOUNDS_NL, COMMON_BOUNDS, DEFAULT_MAP_CONFIG, MapComponent, MapElement, MapElementRepository, MapLayer, MapSource, MaplibreCursorService, NDWMapStyle, NDWOSMMapStyle, lineWidthFrcSpecification };
5906
6979
  //# sourceMappingURL=ndwnu-map.mjs.map