@opensystemslab/map 0.6.1 → 0.6.2
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/dist/component-lib.es.js +8685 -8642
- package/dist/component-lib.umd.js +36 -75
- package/dist/index.html +1 -1
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/types/components/my-map/drawing.d.ts +3 -2
- package/types/components/my-map/index.d.ts +4 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@opensystemslab/map",
|
3
|
-
"version": "0.6.
|
3
|
+
"version": "0.6.2",
|
4
4
|
"license": "OGL-UK-3.0",
|
5
5
|
"private": false,
|
6
6
|
"repository": {
|
@@ -42,16 +42,16 @@
|
|
42
42
|
"@testing-library/user-event": "^14.4.3",
|
43
43
|
"@types/node": "^18.6.3",
|
44
44
|
"@types/proj4": "^2.5.2",
|
45
|
-
"@vitest/ui": "^0.
|
46
|
-
"happy-dom": "^
|
45
|
+
"@vitest/ui": "^0.25.5",
|
46
|
+
"happy-dom": "^8.1.0",
|
47
47
|
"husky": "^8.0.1",
|
48
48
|
"lint-staged": "^13.0.3",
|
49
49
|
"prettier": "^2.3.2",
|
50
50
|
"rollup-plugin-postcss-lit": "^2.0.0",
|
51
51
|
"sass": "^1.44.0",
|
52
52
|
"typescript": "^4.3.5",
|
53
|
-
"vite": "^
|
54
|
-
"vitest": "0.
|
53
|
+
"vite": "^4.0.0",
|
54
|
+
"vitest": "0.25.6",
|
55
55
|
"wait-for-expect": "^3.0.2"
|
56
56
|
},
|
57
57
|
"engines": {
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { Draw, Modify, Snap } from "ol/interaction";
|
2
2
|
import { Vector as VectorLayer } from "ol/layer";
|
3
3
|
import { Vector as VectorSource } from "ol/source";
|
4
|
+
export declare type DrawTypeEnum = "Polygon" | "Point";
|
4
5
|
export declare type DrawPointerEnum = "crosshair" | "dot";
|
5
6
|
export declare const drawingSource: VectorSource<import("ol/geom/Geometry").default>;
|
6
|
-
export declare
|
7
|
-
export declare function configureDraw(pointerStyle: DrawPointerEnum): Draw;
|
7
|
+
export declare function configureDrawingLayer(drawType: DrawTypeEnum, pointColor: string): VectorLayer<VectorSource<import("ol/geom/Geometry").default>>;
|
8
|
+
export declare function configureDraw(drawType: DrawTypeEnum, pointerStyle: DrawPointerEnum, pointColor: string): Draw;
|
8
9
|
export declare const snap: Snap;
|
9
10
|
export declare function configureModify(pointerStyle: DrawPointerEnum): Modify;
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { LitElement } from "lit";
|
2
2
|
import Map from "ol/Map";
|
3
|
-
import { DrawPointerEnum } from "./drawing";
|
3
|
+
import { DrawPointerEnum, DrawTypeEnum } from "./drawing";
|
4
4
|
import { ProjectionEnum } from "./projections";
|
5
5
|
import { AreaUnitEnum } from "./utils";
|
6
6
|
declare type MarkerImageEnum = "circle" | "pin";
|
7
|
-
declare type ResetControlImageEnum = "unicode" | "
|
7
|
+
declare type ResetControlImageEnum = "unicode" | "trash";
|
8
8
|
export declare class MyMap extends LitElement {
|
9
9
|
static styles: import("lit").CSSResult;
|
10
10
|
id: string;
|
@@ -15,6 +15,8 @@ export declare class MyMap extends LitElement {
|
|
15
15
|
minZoom: number;
|
16
16
|
maxZoom: number;
|
17
17
|
drawMode: boolean;
|
18
|
+
drawType: DrawTypeEnum;
|
19
|
+
drawPointColor: string;
|
18
20
|
drawGeojsonData: {
|
19
21
|
type: string;
|
20
22
|
geometry: {};
|