@opensystemslab/map 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/component-lib.es.js +4 -27337
- package/dist/component-lib.umd.js +121 -35
- package/dist/html2canvas.esm-f5b1510b.mjs +4493 -0
- package/dist/index-2b9d009c.mjs +37497 -0
- package/dist/index.es-cf34b742.mjs +5567 -0
- package/dist/index.html +3 -3
- package/dist/purify.es-22c1781a.mjs +451 -0
- package/dist/style.css +1 -1
- package/package.json +8 -3
- package/types/components/my-map/controls.d.ts +30 -0
- package/types/components/my-map/index.d.ts +1 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@opensystemslab/map",
|
3
|
-
"version": "0.7.
|
3
|
+
"version": "0.7.2",
|
4
4
|
"license": "OGL-UK-3.0",
|
5
5
|
"private": false,
|
6
6
|
"repository": {
|
@@ -28,9 +28,12 @@
|
|
28
28
|
"dependencies": {
|
29
29
|
"@turf/union": "^6.5.0",
|
30
30
|
"accessible-autocomplete": "^2.0.4",
|
31
|
+
"file-saver": "^2.0.5",
|
31
32
|
"govuk-frontend": "^4.0.1",
|
33
|
+
"jspdf": "^2.5.1",
|
32
34
|
"lit": "^2.3.1",
|
33
35
|
"ol": "^7.0.0",
|
36
|
+
"ol-ext": "^4.0.4",
|
34
37
|
"ol-mapbox-style": "^9.0.0",
|
35
38
|
"postcode": "^5.1.0",
|
36
39
|
"proj4": "^2.8.0",
|
@@ -38,9 +41,11 @@
|
|
38
41
|
},
|
39
42
|
"devDependencies": {
|
40
43
|
"@glorious/pitsby": "^1.30.16",
|
41
|
-
"@testing-library/dom": "^
|
44
|
+
"@testing-library/dom": "^9.0.0",
|
42
45
|
"@testing-library/user-event": "^14.4.3",
|
46
|
+
"@types/file-saver": "^2.0.5",
|
43
47
|
"@types/node": "^18.6.3",
|
48
|
+
"@types/ol-ext": "npm:@siedlerchr/types-ol-ext@^3.0.9",
|
44
49
|
"@types/proj4": "^2.5.2",
|
45
50
|
"@vitest/ui": "^0.28.4",
|
46
51
|
"happy-dom": "^8.1.0",
|
@@ -51,7 +56,7 @@
|
|
51
56
|
"sass": "^1.44.0",
|
52
57
|
"typescript": "^4.3.5",
|
53
58
|
"vite": "^4.0.0",
|
54
|
-
"vitest": "0.
|
59
|
+
"vitest": "0.28.5",
|
55
60
|
"wait-for-expect": "^3.0.2"
|
56
61
|
},
|
57
62
|
"engines": {
|
@@ -1,5 +1,35 @@
|
|
1
|
+
import Map from "ol/Map";
|
1
2
|
import { Control, ScaleLine } from "ol/control";
|
2
3
|
import "ol/ol.css";
|
4
|
+
import "ol-ext/dist/ol-ext.css";
|
5
|
+
import PrintDialog from "ol-ext/control/PrintDialog";
|
6
|
+
import { Options } from "ol-ext/control/PrintDialog";
|
3
7
|
export declare function scaleControl(useScaleBarStyle: boolean): ScaleLine;
|
4
8
|
export declare function northArrowControl(): Control;
|
5
9
|
export declare function resetControl(listener: any, icon: string): Control;
|
10
|
+
export interface PrintControlOptions extends Options {
|
11
|
+
map: Map;
|
12
|
+
}
|
13
|
+
export declare class PrintControl extends PrintDialog {
|
14
|
+
mainMap: Map;
|
15
|
+
constructor({ map }: PrintControlOptions);
|
16
|
+
/**
|
17
|
+
* Toggle scaleControl when printControl is open
|
18
|
+
* Instead, display CanvasScaleLine which can be printed
|
19
|
+
*/
|
20
|
+
private setupCanvasScaleLine;
|
21
|
+
/**
|
22
|
+
* Setup custom styling and event listeners of print button displayed on map
|
23
|
+
*/
|
24
|
+
private setupPrintButton;
|
25
|
+
/**
|
26
|
+
* Display scale (1:XXX) on CanvasScaleLine control
|
27
|
+
* This can not natively be done with this element, but it has all the inherited
|
28
|
+
* functions from OL ScaleLine to allow us to set this
|
29
|
+
*/
|
30
|
+
private syncScaleText;
|
31
|
+
/**
|
32
|
+
* Hide browser dialog
|
33
|
+
*/
|
34
|
+
private customiseContent;
|
35
|
+
}
|