@geoit/ui 0.1.1 → 0.2.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/ai/README.md +1 -1
- package/ai/catalog.json +2 -2
- package/ai/components/geo-map.md +7 -5
- package/ai/mockup.html +2 -2
- package/esm2022/lib/figma/geo-map/geo-map.types.mjs +1 -1
- package/esm2022/lib/figma/geo-map/services/geo-map-layer.service.mjs +49 -1
- package/fesm2022/geoit-ui.mjs +48 -0
- package/fesm2022/geoit-ui.mjs.map +1 -1
- package/lib/figma/geo-map/geo-map.types.d.ts +20 -2
- package/lib/figma/geo-map/services/geo-map-layer.service.d.ts +1 -0
- package/package.json +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Feature from 'ol/Feature';
|
|
2
2
|
import type Geometry from 'ol/geom/Geometry';
|
|
3
3
|
/** Supported map layer source kinds. */
|
|
4
|
-
export type GeoMapLayerType = 'osm' | 'xyz' | 'wms' | 'wmts' | 'vector' | 'geojson';
|
|
4
|
+
export type GeoMapLayerType = 'osm' | 'xyz' | 'wms' | 'wmts' | 'vector' | 'geojson' | 'mapbox-style';
|
|
5
5
|
/** Layer load lifecycle for panel / chrome. */
|
|
6
6
|
export type GeoMapLayerStatus = 'idle' | 'loading' | 'ready' | 'error';
|
|
7
7
|
export interface ProjectionConfig {
|
|
@@ -75,13 +75,31 @@ export interface GeoMapVectorLayerConfig extends GeoMapLayerBase {
|
|
|
75
75
|
/** Pre-built OL features (app-owned). */
|
|
76
76
|
features?: Feature<Geometry>[];
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Vector basemap driven by a Mapbox/MapLibre style document, applied via `ol-mapbox-style`.
|
|
80
|
+
* One of `styleJson`/`styleUrl` is required. `transformRequest` is forwarded verbatim to
|
|
81
|
+
* `ol-mapbox-style` — the library never inspects or stores it, so host-app auth headers
|
|
82
|
+
* (e.g. an API key) stay owned by the app, not the library.
|
|
83
|
+
*/
|
|
84
|
+
export interface GeoMapMapboxStyleLayerConfig extends GeoMapLayerBase {
|
|
85
|
+
type: 'mapbox-style';
|
|
86
|
+
styleJson?: Record<string, unknown>;
|
|
87
|
+
styleUrl?: string;
|
|
88
|
+
transformRequest?: (url: string, resourceType: string) => Request | void;
|
|
89
|
+
}
|
|
90
|
+
export type GeoMapLayerConfig = GeoMapOsmLayerConfig | GeoMapXyzLayerConfig | GeoMapWmsLayerConfig | GeoMapWmtsLayerConfig | GeoMapGeoJsonLayerConfig | GeoMapVectorLayerConfig | GeoMapMapboxStyleLayerConfig;
|
|
79
91
|
export type GeoMapBasemapInput = 'osm' | {
|
|
80
92
|
type: 'xyz';
|
|
81
93
|
url: string;
|
|
82
94
|
attributions?: string | string[];
|
|
83
95
|
maxZoom?: number;
|
|
84
96
|
title?: string;
|
|
97
|
+
} | {
|
|
98
|
+
type: 'mapbox-style';
|
|
99
|
+
styleJson?: Record<string, unknown>;
|
|
100
|
+
styleUrl?: string;
|
|
101
|
+
title?: string;
|
|
102
|
+
transformRequest?: (url: string, resourceType: string) => Request | void;
|
|
85
103
|
};
|
|
86
104
|
/** Alias used by basemap switcher output. */
|
|
87
105
|
export type GeoMapBasemap = GeoMapBasemapInput;
|
|
@@ -37,6 +37,7 @@ export declare class GeoMapLayerService {
|
|
|
37
37
|
private createWmtsLayer;
|
|
38
38
|
private createGeoJsonLayer;
|
|
39
39
|
private createVectorLayer;
|
|
40
|
+
private createMapboxStyleLayer;
|
|
40
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<GeoMapLayerService, never>;
|
|
41
42
|
static ɵprov: i0.ɵɵInjectableDeclaration<GeoMapLayerService>;
|
|
42
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geoit/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "GEO UI — Angular 18 + ng-zorro design system components",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/animations": "^18.2.0",
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"@ant-design/icons-angular": "^18.0.0",
|
|
12
12
|
"ng-zorro-antd": "^18.2.0",
|
|
13
13
|
"ol": "^10.0.0",
|
|
14
|
+
"ol-mapbox-style": "^13.4.3",
|
|
14
15
|
"proj4": "^2.11.0"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|