@ndwnu/map 3.1.0 → 3.2.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.
- package/fesm2022/ndwnu-map.mjs +263 -8
- package/fesm2022/ndwnu-map.mjs.map +1 -1
- package/package.json +4 -3
- package/src/lib/style/style.json +174 -5
package/fesm2022/ndwnu-map.mjs
CHANGED
|
@@ -386,7 +386,8 @@ const COMMON_BOUNDS = {
|
|
|
386
386
|
|
|
387
387
|
class MapComponent {
|
|
388
388
|
mapContainer = viewChild.required('mapContainer');
|
|
389
|
-
config = input({},
|
|
389
|
+
config = input({}, /* @ts-ignore */
|
|
390
|
+
...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
390
391
|
map;
|
|
391
392
|
ngAfterViewInit() {
|
|
392
393
|
this.map = this.#createMap(this.mapContainer().nativeElement);
|
|
@@ -432,10 +433,10 @@ class MapComponent {
|
|
|
432
433
|
this.onLoadMap();
|
|
433
434
|
this.resizeMap();
|
|
434
435
|
}
|
|
435
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
436
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "
|
|
436
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
437
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.0.5", type: MapComponent, isStandalone: true, selector: "ng-component", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "mapContainer", first: true, predicate: ["mapContainer"], descendants: true, isSignal: true }], ngImport: i0, template: '<div #mapContainer class="map"></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
437
438
|
}
|
|
438
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
439
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MapComponent, decorators: [{
|
|
439
440
|
type: Component,
|
|
440
441
|
args: [{
|
|
441
442
|
standalone: true,
|
|
@@ -795,10 +796,10 @@ class MaplibreCursorService {
|
|
|
795
796
|
}
|
|
796
797
|
}
|
|
797
798
|
}
|
|
798
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
799
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
799
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MaplibreCursorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
800
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MaplibreCursorService, providedIn: 'root' });
|
|
800
801
|
}
|
|
801
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: MaplibreCursorService, decorators: [{
|
|
802
803
|
type: Injectable,
|
|
803
804
|
args: [{
|
|
804
805
|
providedIn: 'root',
|
|
@@ -897,6 +898,15 @@ var sources = {
|
|
|
897
898
|
type: "vector",
|
|
898
899
|
url: "https://maps.ndw.nu/api/v1/wkdParkingAreas/latest/mbtiles/segments/"
|
|
899
900
|
},
|
|
901
|
+
"ndw-wkd-rvm": {
|
|
902
|
+
type: "vector",
|
|
903
|
+
tiles: [
|
|
904
|
+
"https://maps.ndw.nu/api/v1/wkdRvm/latest/mbtiles/segments/tiles/{z}/{x}/{y}.pbf"
|
|
905
|
+
],
|
|
906
|
+
minzoom: 4,
|
|
907
|
+
maxzoom: 19,
|
|
908
|
+
attribution: "<a target='_blank' rel='noopener noreferrer' href='https://maps.ndw.nu/'>NDW</a>"
|
|
909
|
+
},
|
|
900
910
|
openmaptiles: {
|
|
901
911
|
type: "vector",
|
|
902
912
|
url: "https://maps.ndw.nu/api/v1/osm/latest/mbtiles/osm/",
|
|
@@ -1761,6 +1771,126 @@ var layers = [
|
|
|
1761
1771
|
"fill-outline-color": "#dedede"
|
|
1762
1772
|
}
|
|
1763
1773
|
},
|
|
1774
|
+
{
|
|
1775
|
+
id: "ndw-rvm-road-sections-behind-casing",
|
|
1776
|
+
type: "line",
|
|
1777
|
+
source: "ndw-wkd-rvm",
|
|
1778
|
+
"source-layer": "segments",
|
|
1779
|
+
metadata: {
|
|
1780
|
+
group: "context-roads",
|
|
1781
|
+
"sub-group": "ndw-rvm-road-sections",
|
|
1782
|
+
type: "context",
|
|
1783
|
+
"legend-name": "RVM-overig omlijning (achter NWB)",
|
|
1784
|
+
desc: "Wegen toegankelijk voor auto's",
|
|
1785
|
+
"insert-before": "background"
|
|
1786
|
+
},
|
|
1787
|
+
filter: [
|
|
1788
|
+
"all",
|
|
1789
|
+
[
|
|
1790
|
+
"==",
|
|
1791
|
+
[
|
|
1792
|
+
"get",
|
|
1793
|
+
"rvmType"
|
|
1794
|
+
],
|
|
1795
|
+
"RVM-overig"
|
|
1796
|
+
],
|
|
1797
|
+
[
|
|
1798
|
+
"!=",
|
|
1799
|
+
[
|
|
1800
|
+
"get",
|
|
1801
|
+
"functionalRoadClass"
|
|
1802
|
+
],
|
|
1803
|
+
"5"
|
|
1804
|
+
]
|
|
1805
|
+
],
|
|
1806
|
+
layout: {
|
|
1807
|
+
visibility: "visible",
|
|
1808
|
+
"line-cap": "butt",
|
|
1809
|
+
"line-join": "round"
|
|
1810
|
+
},
|
|
1811
|
+
paint: {
|
|
1812
|
+
"line-color": "#E2C16C",
|
|
1813
|
+
"line-width": [
|
|
1814
|
+
"interpolate",
|
|
1815
|
+
[
|
|
1816
|
+
"exponential",
|
|
1817
|
+
1.1
|
|
1818
|
+
],
|
|
1819
|
+
[
|
|
1820
|
+
"zoom"
|
|
1821
|
+
],
|
|
1822
|
+
10,
|
|
1823
|
+
0,
|
|
1824
|
+
13,
|
|
1825
|
+
4.5,
|
|
1826
|
+
15,
|
|
1827
|
+
8,
|
|
1828
|
+
20,
|
|
1829
|
+
22
|
|
1830
|
+
],
|
|
1831
|
+
"line-opacity": 1
|
|
1832
|
+
}
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
id: "ndw-rvm-road-sections-behind-fill",
|
|
1836
|
+
type: "line",
|
|
1837
|
+
source: "ndw-wkd-rvm",
|
|
1838
|
+
"source-layer": "segments",
|
|
1839
|
+
metadata: {
|
|
1840
|
+
group: "context-roads",
|
|
1841
|
+
"sub-group": "ndw-rvm-road-sections",
|
|
1842
|
+
type: "context",
|
|
1843
|
+
"legend-name": "RVM-overig vulling (achter NWB)",
|
|
1844
|
+
desc: "Wegen toegankelijk voor auto's",
|
|
1845
|
+
"insert-before": "background"
|
|
1846
|
+
},
|
|
1847
|
+
filter: [
|
|
1848
|
+
"all",
|
|
1849
|
+
[
|
|
1850
|
+
"==",
|
|
1851
|
+
[
|
|
1852
|
+
"get",
|
|
1853
|
+
"rvmType"
|
|
1854
|
+
],
|
|
1855
|
+
"RVM-overig"
|
|
1856
|
+
],
|
|
1857
|
+
[
|
|
1858
|
+
"!=",
|
|
1859
|
+
[
|
|
1860
|
+
"get",
|
|
1861
|
+
"functionalRoadClass"
|
|
1862
|
+
],
|
|
1863
|
+
"5"
|
|
1864
|
+
]
|
|
1865
|
+
],
|
|
1866
|
+
layout: {
|
|
1867
|
+
visibility: "visible",
|
|
1868
|
+
"line-cap": "butt",
|
|
1869
|
+
"line-join": "round"
|
|
1870
|
+
},
|
|
1871
|
+
paint: {
|
|
1872
|
+
"line-color": "hsl(44, 42%, 94%)",
|
|
1873
|
+
"line-width": [
|
|
1874
|
+
"interpolate",
|
|
1875
|
+
[
|
|
1876
|
+
"exponential",
|
|
1877
|
+
1.1
|
|
1878
|
+
],
|
|
1879
|
+
[
|
|
1880
|
+
"zoom"
|
|
1881
|
+
],
|
|
1882
|
+
10,
|
|
1883
|
+
1,
|
|
1884
|
+
13,
|
|
1885
|
+
2.7,
|
|
1886
|
+
15,
|
|
1887
|
+
5.4,
|
|
1888
|
+
20,
|
|
1889
|
+
17
|
|
1890
|
+
],
|
|
1891
|
+
"line-opacity": 1
|
|
1892
|
+
}
|
|
1893
|
+
},
|
|
1764
1894
|
{
|
|
1765
1895
|
id: "ndw-nwb-road-sections-bus",
|
|
1766
1896
|
type: "line",
|
|
@@ -2458,6 +2588,126 @@ var layers = [
|
|
|
2458
2588
|
"line-opacity": 1
|
|
2459
2589
|
}
|
|
2460
2590
|
},
|
|
2591
|
+
{
|
|
2592
|
+
id: "ndw-rvm-road-sections-casing",
|
|
2593
|
+
type: "line",
|
|
2594
|
+
source: "ndw-wkd-rvm",
|
|
2595
|
+
"source-layer": "segments",
|
|
2596
|
+
metadata: {
|
|
2597
|
+
group: "context-roads",
|
|
2598
|
+
"sub-group": "ndw-rvm-road-sections",
|
|
2599
|
+
type: "context",
|
|
2600
|
+
"legend-name": "RVM: Wegvakken omlijning",
|
|
2601
|
+
desc: "Wegen toegankelijk voor auto's",
|
|
2602
|
+
"insert-before": "background"
|
|
2603
|
+
},
|
|
2604
|
+
filter: [
|
|
2605
|
+
"all",
|
|
2606
|
+
[
|
|
2607
|
+
"==",
|
|
2608
|
+
[
|
|
2609
|
+
"get",
|
|
2610
|
+
"rvmType"
|
|
2611
|
+
],
|
|
2612
|
+
"RVM-overig"
|
|
2613
|
+
],
|
|
2614
|
+
[
|
|
2615
|
+
"==",
|
|
2616
|
+
[
|
|
2617
|
+
"get",
|
|
2618
|
+
"functionalRoadClass"
|
|
2619
|
+
],
|
|
2620
|
+
"5"
|
|
2621
|
+
]
|
|
2622
|
+
],
|
|
2623
|
+
layout: {
|
|
2624
|
+
visibility: "visible",
|
|
2625
|
+
"line-cap": "butt",
|
|
2626
|
+
"line-join": "round"
|
|
2627
|
+
},
|
|
2628
|
+
paint: {
|
|
2629
|
+
"line-color": "#E2C16C",
|
|
2630
|
+
"line-width": [
|
|
2631
|
+
"interpolate",
|
|
2632
|
+
[
|
|
2633
|
+
"exponential",
|
|
2634
|
+
1.1
|
|
2635
|
+
],
|
|
2636
|
+
[
|
|
2637
|
+
"zoom"
|
|
2638
|
+
],
|
|
2639
|
+
10,
|
|
2640
|
+
0,
|
|
2641
|
+
13,
|
|
2642
|
+
4.5,
|
|
2643
|
+
15,
|
|
2644
|
+
8,
|
|
2645
|
+
20,
|
|
2646
|
+
22
|
|
2647
|
+
],
|
|
2648
|
+
"line-opacity": 1
|
|
2649
|
+
}
|
|
2650
|
+
},
|
|
2651
|
+
{
|
|
2652
|
+
id: "ndw-rvm-road-sections-fill",
|
|
2653
|
+
type: "line",
|
|
2654
|
+
source: "ndw-wkd-rvm",
|
|
2655
|
+
"source-layer": "segments",
|
|
2656
|
+
metadata: {
|
|
2657
|
+
group: "context-roads",
|
|
2658
|
+
"sub-group": "ndw-rvm-road-sections",
|
|
2659
|
+
type: "context",
|
|
2660
|
+
"legend-name": "RVM: Wegvakken vulling",
|
|
2661
|
+
desc: "Wegen toegankelijk voor auto's",
|
|
2662
|
+
"insert-before": "background"
|
|
2663
|
+
},
|
|
2664
|
+
filter: [
|
|
2665
|
+
"all",
|
|
2666
|
+
[
|
|
2667
|
+
"==",
|
|
2668
|
+
[
|
|
2669
|
+
"get",
|
|
2670
|
+
"rvmType"
|
|
2671
|
+
],
|
|
2672
|
+
"RVM-overig"
|
|
2673
|
+
],
|
|
2674
|
+
[
|
|
2675
|
+
"==",
|
|
2676
|
+
[
|
|
2677
|
+
"get",
|
|
2678
|
+
"functionalRoadClass"
|
|
2679
|
+
],
|
|
2680
|
+
"5"
|
|
2681
|
+
]
|
|
2682
|
+
],
|
|
2683
|
+
layout: {
|
|
2684
|
+
visibility: "visible",
|
|
2685
|
+
"line-cap": "butt",
|
|
2686
|
+
"line-join": "round"
|
|
2687
|
+
},
|
|
2688
|
+
paint: {
|
|
2689
|
+
"line-color": "hsl(44, 42%, 94%)",
|
|
2690
|
+
"line-width": [
|
|
2691
|
+
"interpolate",
|
|
2692
|
+
[
|
|
2693
|
+
"exponential",
|
|
2694
|
+
1.1
|
|
2695
|
+
],
|
|
2696
|
+
[
|
|
2697
|
+
"zoom"
|
|
2698
|
+
],
|
|
2699
|
+
10,
|
|
2700
|
+
1,
|
|
2701
|
+
13,
|
|
2702
|
+
2.7,
|
|
2703
|
+
15,
|
|
2704
|
+
5.4,
|
|
2705
|
+
20,
|
|
2706
|
+
17
|
|
2707
|
+
],
|
|
2708
|
+
"line-opacity": 1
|
|
2709
|
+
}
|
|
2710
|
+
},
|
|
2461
2711
|
{
|
|
2462
2712
|
id: "ndw-nwb-road-sections-casing-rel",
|
|
2463
2713
|
type: "line",
|
|
@@ -7028,6 +7278,11 @@ var style = {
|
|
|
7028
7278
|
function isNwbRoadLayer(id) {
|
|
7029
7279
|
return id.startsWith('ndw-nwb-') || id.startsWith('nwb-');
|
|
7030
7280
|
}
|
|
7281
|
+
// RVM roads are drawn on the NWB road network, so they are hidden together with
|
|
7282
|
+
// the NWB roads in the OSM style (visible by default in the NWB style).
|
|
7283
|
+
function isRvmRoadLayer(id) {
|
|
7284
|
+
return id.startsWith('ndw-rvm-');
|
|
7285
|
+
}
|
|
7031
7286
|
const OSM_DEFAULT_VISIBLE = new Set([
|
|
7032
7287
|
'osm-road-sections-casing',
|
|
7033
7288
|
'osm-road-sections-fill',
|
|
@@ -7110,7 +7365,7 @@ const NDWMapStyle = {
|
|
|
7110
7365
|
*/
|
|
7111
7366
|
const NDWOSMMapStyle = {
|
|
7112
7367
|
...style,
|
|
7113
|
-
layers: swapRoadVisibility(style.layers, isNwbRoadLayer, OSM_DEFAULT_VISIBLE),
|
|
7368
|
+
layers: swapRoadVisibility(style.layers, (id) => isNwbRoadLayer(id) || isRvmRoadLayer(id), OSM_DEFAULT_VISIBLE),
|
|
7114
7369
|
};
|
|
7115
7370
|
|
|
7116
7371
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ndwnu-map.mjs","sources":["../../../../libs/map/src/lib/base/map-layer.ts","../../../../libs/map/src/lib/api/api-layer.ts","../../../../libs/map/src/lib/api/api-background-layer.ts","../../../../libs/map/src/lib/base/map-element.ts","../../../../libs/map/src/lib/base/map-source.ts","../../../../libs/map/src/lib/api/api-source.ts","../../../../libs/map/src/lib/api/api-element.ts","../../../../libs/map/src/lib/component/map-config.interface.ts","../../../../libs/map/src/lib/component/map.component.ts","../../../../libs/map/src/lib/misc/map-constants.ts","../../../../libs/map/src/lib/misc/map-element.repository.ts","../../../../libs/map/src/lib/misc/maplibre-cursor.service.ts","../../../../libs/map/src/lib/style/style.ts","../../../../libs/map/src/ndwnu-map.ts"],"sourcesContent":["import { Feature } from 'geojson';\nimport { MapElementConfig } from './../base/map-element.config';\nimport {\n FilterSpecification,\n LayerSpecification,\n MapGeoJSONFeature,\n MapMouseEvent,\n} from 'maplibre-gl';\nimport { Subject } from 'rxjs';\n\nexport abstract class MapLayer<TElementType, TFilter = unknown, TLegendItem = unknown> {\n initialized = false;\n\n protected unsubscribe = new Subject<void>();\n\n constructor(\n protected readonly config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n protected readonly sourceId: string,\n protected readonly layerIdSuffix?: string,\n ) {}\n\n get id(): string {\n const suffix = this.layerIdSuffix ? `-${this.layerIdSuffix}` : '';\n return `${this.sourceId}${suffix}`;\n }\n\n get styleLayer() {\n return this.config.map.getLayer(this.id);\n }\n\n onInit() {\n // Add the layer to the map, with the correct ordering (beforeId)\n const beforeId = this.config.mapElementRepository.getBeforeId(this.config.elementId);\n this.config.map.addLayer(this.getSpecification() as LayerSpecification, beforeId);\n\n // Keeping track of which layers have been added to the map to allow for beforeId determination\n this.#setupClickHandlers();\n this.initialized = true;\n }\n\n onDestroy() {\n this.initialized = false;\n this.#removeClickHandlers();\n\n this.config.map.removeLayer(this.id);\n\n this.unsubscribe.next();\n this.unsubscribe.complete();\n }\n\n setVisible(visible: boolean) {\n this.config.map.setLayoutProperty(this.id, 'visibility', visible ? 'visible' : 'none');\n }\n\n protected onClick?(event: ClickEvent): void;\n\n protected abstract getSpecification(): Partial<LayerSpecification>;\n getFilterSpecification?(filter?: TFilter): FilterSpecification;\n\n getFeatures(event: ClickEvent): Feature[] {\n if (event.features && event.features.length > 0) {\n return this.#distinctFeatures(event.features);\n }\n return [];\n }\n\n #setupClickHandlers() {\n if (!this.onClick) return;\n\n const mapElement = this.config.mapElementRepository.getMapElementById(this.config.elementId);\n if (!mapElement?.isInteractive) {\n return;\n }\n\n this.config.map.on('click', this.id, (event) => {\n this.onClick?.(event);\n });\n\n this.config.maplibreCursorService.setMouseCursor(this.config.map, this.id);\n }\n\n #removeClickHandlers() {\n if (!this.onClick) return;\n\n this.config.map.off('click', this.id, (event) => {\n this.onClick?.(event);\n });\n }\n\n /**\n * Filters an array of features to remove duplicates based on their properties.\n * Two features are considered duplicates if they have identical properties.\n * Particularly vector sources can yield duplicate features due to the way they\n * are rendered in tiles.\n *\n * @param features - Array of GeoJSON features to filter\n * @returns Array of unique features with no property duplicates\n * @private\n */\n #distinctFeatures(features: Feature[]): Feature[] {\n const seen = new Set();\n const uniqueFeatures: Feature[] = [];\n\n features.forEach((feature) => {\n const propertiesString = JSON.stringify(feature.properties);\n if (!seen.has(propertiesString)) {\n seen.add(propertiesString);\n uniqueFeatures.push(feature);\n }\n });\n\n return uniqueFeatures;\n }\n}\n\nexport type ClickEvent = MapMouseEvent & {\n features?: MapGeoJSONFeature[];\n} & object;\n","import { MapElementConfig } from './../base/map-element.config';\nimport { MapLayer } from './../base/map-layer';\nimport { LayerSpecification } from 'maplibre-gl';\n\nexport class ApiLayer<TElementType, TFilter = unknown, TLegendItem = unknown> extends MapLayer<\n TElementType,\n TFilter,\n TLegendItem\n> {\n constructor(\n config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n private readonly _layerSpecification: LayerSpecification,\n ) {\n const sourceId = 'source' in _layerSpecification ? _layerSpecification.source : '';\n\n super(config, sourceId);\n\n // Ensure that layout visibility is set after the base constructor has been called\n this._layerSpecification.layout = {\n ...this._layerSpecification.layout,\n visibility: 'none',\n };\n }\n\n public override get id(): string {\n return this._layerSpecification.id;\n }\n\n protected getSpecification(): Partial<LayerSpecification> {\n return this._layerSpecification;\n }\n}\n","import { BackgroundLayerSpecification } from 'maplibre-gl';\n\nimport { ApiLayer } from './api-layer';\nimport { MapElementConfig } from './../base/map-element.config';\n\nexport class ApiBackgroundLayer<\n TElementType,\n TFilter = unknown,\n TLegendItem = unknown,\n> extends ApiLayer<TElementType, TFilter, TLegendItem> {\n constructor(\n config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n layerSpecification: BackgroundLayerSpecification,\n ) {\n super(config, layerSpecification);\n }\n}\n","import { MapElementConfig } from './../base/map-element.config';\nimport { MapSource } from './../base/map-source';\nimport { Subject } from 'rxjs';\n\nexport abstract class MapElement<TElementType, TFilter = unknown, TLegendItem = unknown> {\n id: TElementType;\n elementOrder: number;\n sources: MapSource<TElementType, TFilter, TLegendItem>[] = [];\n alwaysVisible = false;\n isVisible = false;\n isInteractive = true;\n\n protected unsubscribe = new Subject<void>();\n\n constructor(protected readonly config: MapElementConfig<TElementType, TFilter, TLegendItem>) {\n this.id = config.elementId;\n this.elementOrder = config.elementOrder;\n if (config.isInteractive !== undefined) {\n this.isInteractive = config.isInteractive;\n }\n }\n\n get legendItems(): TLegendItem[] {\n return [];\n }\n\n onInit() {\n this.sources.forEach((source) => source.onInit());\n }\n\n onDestroy() {\n this.sources.forEach((source) => source.onDestroy());\n\n this.unsubscribe.next();\n this.unsubscribe.complete();\n }\n\n setVisible(visible: boolean) {\n this.isVisible = visible;\n this.sources.forEach((source) => source.setVisible(visible));\n }\n\n reload() {\n this.sources.forEach((source) => source.reload());\n }\n}\n","import { FeatureCollection } from 'geojson';\nimport { MapElementConfig } from './../base/map-element.config';\nimport { MapLayer } from './../base/map-layer';\nimport { FilterSpecification, GeoJSONSource, SourceSpecification } from 'maplibre-gl';\nimport { Observable, Subject, Subscription, takeUntil } from 'rxjs';\n\nexport abstract class MapSource<TElementType, TFilter = unknown, TLegendItem = unknown> {\n layers: MapLayer<TElementType, TFilter, TLegendItem>[] = [];\n\n protected unsubscribe = new Subject<void>();\n protected activeFilter: TFilter | undefined;\n\n #isInitialized = false;\n #filter$?: Observable<TFilter>;\n #filterSubscription?: Subscription;\n #featureCollection$?: Observable<FeatureCollection>;\n\n constructor(\n public readonly id: string,\n protected readonly config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n ) {}\n\n onInit() {\n if (!this.config.map.getSource(this.id)) {\n this.config.map.addSource(this.id, this.getSpecification() as SourceSpecification);\n }\n\n this.layers.forEach((layer) => layer.onInit());\n\n this.isInitialized = true;\n }\n\n onDestroy() {\n this.isInitialized = false;\n\n this.layers.forEach((layer) => layer.onDestroy());\n\n this.unsubscribe.next();\n this.unsubscribe.complete();\n }\n\n get featureCollection$(): Observable<FeatureCollection> | undefined {\n return this.#featureCollection$;\n }\n\n set featureCollection$(value: Observable<FeatureCollection> | undefined) {\n this.#featureCollection$ = value;\n this.#subscribeToFeatureCollection();\n }\n\n get isInitialized(): boolean {\n return this.#isInitialized;\n }\n\n set isInitialized(value: boolean) {\n this.#isInitialized = value;\n this.#subscribeToFeatureCollection();\n this.#subscribeToFilters();\n }\n\n get filter$(): Observable<TFilter> | undefined {\n return this.#filter$;\n }\n\n set filter$(value: Observable<TFilter> | undefined) {\n this.#filter$ = value;\n this.#subscribeToFilters();\n }\n\n setVisible(visible: boolean) {\n this.layers.forEach((layer) => layer.setVisible(visible));\n }\n\n reload() {\n this.config.map.refreshTiles(this.id);\n }\n\n protected abstract getSpecification(): Partial<SourceSpecification>;\n protected getFilterSpecification?(filter: TFilter | undefined): FilterSpecification;\n\n protected applyFilterToLayers(filterValue: TFilter | undefined) {\n const hasSourceFilter = !!this.getFilterSpecification;\n const hasLayerFilter = this.layers.some((layer) => !!layer.getFilterSpecification);\n\n if (!hasSourceFilter && !hasLayerFilter) {\n return;\n }\n\n this.activeFilter = filterValue;\n\n const sourceFilter = this.getFilterSpecification?.(filterValue);\n this.layers.forEach((layer) => {\n const layerFilter = layer.getFilterSpecification?.(filterValue);\n const combinedFilter = (\n sourceFilter && layerFilter\n ? ['all', sourceFilter, layerFilter]\n : sourceFilter || layerFilter\n ) as FilterSpecification;\n this.config.map.setFilter(layer.id, combinedFilter);\n });\n }\n\n #subscribeToFilters() {\n if (!this.isInitialized) return;\n\n if (this.#filterSubscription) {\n this.#filterSubscription.unsubscribe();\n }\n\n if (this.#filter$) {\n this.#filterSubscription = this.#filter$.pipe(takeUntil(this.unsubscribe)).subscribe({\n next: (filter) => {\n this.applyFilterToLayers(filter);\n },\n error: (error) => {\n console.error('Error updating filter', error);\n },\n });\n } else {\n this.applyFilterToLayers(undefined);\n }\n }\n\n #subscribeToFeatureCollection() {\n if (this.isInitialized && this.featureCollection$) {\n this.featureCollection$.pipe(takeUntil(this.unsubscribe)).subscribe({\n next: (featureCollection) => {\n const source = this.config.map.getSource(this.id);\n\n if (source?.type === 'geojson') {\n (source as GeoJSONSource).setData(featureCollection);\n } else {\n // not needed because source is always specified as geojson with empty collection\n this.config.map.addSource(this.id, {\n type: 'geojson',\n data: featureCollection,\n });\n }\n },\n error: (error) => {\n console.error('Error updating feature collection', error);\n },\n });\n }\n }\n}\n","import { LayerSpecification, SourceSpecification, StyleSpecification } from 'maplibre-gl';\n\nimport { ApiLayer } from './api-layer';\nimport { MapElementConfig } from './../base/map-element.config';\nimport { MapSource } from './../base/map-source';\n\nexport type LayerFilterFunction = (layer: LayerSpecification) => boolean;\n\nexport class ApiSource<TElementType, TFilter = unknown, TLegendItem = unknown> extends MapSource<\n TElementType,\n TFilter,\n TLegendItem\n> {\n constructor(\n id: string,\n config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n private readonly _styleSpecification: StyleSpecification,\n private readonly _layerFilter?: LayerFilterFunction,\n ) {\n super(id, config);\n }\n\n protected getSpecification(): Partial<SourceSpecification> {\n return this._styleSpecification.sources[this.id];\n }\n\n /**\n * Creates ApiLayer instances for this source without initializing them.\n */\n createLayers(layers: LayerSpecification[]) {\n this.layers = layers\n .filter((layer) => layer.type !== 'background')\n .filter((layer) => layer.source === this.id)\n .filter((layer) => !this._layerFilter || this._layerFilter(layer))\n .map((layer) => new ApiLayer(this.config, layer));\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { LayerSpecification, StyleSpecification } from 'maplibre-gl';\nimport { filter, takeUntil } from 'rxjs';\n\nimport { ApiBackgroundLayer } from './api-background-layer';\nimport { MapElement } from './../base/map-element';\nimport { MapElementConfig } from './../base/map-element.config';\nimport { ApiSource, LayerFilterFunction } from './../api/api-source';\n\nexport class ApiElement<TElementType, TFilter = unknown, TLegendItem = unknown> extends MapElement<\n TElementType,\n TFilter,\n TLegendItem\n> {\n backgroundLayers: ApiBackgroundLayer<TElementType, TFilter, TLegendItem>[] = [];\n\n #visible = false;\n\n constructor(\n config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n private readonly _http: HttpClient,\n private readonly _mapStyleUrl: string,\n private readonly _layerFilter?: LayerFilterFunction,\n ) {\n super(config);\n }\n\n override onInit() {\n super.onInit();\n\n this._http\n .get<StyleSpecification>(this._mapStyleUrl)\n .pipe(\n filter((styleSpecification) => !!styleSpecification),\n takeUntil(this.unsubscribe),\n )\n .subscribe((styleSpecification) => {\n this.#createBackgroundLayers(styleSpecification.layers);\n this.#createSources(styleSpecification);\n\n // If setVisible() was called before these layers were created,\n // re-apply the current visibility state so the new layers respect it.\n this.setVisible(this.#visible);\n });\n }\n\n override setVisible(visible: boolean) {\n this.#visible = visible;\n\n super.setVisible(visible);\n this.backgroundLayers.forEach((layer) => layer.setVisible(visible));\n }\n\n #createSources(styleSpecification: StyleSpecification) {\n const layers = styleSpecification.layers;\n\n // First, create all sources and their layer instances (without initializing them)\n this.sources = Object.entries(styleSpecification.sources).map(([id]) => {\n const source = new ApiSource<TElementType, TFilter, TLegendItem>(\n id,\n this.config,\n styleSpecification,\n this._layerFilter,\n );\n source.onInit();\n source.createLayers(layers);\n return source;\n });\n\n // Then, initialize all layers according to the style.json order\n // This ensures correct ordering regardless of which source they belong to\n this.#initializeLayersInOrder(layers);\n }\n\n #initializeLayersInOrder(layers: LayerSpecification[]) {\n // Create a map of layerId -> ApiLayer for quick lookup\n const layerMap = new Map(\n this.sources.flatMap((source) => source.layers.map((layer) => [layer.id, layer])),\n );\n\n // Initialize layers in the order they appear in style.json\n for (const layerSpec of layers) {\n const layer = layerMap.get(layerSpec.id);\n if (layer) {\n layer.onInit();\n }\n }\n }\n\n // API elements are created from the style specification and this can contain layers of type 'background'\n // These layers do not have a source and therefore don't fit in the element > source > layer hierarchy\n // That is why we create these layers from the element itself\n #createBackgroundLayers(layerSpecifications: LayerSpecification[]) {\n this.backgroundLayers = layerSpecifications\n .filter((layer) => layer.type === 'background')\n .filter((layer) => !this._layerFilter || this._layerFilter(layer))\n .map((layerSpecification) => {\n const apiLayer = new ApiBackgroundLayer(this.config, layerSpecification);\n apiLayer.onInit();\n return apiLayer;\n });\n }\n}\n","import { LngLatBoundsLike, LngLatLike } from 'maplibre-gl';\n\nexport interface MapConfig {\n /** Initial center position of the map */\n center?: LngLatLike;\n\n /** Initial zoom level */\n zoom?: number;\n\n /** Maximum zoom level */\n maxZoom?: number;\n\n /** Minimum zoom level */\n minZoom?: number;\n\n /** Initial bounds to fit the map to */\n bounds?: LngLatBoundsLike;\n\n /** Enable/disable all map interactions */\n interactive?: boolean;\n\n /** Enable/disable map rotation via drag */\n dragRotate?: boolean;\n\n /** Enable/disable double-click to zoom */\n doubleClickZoom?: boolean;\n\n /** Enable/disable scroll wheel zoom */\n scrollZoom?: boolean;\n\n /** Enable/disable shift+drag box zoom */\n boxZoom?: boolean;\n\n /** Enable/disable drag to pan */\n dragPan?: boolean;\n\n /** Enable/disable keyboard navigation */\n keyboard?: boolean;\n\n /** Enable/disable touch zoom and rotation on mobile */\n touchZoomRotate?: boolean;\n}\n\nexport const DEFAULT_MAP_CONFIG: Required<Omit<MapConfig, 'bounds'>> = {\n center: [5.387827, 52.155172],\n zoom: 8,\n maxZoom: 18,\n minZoom: 6,\n interactive: true,\n dragRotate: false,\n doubleClickZoom: true,\n scrollZoom: true,\n boxZoom: true,\n dragPan: true,\n keyboard: true,\n touchZoomRotate: true,\n};\n\n// Common bounds that users can optionally use\nexport const COMMON_BOUNDS = {\n NETHERLANDS: [\n [3.079667, 50.587611],\n [7.572028, 53.636667],\n ] as LngLatBoundsLike,\n AMERSFOORT: [\n [5.34458238242172, 52.11623605695118],\n [5.446205917577942, 52.21132028216525],\n ] as LngLatBoundsLike,\n} as const;\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n OnDestroy,\n viewChild,\n} from '@angular/core';\nimport { AnimationOptions, Map, MapOptions } from 'maplibre-gl';\nimport { MapConfig, DEFAULT_MAP_CONFIG } from './map-config.interface';\n\n@Component({\n standalone: true,\n template: '<div #mapContainer class=\"map\"></div>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport abstract class MapComponent implements AfterViewInit, OnDestroy {\n mapContainer = viewChild.required<ElementRef>('mapContainer');\n config = input<Partial<MapConfig>>({});\n map!: Map;\n\n ngAfterViewInit() {\n this.map = this.#createMap(this.mapContainer().nativeElement);\n this.map.once('load', () => this.#initiateMapLoading());\n }\n\n ngOnDestroy() {\n // Note: Using `this.map.once('remove', this.onRemoveMap())` does not work correctly because,\n // by the time the `onRemoveMap` event is triggered, it is no longer possible to interact with the map for cleanup.\n // To address this we call `onRemoveMap` explicitly before destroying the MapLibre instance. This\n // ensures that our map elements are cleaned up properly before the map is removed.\n this.onRemoveMap();\n this.map?.remove();\n }\n\n resizeMap() {\n this.map?.resize();\n }\n\n zoomToLevel(zoomLevel: number, options?: AnimationOptions) {\n this.map?.zoomTo(zoomLevel, options);\n }\n\n #createMap(container: HTMLElement): Map {\n const config = { ...DEFAULT_MAP_CONFIG, ...this.config() };\n\n const options = {\n container,\n style: {\n version: 8 as const,\n sources: {},\n layers: [],\n },\n maxZoom: config.maxZoom,\n minZoom: config.minZoom,\n interactive: config.interactive,\n doubleClickZoom: config.doubleClickZoom,\n scrollZoom: config.scrollZoom,\n boxZoom: config.boxZoom,\n dragPan: config.dragPan,\n keyboard: config.keyboard,\n touchZoomRotate: config.touchZoomRotate,\n } as MapOptions;\n\n const map = new Map(options);\n\n return map;\n }\n\n protected abstract onLoadMap(): void;\n protected abstract onRemoveMap(): void;\n protected abstract onIdle(): void;\n\n #initiateMapLoading() {\n this.onLoadMap();\n this.resizeMap();\n }\n}\n","import { LngLatLike, DataDrivenPropertyValueSpecification, LayerSpecification } from 'maplibre-gl';\n\nexport const BOUNDS_NL: [LngLatLike, LngLatLike] = [\n [3.079667, 50.587611],\n [7.572028, 53.636667],\n];\nexport const BOUNDS_AMERSFOORT: [LngLatLike, LngLatLike] = [\n [5.34458238242172, 52.11623605695118],\n [5.446205917577942, 52.21132028216525],\n];\n\nexport const lineWidthFrcSpecification = [\n 'interpolate',\n ['exponential', 1.1],\n ['zoom'],\n 10,\n [\n 'match',\n ['get', 'functionalRoadClass'],\n '0',\n 2.5,\n '1',\n 2.5,\n '2',\n 2.5,\n '3',\n 1.5,\n '4',\n 1.5,\n '5',\n 1,\n 0,\n ],\n 13,\n [\n 'match',\n ['get', 'functionalRoadClass'],\n '0',\n 7,\n '1',\n 7,\n '2',\n 5.7,\n '3',\n 4.1,\n '4',\n 4.1,\n '5',\n 2.7,\n '6',\n 1.5,\n 0,\n ],\n 15,\n [\n 'match',\n ['get', 'functionalRoadClass'],\n '0',\n 10.4,\n '1',\n 10.4,\n '2',\n 8.4,\n '3',\n 6.4,\n '4',\n 6.4,\n '5',\n 5.4,\n '6',\n 3.4,\n '7',\n 3.4,\n 3,\n ],\n 20,\n [\n 'match',\n ['get', 'functionalRoadClass'],\n '0',\n 24,\n '1',\n 24,\n '2',\n 22,\n '3',\n 20,\n '4',\n 18,\n '5',\n 16,\n '6',\n 14,\n '7',\n 10,\n 8,\n ],\n] as DataDrivenPropertyValueSpecification<number>;\n\nexport type LayerGroup =\n | 'context-map'\n | 'context-aerial'\n | 'context-roads'\n | 'context-admin'\n | 'context-labels'\n | 'relevant-roads'\n | 'relevant-admin';\n\nexport type LayerSubGroup =\n | 'administrative-division'\n | 'background-blue'\n | 'background-green'\n | 'background-grey'\n | 'background-yellow'\n | 'bgt-housenumbers'\n | 'brt-place-names'\n | 'fcd-segments'\n | 'ndw-nwb-road-sections'\n | 'nwb-hectometersigns'\n | 'nwb-oneway-signs'\n | 'nwb-road-names'\n | 'railway'\n | 'wkd-parking-areas';\n\nexport interface LayerMetadata {\n group: LayerGroup;\n 'sub-group'?: LayerSubGroup;\n}\n\nexport type NdwLayerSpecification = LayerSpecification & {\n metadata: LayerMetadata;\n};\nexport type NdwLayerFilterFunction = (layer: NdwLayerSpecification) => boolean;\n","import { MapElement } from './../base/map-element';\nimport { BehaviorSubject, map } from 'rxjs';\n\n/**\n * Repository for managing map elements.\n * Provides methods to add, remove, show, hide, and toggle map elements.\n * Also tracks element visibility state and provides observable streams for elements.\n *\n * @typeparam TElementType - The type of ID used for the map elements\n * @typeparam TFilter - The type of filter used for the map elements\n * @typeparam TLegendItem - The type of legend item used for the map elements\n */\nexport abstract class MapElementRepository<TElementType, TFilter = unknown, TLegendItem = unknown> {\n /** Subject that holds the current array of map elements */\n private readonly mapElementsSubject = new BehaviorSubject<\n MapElement<TElementType, TFilter, TLegendItem>[]\n >([]);\n\n // mapElements are not directly exposed to prevent circular reference errors when\n // they are used in a template. Because the mapElements$ observable contains MapLibre\n // GL JS map objects, which have circular references.\n\n /** Observable stream of all map elements */\n readonly mapElements$ = this.mapElementsSubject.asObservable();\n\n /** Observable stream of only visible map elements */\n readonly visibleMapElements$ = this.mapElements$.pipe(\n map((elements: MapElement<TElementType, TFilter, TLegendItem>[]) =>\n elements.filter((element) => element.isVisible),\n ),\n );\n\n /** Observable stream of legend items from all visible map elements */\n readonly legendItems$ = this.visibleMapElements$.pipe(\n map((elements) => elements.flatMap((element) => element.legendItems)),\n );\n\n /**\n * Gets the ids (TElementType) as an array of all map element\n * @returns Array of TElementType\n */\n mapElementIds$ = this.mapElements$.pipe(map((elements) => elements.map((element) => element.id)));\n\n /**\n * Gets the ids (TElementType) as an array of all visible map element\n * @returns Array of TElementType\n */\n visibleMapElementIds$ = this.visibleMapElements$.pipe(\n map((elements) => elements.map((element) => element.id)),\n );\n\n /**\n * Gets the ids (TElementType) as an array of all visible map element\n * @returns Array of TElementType\n */\n get visibleMapElementIds(): TElementType[] {\n return this.visibleMapElements.map((element) => element.id);\n }\n\n /**\n * Gets the current array of all map elements\n * @returns Array of map elements\n */\n get mapElements(): MapElement<TElementType, TFilter, TLegendItem>[] {\n return this.mapElementsSubject.getValue();\n }\n\n /**\n * Gets only the currently visible map elements\n * @returns Array of visible map elements\n */\n get visibleMapElements(): MapElement<TElementType, TFilter, TLegendItem>[] {\n return this.mapElements.filter((element) => element.isVisible);\n }\n\n /**\n * Finds a map element by its ID\n *\n * @param elementId - The ID of the element to find\n * @returns The map element if found, undefined otherwise\n */\n getMapElementById(\n elementId: TElementType,\n ): MapElement<TElementType, TFilter, TLegendItem> | undefined {\n return this.mapElements.find((element) => element.id === elementId);\n }\n\n /**\n * Checks if a map element is currently visible\n *\n * @param elementId - The ID of the element to check\n * @returns True if the element is visible, false otherwise\n */\n isMapElementVisible(elementId: TElementType): boolean {\n return this.visibleMapElements.some((element) => element.id === elementId);\n }\n\n /**\n * Adds a new map element to the repository and initializes it.\n * Sets the element's visibility based on its configuration.\n *\n * @param mapElement - The map element to add\n */\n addMapElement(mapElement: MapElement<TElementType, TFilter, TLegendItem>) {\n const currentElements = this.mapElements;\n this.mapElementsSubject.next([...currentElements, mapElement]);\n mapElement.onInit();\n if (mapElement.alwaysVisible || this.isMapElementVisible(mapElement.id)) {\n this.showMapElement(mapElement.id);\n } else {\n this.hideMapElement(mapElement.id);\n }\n }\n\n /**\n * Removes a map element from the repository and destroys it.\n *\n * @param mapElement - The map element to remove\n */\n removeMapElement(mapElement: MapElement<TElementType, TFilter, TLegendItem>) {\n const filteredElements = this.mapElements.filter((element) => element.id !== mapElement.id);\n this.mapElementsSubject.next(filteredElements);\n mapElement.onDestroy();\n }\n\n /**\n * Removes all map elements from the repository and destroys them.\n */\n removeAllMapElements() {\n this.mapElements.forEach((element) => {\n this.removeMapElement(element);\n });\n }\n\n /**\n * Sets the visibility of a map element by its ID and updates the subject with the new state.\n *\n * @param elementId - The ID of the element to update\n * @param visible - Whether the element should be visible or hidden\n */\n setMapElementVisibility(elementId: TElementType, visible: boolean) {\n const element = this.getMapElementById(elementId);\n if (element) {\n element.setVisible(visible);\n const elements = this.mapElements.filter((el) => el.id !== elementId);\n this.mapElementsSubject.next([...elements, element]);\n }\n }\n\n /**\n * Shows a map element by its ID and updates the subject with the new state.\n *\n * @param elementId - The ID of the element to show\n */\n showMapElement(elementId: TElementType) {\n this.setMapElementVisibility(elementId, true);\n }\n\n /**\n * Hides a map element by its ID and updates the subject with the new state.\n *\n * @param elementId - The ID of the element to hide\n */\n hideMapElement(elementId: TElementType) {\n this.setMapElementVisibility(elementId, false);\n }\n\n /**\n * Triggers a reload of the tiles in the sources of the map element with the given ID\n *\n * @param elementId - The ID of the element to reload\n */\n reloadMapElement(elementId: TElementType) {\n const element = this.getMapElementById(elementId);\n if (element) {\n element.reload();\n }\n }\n\n /**\n * Toggles the visibility of a map element by its ID.\n * If the element is currently visible, it will be hidden, and vice versa.\n *\n * @param elementId - The ID of the element to toggle visibility\n */\n toggleMapElement(elementId: TElementType) {\n if (this.visibleMapElements.some((element) => element.id === elementId)) {\n this.hideMapElement(elementId);\n } else {\n this.showMapElement(elementId);\n }\n }\n\n /**\n * Gets the ID of the layer that should come before the specified element's layers\n * in the map's layer stack. This is used for maintaining proper layer ordering.\n *\n * @param elementId - The ID of the element to find a \"before\" reference for\n * @returns The ID of the first layer of the next element in order, or undefined if none exists\n */\n getBeforeId(elementId: TElementType): string | undefined {\n const currentElement = this.getMapElementById(elementId);\n if (!currentElement) {\n return undefined;\n }\n\n const nextElement = this.mapElements\n .filter((item) => item.elementOrder > currentElement.elementOrder)\n .sort((a, b) => a.elementOrder - b.elementOrder)[0];\n\n const nextElementLayerIds = nextElement?.sources\n .flatMap((source) => source.layers)\n .filter((layer) => layer.initialized)\n .map((layer) => layer.id);\n\n return nextElement && nextElementLayerIds.length > 0 ? nextElementLayerIds[0] : undefined;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Map } from 'maplibre-gl';\n\n/**\n * Service for managing MapLibre map cursor interactions.\n *\n * Maplibre has no automatic cursor handling for layers, so when you add a clickHandler\n * to a layer, the user can click on it, but the cursor will not change to a pointer.\n * This service provides methods to set the cursor to pointer when hovering over a layer,\n * and to enable crosshair mode which takes precedence over all other cursor types.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MaplibreCursorService {\n /** Counter to track how many layers currently need a pointer cursor */\n #cursorPointerCount = 0;\n /** Flag indicating if crosshair mode is active */\n #crosshairMode = false;\n\n /**\n * Sets up mouse cursor handling for a map layer.\n * Changes cursor to pointer when mouse enters the layer and resets when leaving.\n *\n * @param map - The MapLibre map instance\n * @param layerId - ID of the layer to apply cursor behavior to\n */\n setMouseCursor(map: Map, layerId: string) {\n const updateCursor = (cursor: 'pointer' | '') => {\n if (!this.#crosshairMode) this.#setMouseCursor(map, cursor);\n };\n\n map.on('mouseenter', layerId, () => updateCursor('pointer'));\n map.on('mouseleave', layerId, () => updateCursor(''));\n }\n\n /**\n * Enables or disables crosshair cursor mode for the map.\n * When enabled, crosshair cursor will take precedence over all other cursor types.\n *\n * @param value - True to enable crosshair mode, false to disable\n * @param map - The MapLibre map instance to apply the cursor to\n */\n setCrosshairMode(value: boolean, map: Map) {\n this.#crosshairMode = value;\n\n let cursorType = '';\n if (value) {\n cursorType = 'crosshair';\n } else if (this.#cursorPointerCount > 0) {\n cursorType = 'pointer';\n }\n\n map.getCanvas().style.cursor = cursorType;\n }\n\n /**\n * Internal method to handle mouse cursor state changes.\n * Manages the cursor pointer reference counter to ensure cursor displays correctly\n * when hovering over multiple interactive layers.\n *\n * @param map - The MapLibre map instance\n * @param cursor - Cursor type to set ('pointer' or '' to reset)\n * @private\n */\n #setMouseCursor(map: Map, cursor: 'pointer' | '') {\n if (this.#crosshairMode) {\n // Crosshair mode takes precedence, ignore other cursor settings\n map.getCanvas().style.cursor = 'crosshair';\n return;\n }\n\n if (cursor === 'pointer') {\n this.#cursorPointerCount++;\n map.getCanvas().style.cursor = cursor;\n } else if (cursor === '') {\n this.#cursorPointerCount--;\n if (this.#cursorPointerCount < 1) {\n map.getCanvas().style.cursor = '';\n }\n }\n }\n}\n","import { StyleSpecification } from 'maplibre-gl';\nimport style from './style.json';\n\nfunction isNwbRoadLayer(id: string): boolean {\n return id.startsWith('ndw-nwb-') || id.startsWith('nwb-');\n}\n\nconst OSM_DEFAULT_VISIBLE = new Set([\n 'osm-road-sections-casing',\n 'osm-road-sections-fill',\n 'osm-road-sections-single',\n 'osm-road-names',\n 'osm-road-names-number',\n]);\n\nfunction swapRoadVisibility(\n layers: typeof style.layers,\n hide: (id: string) => boolean,\n show: Set<string>,\n) {\n return layers.map((layer) => {\n if (hide(layer.id) && layer.layout?.visibility !== 'none') {\n return { ...layer, layout: { ...layer.layout, visibility: 'none' as const } };\n }\n if (show.has(layer.id) && layer.layout?.visibility === 'none') {\n return { ...layer, layout: { ...layer.layout, visibility: 'visible' as const } };\n }\n return layer;\n });\n}\n\n/**\n * The default NDW map style, using NWB road layers as the road network.\n * This is the recommended style for all NDW applications.\n *\n * ## ⚠️ Sprites must be loaded\n *\n * This style depends on sprite sheets for all of its icons and patterns\n * (traffic signs, road symbols, SDF icons, ...). MapLibre only loads them when\n * the `sprite` definition is present on the style object you give to the map.\n *\n * Passing the whole `NDWMapStyle` object already includes the sprites, so the\n * simplest setup just works:\n *\n * ```ts\n * import { NDWMapStyle } from '@ndwnu/map';\n *\n * // sprite is part of NDWMapStyle, so icons load automatically\n * map.setStyle(NDWMapStyle);\n * ```\n *\n * If you build your own style object (merging your own sources/layers), you\n * MUST copy the sprite definition over — otherwise icons silently fail to load:\n *\n * ```ts\n * map.setStyle({\n * ...myCustomStyle,\n * sprite: NDWMapStyle.sprite, // <-- required, do not omit\n * });\n * ```\n */\nexport const NDWMapStyle = {\n ...style,\n} as unknown as StyleSpecification;\n\n/**\n * An alternative NDW map style that replaces the NWB road layers with\n * OpenStreetMap roads. Behaves like {@link NDWMapStyle} in every other respect.\n *\n * ## ⚠️ Sprites must be loaded\n *\n * Like {@link NDWMapStyle}, this style depends on sprite sheets for its icons\n * and patterns. MapLibre only loads them when the `sprite` definition is present\n * on the style object you give to the map.\n *\n * Passing the whole `NDWOSMMapStyle` object already includes the sprites:\n *\n * ```ts\n * import { NDWOSMMapStyle } from '@ndwnu/map';\n *\n * // sprite is part of NDWOSMMapStyle, so icons load automatically\n * map.setStyle(NDWOSMMapStyle);\n * ```\n *\n * If you build your own style object, you MUST copy the sprite definition over —\n * otherwise icons silently fail to load:\n *\n * ```ts\n * map.setStyle({\n * ...myCustomStyle,\n * sprite: NDWOSMMapStyle.sprite, // <-- required, do not omit\n * });\n * ```\n */\nexport const NDWOSMMapStyle = {\n ...style,\n layers: swapRoadVisibility(style.layers, isNwbRoadLayer, OSM_DEFAULT_VISIBLE),\n} as unknown as StyleSpecification;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Map"],"mappings":";;;;;MAUsB,QAAQ,CAAA;AAMP,IAAA,MAAA;AACA,IAAA,QAAA;AACA,IAAA,aAAA;IAPrB,WAAW,GAAG,KAAK;AAET,IAAA,WAAW,GAAG,IAAI,OAAO,EAAQ;AAE3C,IAAA,WAAA,CACqB,MAA4D,EAC5D,QAAgB,EAChB,aAAsB,EAAA;QAFtB,IAAA,CAAA,MAAM,GAAN,M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AAM,EAAE,UAAU,KAAK,MAAM,EAAE;AACzD,YAAA,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,MAAe,EAAE,EAAE;QAC/E;AACA,QAAA,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,UAAU,KAAK,MAAM,EAAE;AAC7D,YAAA,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,SAAkB,EAAE,EAAE;QAClF;AACA,QAAA,OAAO,KAAK;AACd,IAAA,CAAC,CAAC;AACJ;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AACI,MAAM,WAAW,GAAG;AACzB,IAAA,GAAG,KAAK;;AAGV;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACI,MAAM,cAAc,GAAG;AAC5B,IAAA,GAAG,KAAK;IACR,MAAM,EAAE,kBAAkB,CAAC,KAAK,CAAC,MAAM,EAAE,cAAc,EAAE,mBAAmB,CAAC;;;AChG/E;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ndwnu-map.mjs","sources":["../../../../libs/map/src/lib/base/map-layer.ts","../../../../libs/map/src/lib/api/api-layer.ts","../../../../libs/map/src/lib/api/api-background-layer.ts","../../../../libs/map/src/lib/base/map-element.ts","../../../../libs/map/src/lib/base/map-source.ts","../../../../libs/map/src/lib/api/api-source.ts","../../../../libs/map/src/lib/api/api-element.ts","../../../../libs/map/src/lib/component/map-config.interface.ts","../../../../libs/map/src/lib/component/map.component.ts","../../../../libs/map/src/lib/misc/map-constants.ts","../../../../libs/map/src/lib/misc/map-element.repository.ts","../../../../libs/map/src/lib/misc/maplibre-cursor.service.ts","../../../../libs/map/src/lib/style/style.ts","../../../../libs/map/src/ndwnu-map.ts"],"sourcesContent":["import { Feature } from 'geojson';\nimport { MapElementConfig } from './../base/map-element.config';\nimport {\n FilterSpecification,\n LayerSpecification,\n MapGeoJSONFeature,\n MapMouseEvent,\n} from 'maplibre-gl';\nimport { Subject } from 'rxjs';\n\nexport abstract class MapLayer<TElementType, TFilter = unknown, TLegendItem = unknown> {\n initialized = false;\n\n protected unsubscribe = new Subject<void>();\n\n constructor(\n protected readonly config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n protected readonly sourceId: string,\n protected readonly layerIdSuffix?: string,\n ) {}\n\n get id(): string {\n const suffix = this.layerIdSuffix ? `-${this.layerIdSuffix}` : '';\n return `${this.sourceId}${suffix}`;\n }\n\n get styleLayer() {\n return this.config.map.getLayer(this.id);\n }\n\n onInit() {\n // Add the layer to the map, with the correct ordering (beforeId)\n const beforeId = this.config.mapElementRepository.getBeforeId(this.config.elementId);\n this.config.map.addLayer(this.getSpecification() as LayerSpecification, beforeId);\n\n // Keeping track of which layers have been added to the map to allow for beforeId determination\n this.#setupClickHandlers();\n this.initialized = true;\n }\n\n onDestroy() {\n this.initialized = false;\n this.#removeClickHandlers();\n\n this.config.map.removeLayer(this.id);\n\n this.unsubscribe.next();\n this.unsubscribe.complete();\n }\n\n setVisible(visible: boolean) {\n this.config.map.setLayoutProperty(this.id, 'visibility', visible ? 'visible' : 'none');\n }\n\n protected onClick?(event: ClickEvent): void;\n\n protected abstract getSpecification(): Partial<LayerSpecification>;\n getFilterSpecification?(filter?: TFilter): FilterSpecification;\n\n getFeatures(event: ClickEvent): Feature[] {\n if (event.features && event.features.length > 0) {\n return this.#distinctFeatures(event.features);\n }\n return [];\n }\n\n #setupClickHandlers() {\n if (!this.onClick) return;\n\n const mapElement = this.config.mapElementRepository.getMapElementById(this.config.elementId);\n if (!mapElement?.isInteractive) {\n return;\n }\n\n this.config.map.on('click', this.id, (event) => {\n this.onClick?.(event);\n });\n\n this.config.maplibreCursorService.setMouseCursor(this.config.map, this.id);\n }\n\n #removeClickHandlers() {\n if (!this.onClick) return;\n\n this.config.map.off('click', this.id, (event) => {\n this.onClick?.(event);\n });\n }\n\n /**\n * Filters an array of features to remove duplicates based on their properties.\n * Two features are considered duplicates if they have identical properties.\n * Particularly vector sources can yield duplicate features due to the way they\n * are rendered in tiles.\n *\n * @param features - Array of GeoJSON features to filter\n * @returns Array of unique features with no property duplicates\n * @private\n */\n #distinctFeatures(features: Feature[]): Feature[] {\n const seen = new Set();\n const uniqueFeatures: Feature[] = [];\n\n features.forEach((feature) => {\n const propertiesString = JSON.stringify(feature.properties);\n if (!seen.has(propertiesString)) {\n seen.add(propertiesString);\n uniqueFeatures.push(feature);\n }\n });\n\n return uniqueFeatures;\n }\n}\n\nexport type ClickEvent = MapMouseEvent & {\n features?: MapGeoJSONFeature[];\n} & object;\n","import { MapElementConfig } from './../base/map-element.config';\nimport { MapLayer } from './../base/map-layer';\nimport { LayerSpecification } from 'maplibre-gl';\n\nexport class ApiLayer<TElementType, TFilter = unknown, TLegendItem = unknown> extends MapLayer<\n TElementType,\n TFilter,\n TLegendItem\n> {\n constructor(\n config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n private readonly _layerSpecification: LayerSpecification,\n ) {\n const sourceId = 'source' in _layerSpecification ? _layerSpecification.source : '';\n\n super(config, sourceId);\n\n // Ensure that layout visibility is set after the base constructor has been called\n this._layerSpecification.layout = {\n ...this._layerSpecification.layout,\n visibility: 'none',\n };\n }\n\n public override get id(): string {\n return this._layerSpecification.id;\n }\n\n protected getSpecification(): Partial<LayerSpecification> {\n return this._layerSpecification;\n }\n}\n","import { BackgroundLayerSpecification } from 'maplibre-gl';\n\nimport { ApiLayer } from './api-layer';\nimport { MapElementConfig } from './../base/map-element.config';\n\nexport class ApiBackgroundLayer<\n TElementType,\n TFilter = unknown,\n TLegendItem = unknown,\n> extends ApiLayer<TElementType, TFilter, TLegendItem> {\n constructor(\n config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n layerSpecification: BackgroundLayerSpecification,\n ) {\n super(config, layerSpecification);\n }\n}\n","import { MapElementConfig } from './../base/map-element.config';\nimport { MapSource } from './../base/map-source';\nimport { Subject } from 'rxjs';\n\nexport abstract class MapElement<TElementType, TFilter = unknown, TLegendItem = unknown> {\n id: TElementType;\n elementOrder: number;\n sources: MapSource<TElementType, TFilter, TLegendItem>[] = [];\n alwaysVisible = false;\n isVisible = false;\n isInteractive = true;\n\n protected unsubscribe = new Subject<void>();\n\n constructor(protected readonly config: MapElementConfig<TElementType, TFilter, TLegendItem>) {\n this.id = config.elementId;\n this.elementOrder = config.elementOrder;\n if (config.isInteractive !== undefined) {\n this.isInteractive = config.isInteractive;\n }\n }\n\n get legendItems(): TLegendItem[] {\n return [];\n }\n\n onInit() {\n this.sources.forEach((source) => source.onInit());\n }\n\n onDestroy() {\n this.sources.forEach((source) => source.onDestroy());\n\n this.unsubscribe.next();\n this.unsubscribe.complete();\n }\n\n setVisible(visible: boolean) {\n this.isVisible = visible;\n this.sources.forEach((source) => source.setVisible(visible));\n }\n\n reload() {\n this.sources.forEach((source) => source.reload());\n }\n}\n","import { FeatureCollection } from 'geojson';\nimport { MapElementConfig } from './../base/map-element.config';\nimport { MapLayer } from './../base/map-layer';\nimport { FilterSpecification, GeoJSONSource, SourceSpecification } from 'maplibre-gl';\nimport { Observable, Subject, Subscription, takeUntil } from 'rxjs';\n\nexport abstract class MapSource<TElementType, TFilter = unknown, TLegendItem = unknown> {\n layers: MapLayer<TElementType, TFilter, TLegendItem>[] = [];\n\n protected unsubscribe = new Subject<void>();\n protected activeFilter: TFilter | undefined;\n\n #isInitialized = false;\n #filter$?: Observable<TFilter>;\n #filterSubscription?: Subscription;\n #featureCollection$?: Observable<FeatureCollection>;\n\n constructor(\n public readonly id: string,\n protected readonly config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n ) {}\n\n onInit() {\n if (!this.config.map.getSource(this.id)) {\n this.config.map.addSource(this.id, this.getSpecification() as SourceSpecification);\n }\n\n this.layers.forEach((layer) => layer.onInit());\n\n this.isInitialized = true;\n }\n\n onDestroy() {\n this.isInitialized = false;\n\n this.layers.forEach((layer) => layer.onDestroy());\n\n this.unsubscribe.next();\n this.unsubscribe.complete();\n }\n\n get featureCollection$(): Observable<FeatureCollection> | undefined {\n return this.#featureCollection$;\n }\n\n set featureCollection$(value: Observable<FeatureCollection> | undefined) {\n this.#featureCollection$ = value;\n this.#subscribeToFeatureCollection();\n }\n\n get isInitialized(): boolean {\n return this.#isInitialized;\n }\n\n set isInitialized(value: boolean) {\n this.#isInitialized = value;\n this.#subscribeToFeatureCollection();\n this.#subscribeToFilters();\n }\n\n get filter$(): Observable<TFilter> | undefined {\n return this.#filter$;\n }\n\n set filter$(value: Observable<TFilter> | undefined) {\n this.#filter$ = value;\n this.#subscribeToFilters();\n }\n\n setVisible(visible: boolean) {\n this.layers.forEach((layer) => layer.setVisible(visible));\n }\n\n reload() {\n this.config.map.refreshTiles(this.id);\n }\n\n protected abstract getSpecification(): Partial<SourceSpecification>;\n protected getFilterSpecification?(filter: TFilter | undefined): FilterSpecification;\n\n protected applyFilterToLayers(filterValue: TFilter | undefined) {\n const hasSourceFilter = !!this.getFilterSpecification;\n const hasLayerFilter = this.layers.some((layer) => !!layer.getFilterSpecification);\n\n if (!hasSourceFilter && !hasLayerFilter) {\n return;\n }\n\n this.activeFilter = filterValue;\n\n const sourceFilter = this.getFilterSpecification?.(filterValue);\n this.layers.forEach((layer) => {\n const layerFilter = layer.getFilterSpecification?.(filterValue);\n const combinedFilter = (\n sourceFilter && layerFilter\n ? ['all', sourceFilter, layerFilter]\n : sourceFilter || layerFilter\n ) as FilterSpecification;\n this.config.map.setFilter(layer.id, combinedFilter);\n });\n }\n\n #subscribeToFilters() {\n if (!this.isInitialized) return;\n\n if (this.#filterSubscription) {\n this.#filterSubscription.unsubscribe();\n }\n\n if (this.#filter$) {\n this.#filterSubscription = this.#filter$.pipe(takeUntil(this.unsubscribe)).subscribe({\n next: (filter) => {\n this.applyFilterToLayers(filter);\n },\n error: (error) => {\n console.error('Error updating filter', error);\n },\n });\n } else {\n this.applyFilterToLayers(undefined);\n }\n }\n\n #subscribeToFeatureCollection() {\n if (this.isInitialized && this.featureCollection$) {\n this.featureCollection$.pipe(takeUntil(this.unsubscribe)).subscribe({\n next: (featureCollection) => {\n const source = this.config.map.getSource(this.id);\n\n if (source?.type === 'geojson') {\n (source as GeoJSONSource).setData(featureCollection);\n } else {\n // not needed because source is always specified as geojson with empty collection\n this.config.map.addSource(this.id, {\n type: 'geojson',\n data: featureCollection,\n });\n }\n },\n error: (error) => {\n console.error('Error updating feature collection', error);\n },\n });\n }\n }\n}\n","import { LayerSpecification, SourceSpecification, StyleSpecification } from 'maplibre-gl';\n\nimport { ApiLayer } from './api-layer';\nimport { MapElementConfig } from './../base/map-element.config';\nimport { MapSource } from './../base/map-source';\n\nexport type LayerFilterFunction = (layer: LayerSpecification) => boolean;\n\nexport class ApiSource<TElementType, TFilter = unknown, TLegendItem = unknown> extends MapSource<\n TElementType,\n TFilter,\n TLegendItem\n> {\n constructor(\n id: string,\n config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n private readonly _styleSpecification: StyleSpecification,\n private readonly _layerFilter?: LayerFilterFunction,\n ) {\n super(id, config);\n }\n\n protected getSpecification(): Partial<SourceSpecification> {\n return this._styleSpecification.sources[this.id];\n }\n\n /**\n * Creates ApiLayer instances for this source without initializing them.\n */\n createLayers(layers: LayerSpecification[]) {\n this.layers = layers\n .filter((layer) => layer.type !== 'background')\n .filter((layer) => layer.source === this.id)\n .filter((layer) => !this._layerFilter || this._layerFilter(layer))\n .map((layer) => new ApiLayer(this.config, layer));\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { LayerSpecification, StyleSpecification } from 'maplibre-gl';\nimport { filter, takeUntil } from 'rxjs';\n\nimport { ApiBackgroundLayer } from './api-background-layer';\nimport { MapElement } from './../base/map-element';\nimport { MapElementConfig } from './../base/map-element.config';\nimport { ApiSource, LayerFilterFunction } from './../api/api-source';\n\nexport class ApiElement<TElementType, TFilter = unknown, TLegendItem = unknown> extends MapElement<\n TElementType,\n TFilter,\n TLegendItem\n> {\n backgroundLayers: ApiBackgroundLayer<TElementType, TFilter, TLegendItem>[] = [];\n\n #visible = false;\n\n constructor(\n config: MapElementConfig<TElementType, TFilter, TLegendItem>,\n private readonly _http: HttpClient,\n private readonly _mapStyleUrl: string,\n private readonly _layerFilter?: LayerFilterFunction,\n ) {\n super(config);\n }\n\n override onInit() {\n super.onInit();\n\n this._http\n .get<StyleSpecification>(this._mapStyleUrl)\n .pipe(\n filter((styleSpecification) => !!styleSpecification),\n takeUntil(this.unsubscribe),\n )\n .subscribe((styleSpecification) => {\n this.#createBackgroundLayers(styleSpecification.layers);\n this.#createSources(styleSpecification);\n\n // If setVisible() was called before these layers were created,\n // re-apply the current visibility state so the new layers respect it.\n this.setVisible(this.#visible);\n });\n }\n\n override setVisible(visible: boolean) {\n this.#visible = visible;\n\n super.setVisible(visible);\n this.backgroundLayers.forEach((layer) => layer.setVisible(visible));\n }\n\n #createSources(styleSpecification: StyleSpecification) {\n const layers = styleSpecification.layers;\n\n // First, create all sources and their layer instances (without initializing them)\n this.sources = Object.entries(styleSpecification.sources).map(([id]) => {\n const source = new ApiSource<TElementType, TFilter, TLegendItem>(\n id,\n this.config,\n styleSpecification,\n this._layerFilter,\n );\n source.onInit();\n source.createLayers(layers);\n return source;\n });\n\n // Then, initialize all layers according to the style.json order\n // This ensures correct ordering regardless of which source they belong to\n this.#initializeLayersInOrder(layers);\n }\n\n #initializeLayersInOrder(layers: LayerSpecification[]) {\n // Create a map of layerId -> ApiLayer for quick lookup\n const layerMap = new Map(\n this.sources.flatMap((source) => source.layers.map((layer) => [layer.id, layer])),\n );\n\n // Initialize layers in the order they appear in style.json\n for (const layerSpec of layers) {\n const layer = layerMap.get(layerSpec.id);\n if (layer) {\n layer.onInit();\n }\n }\n }\n\n // API elements are created from the style specification and this can contain layers of type 'background'\n // These layers do not have a source and therefore don't fit in the element > source > layer hierarchy\n // That is why we create these layers from the element itself\n #createBackgroundLayers(layerSpecifications: LayerSpecification[]) {\n this.backgroundLayers = layerSpecifications\n .filter((layer) => layer.type === 'background')\n .filter((layer) => !this._layerFilter || this._layerFilter(layer))\n .map((layerSpecification) => {\n const apiLayer = new ApiBackgroundLayer(this.config, layerSpecification);\n apiLayer.onInit();\n return apiLayer;\n });\n }\n}\n","import { LngLatBoundsLike, LngLatLike } from 'maplibre-gl';\n\nexport interface MapConfig {\n /** Initial center position of the map */\n center?: LngLatLike;\n\n /** Initial zoom level */\n zoom?: number;\n\n /** Maximum zoom level */\n maxZoom?: number;\n\n /** Minimum zoom level */\n minZoom?: number;\n\n /** Initial bounds to fit the map to */\n bounds?: LngLatBoundsLike;\n\n /** Enable/disable all map interactions */\n interactive?: boolean;\n\n /** Enable/disable map rotation via drag */\n dragRotate?: boolean;\n\n /** Enable/disable double-click to zoom */\n doubleClickZoom?: boolean;\n\n /** Enable/disable scroll wheel zoom */\n scrollZoom?: boolean;\n\n /** Enable/disable shift+drag box zoom */\n boxZoom?: boolean;\n\n /** Enable/disable drag to pan */\n dragPan?: boolean;\n\n /** Enable/disable keyboard navigation */\n keyboard?: boolean;\n\n /** Enable/disable touch zoom and rotation on mobile */\n touchZoomRotate?: boolean;\n}\n\nexport const DEFAULT_MAP_CONFIG: Required<Omit<MapConfig, 'bounds'>> = {\n center: [5.387827, 52.155172],\n zoom: 8,\n maxZoom: 18,\n minZoom: 6,\n interactive: true,\n dragRotate: false,\n doubleClickZoom: true,\n scrollZoom: true,\n boxZoom: true,\n dragPan: true,\n keyboard: true,\n touchZoomRotate: true,\n};\n\n// Common bounds that users can optionally use\nexport const COMMON_BOUNDS = {\n NETHERLANDS: [\n [3.079667, 50.587611],\n [7.572028, 53.636667],\n ] as LngLatBoundsLike,\n AMERSFOORT: [\n [5.34458238242172, 52.11623605695118],\n [5.446205917577942, 52.21132028216525],\n ] as LngLatBoundsLike,\n} as const;\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n input,\n OnDestroy,\n viewChild,\n} from '@angular/core';\nimport { AnimationOptions, Map, MapOptions } from 'maplibre-gl';\nimport { MapConfig, DEFAULT_MAP_CONFIG } from './map-config.interface';\n\n@Component({\n standalone: true,\n template: '<div #mapContainer class=\"map\"></div>',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport abstract class MapComponent implements AfterViewInit, OnDestroy {\n mapContainer = viewChild.required<ElementRef>('mapContainer');\n config = input<Partial<MapConfig>>({});\n map!: Map;\n\n ngAfterViewInit() {\n this.map = this.#createMap(this.mapContainer().nativeElement);\n this.map.once('load', () => this.#initiateMapLoading());\n }\n\n ngOnDestroy() {\n // Note: Using `this.map.once('remove', this.onRemoveMap())` does not work correctly because,\n // by the time the `onRemoveMap` event is triggered, it is no longer possible to interact with the map for cleanup.\n // To address this we call `onRemoveMap` explicitly before destroying the MapLibre instance. This\n // ensures that our map elements are cleaned up properly before the map is removed.\n this.onRemoveMap();\n this.map?.remove();\n }\n\n resizeMap() {\n this.map?.resize();\n }\n\n zoomToLevel(zoomLevel: number, options?: AnimationOptions) {\n this.map?.zoomTo(zoomLevel, options);\n }\n\n #createMap(container: HTMLElement): Map {\n const config = { ...DEFAULT_MAP_CONFIG, ...this.config() };\n\n const options = {\n container,\n style: {\n version: 8 as const,\n sources: {},\n layers: [],\n },\n maxZoom: config.maxZoom,\n minZoom: config.minZoom,\n interactive: config.interactive,\n doubleClickZoom: config.doubleClickZoom,\n scrollZoom: config.scrollZoom,\n boxZoom: config.boxZoom,\n dragPan: config.dragPan,\n keyboard: config.keyboard,\n touchZoomRotate: config.touchZoomRotate,\n } as MapOptions;\n\n const map = new Map(options);\n\n return map;\n }\n\n protected abstract onLoadMap(): void;\n protected abstract onRemoveMap(): void;\n protected abstract onIdle(): void;\n\n #initiateMapLoading() {\n this.onLoadMap();\n this.resizeMap();\n }\n}\n","import { LngLatLike, DataDrivenPropertyValueSpecification, LayerSpecification } from 'maplibre-gl';\n\nexport const BOUNDS_NL: [LngLatLike, LngLatLike] = [\n [3.079667, 50.587611],\n [7.572028, 53.636667],\n];\nexport const BOUNDS_AMERSFOORT: [LngLatLike, LngLatLike] = [\n [5.34458238242172, 52.11623605695118],\n [5.446205917577942, 52.21132028216525],\n];\n\nexport const lineWidthFrcSpecification = [\n 'interpolate',\n ['exponential', 1.1],\n ['zoom'],\n 10,\n [\n 'match',\n ['get', 'functionalRoadClass'],\n '0',\n 2.5,\n '1',\n 2.5,\n '2',\n 2.5,\n '3',\n 1.5,\n '4',\n 1.5,\n '5',\n 1,\n 0,\n ],\n 13,\n [\n 'match',\n ['get', 'functionalRoadClass'],\n '0',\n 7,\n '1',\n 7,\n '2',\n 5.7,\n '3',\n 4.1,\n '4',\n 4.1,\n '5',\n 2.7,\n '6',\n 1.5,\n 0,\n ],\n 15,\n [\n 'match',\n ['get', 'functionalRoadClass'],\n '0',\n 10.4,\n '1',\n 10.4,\n '2',\n 8.4,\n '3',\n 6.4,\n '4',\n 6.4,\n '5',\n 5.4,\n '6',\n 3.4,\n '7',\n 3.4,\n 3,\n ],\n 20,\n [\n 'match',\n ['get', 'functionalRoadClass'],\n '0',\n 24,\n '1',\n 24,\n '2',\n 22,\n '3',\n 20,\n '4',\n 18,\n '5',\n 16,\n '6',\n 14,\n '7',\n 10,\n 8,\n ],\n] as DataDrivenPropertyValueSpecification<number>;\n\nexport type LayerGroup =\n | 'context-map'\n | 'context-aerial'\n | 'context-roads'\n | 'context-admin'\n | 'context-labels'\n | 'relevant-roads'\n | 'relevant-admin';\n\nexport type LayerSubGroup =\n | 'administrative-division'\n | 'background-blue'\n | 'background-green'\n | 'background-grey'\n | 'background-yellow'\n | 'bgt-housenumbers'\n | 'brt-place-names'\n | 'fcd-segments'\n | 'ndw-nwb-road-sections'\n | 'nwb-hectometersigns'\n | 'nwb-oneway-signs'\n | 'nwb-road-names'\n | 'railway'\n | 'wkd-parking-areas';\n\nexport interface LayerMetadata {\n group: LayerGroup;\n 'sub-group'?: LayerSubGroup;\n}\n\nexport type NdwLayerSpecification = LayerSpecification & {\n metadata: LayerMetadata;\n};\nexport type NdwLayerFilterFunction = (layer: NdwLayerSpecification) => boolean;\n","import { MapElement } from './../base/map-element';\nimport { BehaviorSubject, map } from 'rxjs';\n\n/**\n * Repository for managing map elements.\n * Provides methods to add, remove, show, hide, and toggle map elements.\n * Also tracks element visibility state and provides observable streams for elements.\n *\n * @typeparam TElementType - The type of ID used for the map elements\n * @typeparam TFilter - The type of filter used for the map elements\n * @typeparam TLegendItem - The type of legend item used for the map elements\n */\nexport abstract class MapElementRepository<TElementType, TFilter = unknown, TLegendItem = unknown> {\n /** Subject that holds the current array of map elements */\n private readonly mapElementsSubject = new BehaviorSubject<\n MapElement<TElementType, TFilter, TLegendItem>[]\n >([]);\n\n // mapElements are not directly exposed to prevent circular reference errors when\n // they are used in a template. Because the mapElements$ observable contains MapLibre\n // GL JS map objects, which have circular references.\n\n /** Observable stream of all map elements */\n readonly mapElements$ = this.mapElementsSubject.asObservable();\n\n /** Observable stream of only visible map elements */\n readonly visibleMapElements$ = this.mapElements$.pipe(\n map((elements: MapElement<TElementType, TFilter, TLegendItem>[]) =>\n elements.filter((element) => element.isVisible),\n ),\n );\n\n /** Observable stream of legend items from all visible map elements */\n readonly legendItems$ = this.visibleMapElements$.pipe(\n map((elements) => elements.flatMap((element) => element.legendItems)),\n );\n\n /**\n * Gets the ids (TElementType) as an array of all map element\n * @returns Array of TElementType\n */\n mapElementIds$ = this.mapElements$.pipe(map((elements) => elements.map((element) => element.id)));\n\n /**\n * Gets the ids (TElementType) as an array of all visible map element\n * @returns Array of TElementType\n */\n visibleMapElementIds$ = this.visibleMapElements$.pipe(\n map((elements) => elements.map((element) => element.id)),\n );\n\n /**\n * Gets the ids (TElementType) as an array of all visible map element\n * @returns Array of TElementType\n */\n get visibleMapElementIds(): TElementType[] {\n return this.visibleMapElements.map((element) => element.id);\n }\n\n /**\n * Gets the current array of all map elements\n * @returns Array of map elements\n */\n get mapElements(): MapElement<TElementType, TFilter, TLegendItem>[] {\n return this.mapElementsSubject.getValue();\n }\n\n /**\n * Gets only the currently visible map elements\n * @returns Array of visible map elements\n */\n get visibleMapElements(): MapElement<TElementType, TFilter, TLegendItem>[] {\n return this.mapElements.filter((element) => element.isVisible);\n }\n\n /**\n * Finds a map element by its ID\n *\n * @param elementId - The ID of the element to find\n * @returns The map element if found, undefined otherwise\n */\n getMapElementById(\n elementId: TElementType,\n ): MapElement<TElementType, TFilter, TLegendItem> | undefined {\n return this.mapElements.find((element) => element.id === elementId);\n }\n\n /**\n * Checks if a map element is currently visible\n *\n * @param elementId - The ID of the element to check\n * @returns True if the element is visible, false otherwise\n */\n isMapElementVisible(elementId: TElementType): boolean {\n return this.visibleMapElements.some((element) => element.id === elementId);\n }\n\n /**\n * Adds a new map element to the repository and initializes it.\n * Sets the element's visibility based on its configuration.\n *\n * @param mapElement - The map element to add\n */\n addMapElement(mapElement: MapElement<TElementType, TFilter, TLegendItem>) {\n const currentElements = this.mapElements;\n this.mapElementsSubject.next([...currentElements, mapElement]);\n mapElement.onInit();\n if (mapElement.alwaysVisible || this.isMapElementVisible(mapElement.id)) {\n this.showMapElement(mapElement.id);\n } else {\n this.hideMapElement(mapElement.id);\n }\n }\n\n /**\n * Removes a map element from the repository and destroys it.\n *\n * @param mapElement - The map element to remove\n */\n removeMapElement(mapElement: MapElement<TElementType, TFilter, TLegendItem>) {\n const filteredElements = this.mapElements.filter((element) => element.id !== mapElement.id);\n this.mapElementsSubject.next(filteredElements);\n mapElement.onDestroy();\n }\n\n /**\n * Removes all map elements from the repository and destroys them.\n */\n removeAllMapElements() {\n this.mapElements.forEach((element) => {\n this.removeMapElement(element);\n });\n }\n\n /**\n * Sets the visibility of a map element by its ID and updates the subject with the new state.\n *\n * @param elementId - The ID of the element to update\n * @param visible - Whether the element should be visible or hidden\n */\n setMapElementVisibility(elementId: TElementType, visible: boolean) {\n const element = this.getMapElementById(elementId);\n if (element) {\n element.setVisible(visible);\n const elements = this.mapElements.filter((el) => el.id !== elementId);\n this.mapElementsSubject.next([...elements, element]);\n }\n }\n\n /**\n * Shows a map element by its ID and updates the subject with the new state.\n *\n * @param elementId - The ID of the element to show\n */\n showMapElement(elementId: TElementType) {\n this.setMapElementVisibility(elementId, true);\n }\n\n /**\n * Hides a map element by its ID and updates the subject with the new state.\n *\n * @param elementId - The ID of the element to hide\n */\n hideMapElement(elementId: TElementType) {\n this.setMapElementVisibility(elementId, false);\n }\n\n /**\n * Triggers a reload of the tiles in the sources of the map element with the given ID\n *\n * @param elementId - The ID of the element to reload\n */\n reloadMapElement(elementId: TElementType) {\n const element = this.getMapElementById(elementId);\n if (element) {\n element.reload();\n }\n }\n\n /**\n * Toggles the visibility of a map element by its ID.\n * If the element is currently visible, it will be hidden, and vice versa.\n *\n * @param elementId - The ID of the element to toggle visibility\n */\n toggleMapElement(elementId: TElementType) {\n if (this.visibleMapElements.some((element) => element.id === elementId)) {\n this.hideMapElement(elementId);\n } else {\n this.showMapElement(elementId);\n }\n }\n\n /**\n * Gets the ID of the layer that should come before the specified element's layers\n * in the map's layer stack. This is used for maintaining proper layer ordering.\n *\n * @param elementId - The ID of the element to find a \"before\" reference for\n * @returns The ID of the first layer of the next element in order, or undefined if none exists\n */\n getBeforeId(elementId: TElementType): string | undefined {\n const currentElement = this.getMapElementById(elementId);\n if (!currentElement) {\n return undefined;\n }\n\n const nextElement = this.mapElements\n .filter((item) => item.elementOrder > currentElement.elementOrder)\n .sort((a, b) => a.elementOrder - b.elementOrder)[0];\n\n const nextElementLayerIds = nextElement?.sources\n .flatMap((source) => source.layers)\n .filter((layer) => layer.initialized)\n .map((layer) => layer.id);\n\n return nextElement && nextElementLayerIds.length > 0 ? nextElementLayerIds[0] : undefined;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Map } from 'maplibre-gl';\n\n/**\n * Service for managing MapLibre map cursor interactions.\n *\n * Maplibre has no automatic cursor handling for layers, so when you add a clickHandler\n * to a layer, the user can click on it, but the cursor will not change to a pointer.\n * This service provides methods to set the cursor to pointer when hovering over a layer,\n * and to enable crosshair mode which takes precedence over all other cursor types.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MaplibreCursorService {\n /** Counter to track how many layers currently need a pointer cursor */\n #cursorPointerCount = 0;\n /** Flag indicating if crosshair mode is active */\n #crosshairMode = false;\n\n /**\n * Sets up mouse cursor handling for a map layer.\n * Changes cursor to pointer when mouse enters the layer and resets when leaving.\n *\n * @param map - The MapLibre map instance\n * @param layerId - ID of the layer to apply cursor behavior to\n */\n setMouseCursor(map: Map, layerId: string) {\n const updateCursor = (cursor: 'pointer' | '') => {\n if (!this.#crosshairMode) this.#setMouseCursor(map, cursor);\n };\n\n map.on('mouseenter', layerId, () => updateCursor('pointer'));\n map.on('mouseleave', layerId, () => updateCursor(''));\n }\n\n /**\n * Enables or disables crosshair cursor mode for the map.\n * When enabled, crosshair cursor will take precedence over all other cursor types.\n *\n * @param value - True to enable crosshair mode, false to disable\n * @param map - The MapLibre map instance to apply the cursor to\n */\n setCrosshairMode(value: boolean, map: Map) {\n this.#crosshairMode = value;\n\n let cursorType = '';\n if (value) {\n cursorType = 'crosshair';\n } else if (this.#cursorPointerCount > 0) {\n cursorType = 'pointer';\n }\n\n map.getCanvas().style.cursor = cursorType;\n }\n\n /**\n * Internal method to handle mouse cursor state changes.\n * Manages the cursor pointer reference counter to ensure cursor displays correctly\n * when hovering over multiple interactive layers.\n *\n * @param map - The MapLibre map instance\n * @param cursor - Cursor type to set ('pointer' or '' to reset)\n * @private\n */\n #setMouseCursor(map: Map, cursor: 'pointer' | '') {\n if (this.#crosshairMode) {\n // Crosshair mode takes precedence, ignore other cursor settings\n map.getCanvas().style.cursor = 'crosshair';\n return;\n }\n\n if (cursor === 'pointer') {\n this.#cursorPointerCount++;\n map.getCanvas().style.cursor = cursor;\n } else if (cursor === '') {\n this.#cursorPointerCount--;\n if (this.#cursorPointerCount < 1) {\n map.getCanvas().style.cursor = '';\n }\n }\n }\n}\n","import { StyleSpecification } from 'maplibre-gl';\nimport style from './style.json';\n\nfunction isNwbRoadLayer(id: string): boolean {\n return id.startsWith('ndw-nwb-') || id.startsWith('nwb-');\n}\n\n// RVM roads are drawn on the NWB road network, so they are hidden together with\n// the NWB roads in the OSM style (visible by default in the NWB style).\nfunction isRvmRoadLayer(id: string): boolean {\n return id.startsWith('ndw-rvm-');\n}\n\nconst OSM_DEFAULT_VISIBLE = new Set([\n 'osm-road-sections-casing',\n 'osm-road-sections-fill',\n 'osm-road-sections-single',\n 'osm-road-names',\n 'osm-road-names-number',\n]);\n\nfunction swapRoadVisibility(\n layers: typeof style.layers,\n hide: (id: string) => boolean,\n show: Set<string>,\n) {\n return layers.map((layer) => {\n if (hide(layer.id) && layer.layout?.visibility !== 'none') {\n return { ...layer, layout: { ...layer.layout, visibility: 'none' as const } };\n }\n if (show.has(layer.id) && layer.layout?.visibility === 'none') {\n return { ...layer, layout: { ...layer.layout, visibility: 'visible' as const } };\n }\n return layer;\n });\n}\n\n/**\n * The default NDW map style, using NWB road layers as the road network.\n * This is the recommended style for all NDW applications.\n *\n * ## ⚠️ Sprites must be loaded\n *\n * This style depends on sprite sheets for all of its icons and patterns\n * (traffic signs, road symbols, SDF icons, ...). MapLibre only loads them when\n * the `sprite` definition is present on the style object you give to the map.\n *\n * Passing the whole `NDWMapStyle` object already includes the sprites, so the\n * simplest setup just works:\n *\n * ```ts\n * import { NDWMapStyle } from '@ndwnu/map';\n *\n * // sprite is part of NDWMapStyle, so icons load automatically\n * map.setStyle(NDWMapStyle);\n * ```\n *\n * If you build your own style object (merging your own sources/layers), you\n * MUST copy the sprite definition over — otherwise icons silently fail to load:\n *\n * ```ts\n * map.setStyle({\n * ...myCustomStyle,\n * sprite: NDWMapStyle.sprite, // <-- required, do not omit\n * });\n * ```\n */\nexport const NDWMapStyle = {\n ...style,\n} as unknown as StyleSpecification;\n\n/**\n * An alternative NDW map style that replaces the NWB road layers with\n * OpenStreetMap roads. Behaves like {@link NDWMapStyle} in every other respect.\n *\n * ## ⚠️ Sprites must be loaded\n *\n * Like {@link NDWMapStyle}, this style depends on sprite sheets for its icons\n * and patterns. MapLibre only loads them when the `sprite` definition is present\n * on the style object you give to the map.\n *\n * Passing the whole `NDWOSMMapStyle` object already includes the sprites:\n *\n * ```ts\n * import { NDWOSMMapStyle } from '@ndwnu/map';\n *\n * // sprite is part of NDWOSMMapStyle, so icons load automatically\n * map.setStyle(NDWOSMMapStyle);\n * ```\n *\n * If you build your own style object, you MUST copy the sprite definition over —\n * otherwise icons silently fail to load:\n *\n * ```ts\n * map.setStyle({\n * ...myCustomStyle,\n * sprite: NDWOSMMapStyle.sprite, // <-- required, do not omit\n * });\n * ```\n */\nexport const NDWOSMMapStyle = {\n ...style,\n layers: swapRoadVisibility(\n style.layers,\n (id) => isNwbRoadLayer(id) || isRvmRoadLayer(id),\n OSM_DEFAULT_VISIBLE,\n ),\n} as unknown as StyleSpecification;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Map"],"mappings":";;;;;MAUsB,QAAQ,CAAA;AAMP,IAAA,MAAA;AACA,IAAA,QAAA;AACA,IAAA,aAAA;IAPrB,WAAW,GAAG,KAAK;AAET,IAAA,WAAW,GAAG,IAAI,OAAO,EAAQ;AAE3C,IAAA,WAAA,CACqB,MAA4D,EAC5D,QAAgB,EAChB,aAAsB,EAAA;QAFtB,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,QAAQ,GAAR,QAAQ;QACR,IAAA,CAAA,aAAa,GAAb,aAAa;IAC/B;AAEH,IAAA,IAAI,EAAE,GAAA;AACJ,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,aAAa,GAAG,CAAA,CAAA,EAAI,IAAI,CAAC,aAAa,CAAA,CAAE,GAAG,EAAE;AACjE,QAAA,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAA,EAAG,MAAM,EAAE;IACpC;AAEA,IAAA,IAAI,UAAU,GAAA;AACZ,QAAA,OAAO,IAAI,CAAC,MAAM,CA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AE,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,UAAU,KAAK,MAAM,EAAE;AACzD,YAAA,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,MAAe,EAAE,EAAE;QAC/E;AACA,QAAA,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,UAAU,KAAK,MAAM,EAAE;AAC7D,YAAA,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,SAAkB,EAAE,EAAE;QAClF;AACA,QAAA,OAAO,KAAK;AACd,IAAA,CAAC,CAAC;AACJ;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AACI,MAAM,WAAW,GAAG;AACzB,IAAA,GAAG,KAAK;;AAGV;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACI,MAAM,cAAc,GAAG;AAC5B,IAAA,GAAG,KAAK;IACR,MAAM,EAAE,kBAAkB,CACxB,KAAK,CAAC,MAAM,EACZ,CAAC,EAAE,KAAK,cAAc,CAAC,EAAE,CAAC,IAAI,cAAc,CAAC,EAAE,CAAC,EAChD,mBAAmB,CACpB;;;AC1GH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndwnu/map",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/core": "^
|
|
6
|
-
"@angular/common": "^
|
|
5
|
+
"@angular/core": "^22.0.0",
|
|
6
|
+
"@angular/common": "^22.0.0",
|
|
7
7
|
"maplibre-gl": "^5.19.0",
|
|
8
8
|
"rxjs": "^7.8.0"
|
|
9
9
|
},
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"default": "./fesm2022/ndwnu-map.mjs"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
+
"type": "module",
|
|
22
23
|
"dependencies": {
|
|
23
24
|
"tslib": "^2.3.0"
|
|
24
25
|
}
|
package/src/lib/style/style.json
CHANGED
|
@@ -84,6 +84,13 @@
|
|
|
84
84
|
"type": "vector",
|
|
85
85
|
"url": "https://maps.ndw.nu/api/v1/wkdParkingAreas/latest/mbtiles/segments/"
|
|
86
86
|
},
|
|
87
|
+
"ndw-wkd-rvm": {
|
|
88
|
+
"type": "vector",
|
|
89
|
+
"tiles": ["https://maps.ndw.nu/api/v1/wkdRvm/latest/mbtiles/segments/tiles/{z}/{x}/{y}.pbf"],
|
|
90
|
+
"minzoom": 4,
|
|
91
|
+
"maxzoom": 19,
|
|
92
|
+
"attribution": "<a target='_blank' rel='noopener noreferrer' href='https://maps.ndw.nu/'>NDW</a>"
|
|
93
|
+
},
|
|
87
94
|
"openmaptiles": {
|
|
88
95
|
"type": "vector",
|
|
89
96
|
"url": "https://maps.ndw.nu/api/v1/osm/latest/mbtiles/osm/",
|
|
@@ -107,11 +114,11 @@
|
|
|
107
114
|
[-180, -85.05]
|
|
108
115
|
],
|
|
109
116
|
[
|
|
110
|
-
[1.5, 50
|
|
111
|
-
[8.5, 50
|
|
117
|
+
[1.5, 50],
|
|
118
|
+
[8.5, 50],
|
|
112
119
|
[8.5, 54.3],
|
|
113
120
|
[1.5, 54.3],
|
|
114
|
-
[1.5, 50
|
|
121
|
+
[1.5, 50]
|
|
115
122
|
]
|
|
116
123
|
]
|
|
117
124
|
}
|
|
@@ -695,6 +702,88 @@
|
|
|
695
702
|
"fill-outline-color": "#dedede"
|
|
696
703
|
}
|
|
697
704
|
},
|
|
705
|
+
{
|
|
706
|
+
"id": "ndw-rvm-road-sections-behind-casing",
|
|
707
|
+
"type": "line",
|
|
708
|
+
"source": "ndw-wkd-rvm",
|
|
709
|
+
"source-layer": "segments",
|
|
710
|
+
"metadata": {
|
|
711
|
+
"group": "context-roads",
|
|
712
|
+
"sub-group": "ndw-rvm-road-sections",
|
|
713
|
+
"type": "context",
|
|
714
|
+
"legend-name": "RVM-overig omlijning (achter NWB)",
|
|
715
|
+
"desc": "Wegen toegankelijk voor auto's",
|
|
716
|
+
"insert-before": "background"
|
|
717
|
+
},
|
|
718
|
+
"filter": [
|
|
719
|
+
"all",
|
|
720
|
+
["==", ["get", "rvmType"], "RVM-overig"],
|
|
721
|
+
["!=", ["get", "functionalRoadClass"], "5"]
|
|
722
|
+
],
|
|
723
|
+
"layout": {
|
|
724
|
+
"visibility": "visible",
|
|
725
|
+
"line-cap": "butt",
|
|
726
|
+
"line-join": "round"
|
|
727
|
+
},
|
|
728
|
+
"paint": {
|
|
729
|
+
"line-color": "#E2C16C",
|
|
730
|
+
"line-width": [
|
|
731
|
+
"interpolate",
|
|
732
|
+
["exponential", 1.1],
|
|
733
|
+
["zoom"],
|
|
734
|
+
10,
|
|
735
|
+
0,
|
|
736
|
+
13,
|
|
737
|
+
4.5,
|
|
738
|
+
15,
|
|
739
|
+
8,
|
|
740
|
+
20,
|
|
741
|
+
22
|
|
742
|
+
],
|
|
743
|
+
"line-opacity": 1
|
|
744
|
+
}
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"id": "ndw-rvm-road-sections-behind-fill",
|
|
748
|
+
"type": "line",
|
|
749
|
+
"source": "ndw-wkd-rvm",
|
|
750
|
+
"source-layer": "segments",
|
|
751
|
+
"metadata": {
|
|
752
|
+
"group": "context-roads",
|
|
753
|
+
"sub-group": "ndw-rvm-road-sections",
|
|
754
|
+
"type": "context",
|
|
755
|
+
"legend-name": "RVM-overig vulling (achter NWB)",
|
|
756
|
+
"desc": "Wegen toegankelijk voor auto's",
|
|
757
|
+
"insert-before": "background"
|
|
758
|
+
},
|
|
759
|
+
"filter": [
|
|
760
|
+
"all",
|
|
761
|
+
["==", ["get", "rvmType"], "RVM-overig"],
|
|
762
|
+
["!=", ["get", "functionalRoadClass"], "5"]
|
|
763
|
+
],
|
|
764
|
+
"layout": {
|
|
765
|
+
"visibility": "visible",
|
|
766
|
+
"line-cap": "butt",
|
|
767
|
+
"line-join": "round"
|
|
768
|
+
},
|
|
769
|
+
"paint": {
|
|
770
|
+
"line-color": "hsl(44, 42%, 94%)",
|
|
771
|
+
"line-width": [
|
|
772
|
+
"interpolate",
|
|
773
|
+
["exponential", 1.1],
|
|
774
|
+
["zoom"],
|
|
775
|
+
10,
|
|
776
|
+
1,
|
|
777
|
+
13,
|
|
778
|
+
2.7,
|
|
779
|
+
15,
|
|
780
|
+
5.4,
|
|
781
|
+
20,
|
|
782
|
+
17
|
|
783
|
+
],
|
|
784
|
+
"line-opacity": 1
|
|
785
|
+
}
|
|
786
|
+
},
|
|
698
787
|
{
|
|
699
788
|
"id": "ndw-nwb-road-sections-bus",
|
|
700
789
|
"type": "line",
|
|
@@ -1163,6 +1252,88 @@
|
|
|
1163
1252
|
"line-opacity": 1
|
|
1164
1253
|
}
|
|
1165
1254
|
},
|
|
1255
|
+
{
|
|
1256
|
+
"id": "ndw-rvm-road-sections-casing",
|
|
1257
|
+
"type": "line",
|
|
1258
|
+
"source": "ndw-wkd-rvm",
|
|
1259
|
+
"source-layer": "segments",
|
|
1260
|
+
"metadata": {
|
|
1261
|
+
"group": "context-roads",
|
|
1262
|
+
"sub-group": "ndw-rvm-road-sections",
|
|
1263
|
+
"type": "context",
|
|
1264
|
+
"legend-name": "RVM: Wegvakken omlijning",
|
|
1265
|
+
"desc": "Wegen toegankelijk voor auto's",
|
|
1266
|
+
"insert-before": "background"
|
|
1267
|
+
},
|
|
1268
|
+
"filter": [
|
|
1269
|
+
"all",
|
|
1270
|
+
["==", ["get", "rvmType"], "RVM-overig"],
|
|
1271
|
+
["==", ["get", "functionalRoadClass"], "5"]
|
|
1272
|
+
],
|
|
1273
|
+
"layout": {
|
|
1274
|
+
"visibility": "visible",
|
|
1275
|
+
"line-cap": "butt",
|
|
1276
|
+
"line-join": "round"
|
|
1277
|
+
},
|
|
1278
|
+
"paint": {
|
|
1279
|
+
"line-color": "#E2C16C",
|
|
1280
|
+
"line-width": [
|
|
1281
|
+
"interpolate",
|
|
1282
|
+
["exponential", 1.1],
|
|
1283
|
+
["zoom"],
|
|
1284
|
+
10,
|
|
1285
|
+
0,
|
|
1286
|
+
13,
|
|
1287
|
+
4.5,
|
|
1288
|
+
15,
|
|
1289
|
+
8,
|
|
1290
|
+
20,
|
|
1291
|
+
22
|
|
1292
|
+
],
|
|
1293
|
+
"line-opacity": 1
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
"id": "ndw-rvm-road-sections-fill",
|
|
1298
|
+
"type": "line",
|
|
1299
|
+
"source": "ndw-wkd-rvm",
|
|
1300
|
+
"source-layer": "segments",
|
|
1301
|
+
"metadata": {
|
|
1302
|
+
"group": "context-roads",
|
|
1303
|
+
"sub-group": "ndw-rvm-road-sections",
|
|
1304
|
+
"type": "context",
|
|
1305
|
+
"legend-name": "RVM: Wegvakken vulling",
|
|
1306
|
+
"desc": "Wegen toegankelijk voor auto's",
|
|
1307
|
+
"insert-before": "background"
|
|
1308
|
+
},
|
|
1309
|
+
"filter": [
|
|
1310
|
+
"all",
|
|
1311
|
+
["==", ["get", "rvmType"], "RVM-overig"],
|
|
1312
|
+
["==", ["get", "functionalRoadClass"], "5"]
|
|
1313
|
+
],
|
|
1314
|
+
"layout": {
|
|
1315
|
+
"visibility": "visible",
|
|
1316
|
+
"line-cap": "butt",
|
|
1317
|
+
"line-join": "round"
|
|
1318
|
+
},
|
|
1319
|
+
"paint": {
|
|
1320
|
+
"line-color": "hsl(44, 42%, 94%)",
|
|
1321
|
+
"line-width": [
|
|
1322
|
+
"interpolate",
|
|
1323
|
+
["exponential", 1.1],
|
|
1324
|
+
["zoom"],
|
|
1325
|
+
10,
|
|
1326
|
+
1,
|
|
1327
|
+
13,
|
|
1328
|
+
2.7,
|
|
1329
|
+
15,
|
|
1330
|
+
5.4,
|
|
1331
|
+
20,
|
|
1332
|
+
17
|
|
1333
|
+
],
|
|
1334
|
+
"line-opacity": 1
|
|
1335
|
+
}
|
|
1336
|
+
},
|
|
1166
1337
|
{
|
|
1167
1338
|
"id": "ndw-nwb-road-sections-casing-rel",
|
|
1168
1339
|
"type": "line",
|
|
@@ -2182,7 +2353,6 @@
|
|
|
2182
2353
|
"line-width": ["interpolate", ["linear"], ["zoom"], 12, 1, 20, 5.5]
|
|
2183
2354
|
}
|
|
2184
2355
|
},
|
|
2185
|
-
|
|
2186
2356
|
{
|
|
2187
2357
|
"id": "osm-road-sections-casing",
|
|
2188
2358
|
"type": "line",
|
|
@@ -3538,7 +3708,6 @@
|
|
|
3538
3708
|
"text-halo-width": 1.5
|
|
3539
3709
|
}
|
|
3540
3710
|
},
|
|
3541
|
-
|
|
3542
3711
|
{
|
|
3543
3712
|
"id": "osm-road-names",
|
|
3544
3713
|
"type": "symbol",
|