@opensystemslab/map 0.6.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opensystemslab/map",
3
- "version": "0.6.0",
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.23.2",
46
- "happy-dom": "^6.0.4",
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": "^3.0.4",
54
- "vitest": "0.20.3",
53
+ "vite": "^4.0.0",
54
+ "vitest": "0.25.6",
55
55
  "wait-for-expect": "^3.0.2"
56
56
  },
57
57
  "engines": {
@@ -1,4 +1,5 @@
1
- import "ol/ol.css";
2
1
  import { Control, ScaleLine } from "ol/control";
2
+ import "ol/ol.css";
3
3
  export declare function scaleControl(useScaleBarStyle: boolean): ScaleLine;
4
4
  export declare function northArrowControl(): Control;
5
+ export declare function resetControl(listener: any, icon: string): Control;
@@ -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 const drawingLayer: VectorLayer<VectorSource<import("ol/geom/Geometry").default>>;
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,9 +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" | "trash";
7
8
  export declare class MyMap extends LitElement {
8
9
  static styles: import("lit").CSSResult;
9
10
  id: string;
@@ -14,6 +15,8 @@ export declare class MyMap extends LitElement {
14
15
  minZoom: number;
15
16
  maxZoom: number;
16
17
  drawMode: boolean;
18
+ drawType: DrawTypeEnum;
19
+ drawPointColor: string;
17
20
  drawGeojsonData: {
18
21
  type: string;
19
22
  geometry: {};
@@ -43,6 +46,7 @@ export declare class MyMap extends LitElement {
43
46
  osFeaturesApiKey: string;
44
47
  osCopyright: string;
45
48
  hideResetControl: boolean;
49
+ resetControlImage: ResetControlImageEnum;
46
50
  staticMode: boolean;
47
51
  areaUnit: AreaUnitEnum;
48
52
  showScale: boolean;