@ndwnu/map 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ndwnu-map.mjs +8 -8
- package/fesm2022/ndwnu-map.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/style/style.json +3170 -0
- package/types/ndwnu-map.d.ts +12 -8
package/types/ndwnu-map.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as maplibre_gl from 'maplibre-gl';
|
|
2
|
-
import {
|
|
2
|
+
import { MapMouseEvent, MapGeoJSONFeature, LayerSpecification, FilterSpecification, SourceSpecification, Map, BackgroundLayerSpecification, StyleSpecification, LngLatBoundsLike, LngLatLike, AnimationOptions, DataDrivenPropertyValueSpecification } from 'maplibre-gl';
|
|
3
3
|
import * as rxjs from 'rxjs';
|
|
4
4
|
import { Subject, Observable } from 'rxjs';
|
|
5
5
|
import { Feature, FeatureCollection } from 'geojson';
|
|
@@ -20,9 +20,10 @@ declare abstract class MapLayer<TElementType, TFilter = unknown, TLegendItem = u
|
|
|
20
20
|
onInit(): void;
|
|
21
21
|
onDestroy(): void;
|
|
22
22
|
setVisible(visible: boolean): void;
|
|
23
|
-
protected onClick?(
|
|
23
|
+
protected onClick?(event: ClickEvent): void;
|
|
24
24
|
protected abstract getSpecification(): Partial<LayerSpecification>;
|
|
25
25
|
getFilterSpecification?(filter?: TFilter): FilterSpecification;
|
|
26
|
+
getFeatures(event: ClickEvent): Feature[];
|
|
26
27
|
}
|
|
27
28
|
type ClickEvent = MapMouseEvent & {
|
|
28
29
|
features?: MapGeoJSONFeature[];
|
|
@@ -148,7 +149,7 @@ declare abstract class MapElementRepository<TElementType, TFilter = unknown, TLe
|
|
|
148
149
|
* @param elementId - The ID of the element to update
|
|
149
150
|
* @param visible - Whether the element should be visible or hidden
|
|
150
151
|
*/
|
|
151
|
-
|
|
152
|
+
setMapElementVisibility(elementId: TElementType, visible: boolean): void;
|
|
152
153
|
/**
|
|
153
154
|
* Shows a map element by its ID and updates the subject with the new state.
|
|
154
155
|
*
|
|
@@ -310,13 +311,16 @@ declare abstract class MapComponent implements AfterViewInit, OnDestroy {
|
|
|
310
311
|
declare const BOUNDS_NL: [LngLatLike, LngLatLike];
|
|
311
312
|
declare const BOUNDS_AMERSFOORT: [LngLatLike, LngLatLike];
|
|
312
313
|
declare const lineWidthFrcSpecification: DataDrivenPropertyValueSpecification<number>;
|
|
314
|
+
type LayerGroup = 'context-map' | 'context-aerial' | 'context-roads' | 'context-admin' | 'context-labels' | 'relevant-roads' | 'relevant-admin';
|
|
315
|
+
type LayerSubGroup = 'administrative-division' | 'background-blue' | 'background-green' | 'background-grey' | 'background-yellow' | 'bgt-housenumbers' | 'brt-place-names' | 'fcd-segments' | 'ndw-nwb-road-sections' | 'nwb-hectometersigns' | 'nwb-oneway-signs' | 'nwb-road-names' | 'railway' | 'wkd-parking-areas';
|
|
316
|
+
interface LayerMetadata {
|
|
317
|
+
group: LayerGroup;
|
|
318
|
+
'sub-group'?: LayerSubGroup;
|
|
319
|
+
}
|
|
313
320
|
type NdwLayerSpecification = LayerSpecification & {
|
|
314
|
-
metadata:
|
|
315
|
-
group: string;
|
|
316
|
-
subGroup: string;
|
|
317
|
-
};
|
|
321
|
+
metadata: LayerMetadata;
|
|
318
322
|
};
|
|
319
323
|
type NdwLayerFilterFunction = (layer: NdwLayerSpecification) => boolean;
|
|
320
324
|
|
|
321
325
|
export { ApiBackgroundLayer, ApiElement, ApiLayer, ApiSource, BOUNDS_AMERSFOORT, BOUNDS_NL, COMMON_BOUNDS, DEFAULT_MAP_CONFIG, MapComponent, MapElement, MapElementRepository, MapLayer, MapSource, MaplibreCursorService, lineWidthFrcSpecification };
|
|
322
|
-
export type { ClickEvent, LayerFilterFunction, MapConfig, MapElementConfig, NdwLayerFilterFunction, NdwLayerSpecification };
|
|
326
|
+
export type { ClickEvent, LayerFilterFunction, LayerGroup, LayerMetadata, LayerSubGroup, MapConfig, MapElementConfig, NdwLayerFilterFunction, NdwLayerSpecification };
|