@open-pioneer/map 0.3.0 → 0.3.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/CHANGELOG.md +6 -0
- package/api/BaseFeature.d.ts +31 -0
- package/api/index.d.ts +2 -1
- package/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Geometry } from "ol/geom";
|
|
2
|
+
import { Style } from "ol/style";
|
|
3
|
+
/**
|
|
4
|
+
* Base interface for all feature objects with geometry and / or attributs information.
|
|
5
|
+
*/
|
|
6
|
+
export interface BaseFeature {
|
|
7
|
+
/**
|
|
8
|
+
* Identifier for the feature object. Must be unique within all features of one source/layer.
|
|
9
|
+
*
|
|
10
|
+
* If your source cannot provide a useful id on its own, another strategy to generate unique ids is to
|
|
11
|
+
* generate a [UUID](https://www.npmjs.com/package/uuid#uuidv4options-buffer-offset) instead.
|
|
12
|
+
*/
|
|
13
|
+
id: number | string;
|
|
14
|
+
/**
|
|
15
|
+
* Geometry of the feature.
|
|
16
|
+
* Also specify the {@link projection} if geometry is set.
|
|
17
|
+
*/
|
|
18
|
+
geometry?: Geometry;
|
|
19
|
+
/**
|
|
20
|
+
* The projection of the {@link geometry}.
|
|
21
|
+
*/
|
|
22
|
+
projection?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Properties of the feature.
|
|
25
|
+
*/
|
|
26
|
+
properties?: Readonly<Record<string, unknown>>;
|
|
27
|
+
/**
|
|
28
|
+
* Additional style information for displaying the feature on the map.
|
|
29
|
+
*/
|
|
30
|
+
style?: Style;
|
|
31
|
+
}
|
package/api/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./BaseFeature";
|
|
1
2
|
export * from "./MapConfig";
|
|
2
3
|
export * from "./MapModel";
|
|
3
4
|
export * from "./MapRegistry";
|
|
@@ -5,7 +6,7 @@ export * from "./layers";
|
|
|
5
6
|
export * from "./shared";
|
|
6
7
|
export { getProjection, registerProjections, type ProjectionDefinition } from "../projections";
|
|
7
8
|
export { BkgTopPlusOpen, type BkgTopPlusOpenProps } from "../layers/BkgTopPlusOpen";
|
|
8
|
-
export {
|
|
9
|
+
export { useView, useProjection, useResolution, useCenter, useScale } from "../ui/hooks";
|
|
9
10
|
export { MapAnchor, type MapAnchorProps, type MapAnchorPosition } from "../ui/MapAnchor";
|
|
10
11
|
export { MapContainer, type MapContainerProps } from "../ui/MapContainer";
|
|
11
12
|
export { useMapModel, type UseMapModelResult, type UseMapModelLoading, type UseMapModelResolved, type UseMapModelRejected } from "../ui/useMapModel";
|
package/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { WMSLayer } from './api/layers/WMSLayer.js';
|
|
|
3
3
|
export { WMTSLayer } from './api/layers/WMTSLayer.js';
|
|
4
4
|
export { getProjection, registerProjections } from './projections.js';
|
|
5
5
|
export { BkgTopPlusOpen } from './layers/BkgTopPlusOpen.js';
|
|
6
|
-
export { useCenter, useProjection, useResolution, useScale } from './ui/hooks.js';
|
|
6
|
+
export { useCenter, useProjection, useResolution, useScale, useView } from './ui/hooks.js';
|
|
7
7
|
export { MapAnchor } from './ui/MapAnchor.js';
|
|
8
8
|
export { MapContainer } from './ui/MapContainer.js';
|
|
9
9
|
export { useMapModel } from './ui/useMapModel.js';
|