ol 7.0.0-dev.1660166153885 → 7.0.0-dev.1660257572655
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/Map.d.ts +2 -2
- package/Map.js +4 -4
- package/control/defaults.d.ts +60 -0
- package/control/defaults.d.ts.map +1 -0
- package/control/defaults.js +60 -0
- package/control.d.ts +1 -61
- package/control.d.ts.map +1 -1
- package/control.js +1 -60
- package/format/GMLBase.d.ts.map +1 -1
- package/format/GMLBase.js +2 -6
- package/format/KML.d.ts +0 -3
- package/format/KML.d.ts.map +1 -1
- package/format/KML.js +0 -3
- package/format/readme.md +1 -2
- package/interaction/DragAndDrop.d.ts +0 -4
- package/interaction/DragAndDrop.d.ts.map +1 -1
- package/interaction/DragAndDrop.js +0 -4
- package/interaction/defaults.d.ts +101 -0
- package/interaction/defaults.d.ts.map +1 -0
- package/interaction/defaults.js +148 -0
- package/interaction.d.ts +1 -99
- package/interaction.d.ts.map +1 -1
- package/interaction.js +1 -146
- package/package.json +1 -1
- package/reproj.js +1 -1
- package/style/Icon.d.ts +4 -4
- package/style/Icon.js +2 -2
- package/util.js +1 -1
package/Map.d.ts
CHANGED
|
@@ -151,7 +151,7 @@ export type MapEventHandler<Return> = import("./Observable").OnSignature<import(
|
|
|
151
151
|
export type MapOptions = {
|
|
152
152
|
/**
|
|
153
153
|
* Controls initially added to the map. If not specified,
|
|
154
|
-
* {@link module :ol/control.defaults} is used.
|
|
154
|
+
* {@link module :ol/control/defaults.defaults} is used.
|
|
155
155
|
*/
|
|
156
156
|
controls?: Collection<import("./control/Control.js").default> | import("./control/Control.js").default[] | undefined;
|
|
157
157
|
/**
|
|
@@ -161,7 +161,7 @@ export type MapOptions = {
|
|
|
161
161
|
pixelRatio?: number | undefined;
|
|
162
162
|
/**
|
|
163
163
|
* Interactions that are initially added to the map. If not specified,
|
|
164
|
-
* {@link module :ol/interaction.defaults} is used.
|
|
164
|
+
* {@link module :ol/interaction/defaults.defaults} is used.
|
|
165
165
|
*/
|
|
166
166
|
interactions?: Collection<import("./interaction/Interaction.js").default> | import("./interaction/Interaction.js").default[] | undefined;
|
|
167
167
|
/**
|
package/Map.js
CHANGED
|
@@ -34,8 +34,8 @@ import {
|
|
|
34
34
|
getForViewAndSize,
|
|
35
35
|
isEmpty,
|
|
36
36
|
} from './extent.js';
|
|
37
|
-
import {defaults as defaultControls} from './control.js';
|
|
38
|
-
import {defaults as defaultInteractions} from './interaction.js';
|
|
37
|
+
import {defaults as defaultControls} from './control/defaults.js';
|
|
38
|
+
import {defaults as defaultInteractions} from './interaction/defaults.js';
|
|
39
39
|
import {fromUserCoordinate, toUserCoordinate} from './proj.js';
|
|
40
40
|
import {getUid} from './util.js';
|
|
41
41
|
import {hasArea} from './size.js';
|
|
@@ -115,12 +115,12 @@ import {removeNode} from './dom.js';
|
|
|
115
115
|
* @typedef {Object} MapOptions
|
|
116
116
|
* @property {Collection<import("./control/Control.js").default>|Array<import("./control/Control.js").default>} [controls]
|
|
117
117
|
* Controls initially added to the map. If not specified,
|
|
118
|
-
* {@link module:ol/control.defaults} is used.
|
|
118
|
+
* {@link module:ol/control/defaults.defaults} is used.
|
|
119
119
|
* @property {number} [pixelRatio=window.devicePixelRatio] The ratio between
|
|
120
120
|
* physical pixels and device-independent pixels (dips) on the device.
|
|
121
121
|
* @property {Collection<import("./interaction/Interaction.js").default>|Array<import("./interaction/Interaction.js").default>} [interactions]
|
|
122
122
|
* Interactions that are initially added to the map. If not specified,
|
|
123
|
-
* {@link module:ol/interaction.defaults} is used.
|
|
123
|
+
* {@link module:ol/interaction/defaults.defaults} is used.
|
|
124
124
|
* @property {HTMLElement|Document|string} [keyboardEventTarget] The element to
|
|
125
125
|
* listen to keyboard events on. This determines when the `KeyboardPan` and
|
|
126
126
|
* `KeyboardZoom` interactions trigger. For example, if this option is set to
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} DefaultsOptions
|
|
3
|
+
* @property {boolean} [attribution=true] Include
|
|
4
|
+
* {@link module:ol/control/Attribution~Attribution}.
|
|
5
|
+
* @property {import("./Attribution.js").Options} [attributionOptions]
|
|
6
|
+
* Options for {@link module:ol/control/Attribution~Attribution}.
|
|
7
|
+
* @property {boolean} [rotate=true] Include
|
|
8
|
+
* {@link module:ol/control/Rotate~Rotate}.
|
|
9
|
+
* @property {import("./Rotate.js").Options} [rotateOptions] Options
|
|
10
|
+
* for {@link module:ol/control/Rotate~Rotate}.
|
|
11
|
+
* @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.
|
|
12
|
+
* @property {import("./Zoom.js").Options} [zoomOptions] Options for
|
|
13
|
+
* {@link module:ol/control/Zoom~Zoom}.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Set of controls included in maps by default. Unless configured otherwise,
|
|
17
|
+
* this returns a collection containing an instance of each of the following
|
|
18
|
+
* controls:
|
|
19
|
+
* * {@link module:ol/control/Zoom~Zoom}
|
|
20
|
+
* * {@link module:ol/control/Rotate~Rotate}
|
|
21
|
+
* * {@link module:ol/control/Attribution~Attribution}
|
|
22
|
+
*
|
|
23
|
+
* @param {DefaultsOptions} [opt_options] Options for the default controls.
|
|
24
|
+
* @return {Collection<import("./Control.js").default>} A collection of controls
|
|
25
|
+
* to be used with the {@link module:ol/Map~Map} constructor's `controls` option.
|
|
26
|
+
* @api
|
|
27
|
+
*/
|
|
28
|
+
export function defaults(opt_options?: DefaultsOptions | undefined): Collection<import("./Control.js").default>;
|
|
29
|
+
export type DefaultsOptions = {
|
|
30
|
+
/**
|
|
31
|
+
* Include
|
|
32
|
+
* {@link module :ol/control/Attribution~Attribution}.
|
|
33
|
+
*/
|
|
34
|
+
attribution?: boolean | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Options for {@link module :ol/control/Attribution~Attribution}.
|
|
37
|
+
*/
|
|
38
|
+
attributionOptions?: import("./Attribution.js").Options | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Include
|
|
41
|
+
* {@link module :ol/control/Rotate~Rotate}.
|
|
42
|
+
*/
|
|
43
|
+
rotate?: boolean | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Options
|
|
46
|
+
* for {@link module :ol/control/Rotate~Rotate}.
|
|
47
|
+
*/
|
|
48
|
+
rotateOptions?: import("./Rotate.js").Options | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Include {@link module :ol/control/Zoom~Zoom}.
|
|
51
|
+
*/
|
|
52
|
+
zoom?: boolean | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Options for
|
|
55
|
+
* {@link module :ol/control/Zoom~Zoom}.
|
|
56
|
+
*/
|
|
57
|
+
zoomOptions?: import("./Zoom.js").Options | undefined;
|
|
58
|
+
};
|
|
59
|
+
import Collection from "../Collection.js";
|
|
60
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["defaults.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;;GAYG;AACH,qEAJY,WAAW,OAAO,cAAc,EAAE,OAAO,CAAC,CA2BrD"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ol/control/defaults
|
|
3
|
+
*/
|
|
4
|
+
import Attribution from './Attribution.js';
|
|
5
|
+
import Collection from '../Collection.js';
|
|
6
|
+
import Rotate from './Rotate.js';
|
|
7
|
+
import Zoom from './Zoom.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {Object} DefaultsOptions
|
|
11
|
+
* @property {boolean} [attribution=true] Include
|
|
12
|
+
* {@link module:ol/control/Attribution~Attribution}.
|
|
13
|
+
* @property {import("./Attribution.js").Options} [attributionOptions]
|
|
14
|
+
* Options for {@link module:ol/control/Attribution~Attribution}.
|
|
15
|
+
* @property {boolean} [rotate=true] Include
|
|
16
|
+
* {@link module:ol/control/Rotate~Rotate}.
|
|
17
|
+
* @property {import("./Rotate.js").Options} [rotateOptions] Options
|
|
18
|
+
* for {@link module:ol/control/Rotate~Rotate}.
|
|
19
|
+
* @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.
|
|
20
|
+
* @property {import("./Zoom.js").Options} [zoomOptions] Options for
|
|
21
|
+
* {@link module:ol/control/Zoom~Zoom}.
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Set of controls included in maps by default. Unless configured otherwise,
|
|
26
|
+
* this returns a collection containing an instance of each of the following
|
|
27
|
+
* controls:
|
|
28
|
+
* * {@link module:ol/control/Zoom~Zoom}
|
|
29
|
+
* * {@link module:ol/control/Rotate~Rotate}
|
|
30
|
+
* * {@link module:ol/control/Attribution~Attribution}
|
|
31
|
+
*
|
|
32
|
+
* @param {DefaultsOptions} [opt_options] Options for the default controls.
|
|
33
|
+
* @return {Collection<import("./Control.js").default>} A collection of controls
|
|
34
|
+
* to be used with the {@link module:ol/Map~Map} constructor's `controls` option.
|
|
35
|
+
* @api
|
|
36
|
+
*/
|
|
37
|
+
export function defaults(opt_options) {
|
|
38
|
+
const options = opt_options ? opt_options : {};
|
|
39
|
+
|
|
40
|
+
/** @type {Collection<import("./Control.js").default>} */
|
|
41
|
+
const controls = new Collection();
|
|
42
|
+
|
|
43
|
+
const zoomControl = options.zoom !== undefined ? options.zoom : true;
|
|
44
|
+
if (zoomControl) {
|
|
45
|
+
controls.push(new Zoom(options.zoomOptions));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const rotateControl = options.rotate !== undefined ? options.rotate : true;
|
|
49
|
+
if (rotateControl) {
|
|
50
|
+
controls.push(new Rotate(options.rotateOptions));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const attributionControl =
|
|
54
|
+
options.attribution !== undefined ? options.attribution : true;
|
|
55
|
+
if (attributionControl) {
|
|
56
|
+
controls.push(new Attribution(options.attributionOptions));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return controls;
|
|
60
|
+
}
|
package/control.d.ts
CHANGED
|
@@ -1,33 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Object} DefaultsOptions
|
|
3
|
-
* @property {boolean} [attribution=true] Include
|
|
4
|
-
* {@link module:ol/control/Attribution~Attribution}.
|
|
5
|
-
* @property {import("./control/Attribution.js").Options} [attributionOptions]
|
|
6
|
-
* Options for {@link module:ol/control/Attribution~Attribution}.
|
|
7
|
-
* @property {boolean} [rotate=true] Include
|
|
8
|
-
* {@link module:ol/control/Rotate~Rotate}.
|
|
9
|
-
* @property {import("./control/Rotate.js").Options} [rotateOptions] Options
|
|
10
|
-
* for {@link module:ol/control/Rotate~Rotate}.
|
|
11
|
-
* @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.
|
|
12
|
-
* @property {import("./control/Zoom.js").Options} [zoomOptions] Options for
|
|
13
|
-
* {@link module:ol/control/Zoom~Zoom}.
|
|
14
|
-
* @api
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Set of controls included in maps by default. Unless configured otherwise,
|
|
18
|
-
* this returns a collection containing an instance of each of the following
|
|
19
|
-
* controls:
|
|
20
|
-
* * {@link module:ol/control/Zoom~Zoom}
|
|
21
|
-
* * {@link module:ol/control/Rotate~Rotate}
|
|
22
|
-
* * {@link module:ol/control/Attribution~Attribution}
|
|
23
|
-
*
|
|
24
|
-
* @param {DefaultsOptions} [opt_options]
|
|
25
|
-
* Defaults options.
|
|
26
|
-
* @return {Collection<import("./control/Control.js").default>}
|
|
27
|
-
* Controls.
|
|
28
|
-
* @api
|
|
29
|
-
*/
|
|
30
|
-
export function defaults(opt_options?: DefaultsOptions | undefined): Collection<import("./control/Control.js").default>;
|
|
31
1
|
export { default as Attribution } from "./control/Attribution.js";
|
|
32
2
|
export { default as Control } from "./control/Control.js";
|
|
33
3
|
export { default as FullScreen } from "./control/FullScreen.js";
|
|
@@ -38,35 +8,5 @@ export { default as ScaleLine } from "./control/ScaleLine.js";
|
|
|
38
8
|
export { default as Zoom } from "./control/Zoom.js";
|
|
39
9
|
export { default as ZoomSlider } from "./control/ZoomSlider.js";
|
|
40
10
|
export { default as ZoomToExtent } from "./control/ZoomToExtent.js";
|
|
41
|
-
export
|
|
42
|
-
/**
|
|
43
|
-
* Include
|
|
44
|
-
* {@link module :ol/control/Attribution~Attribution}.
|
|
45
|
-
*/
|
|
46
|
-
attribution?: boolean | undefined;
|
|
47
|
-
/**
|
|
48
|
-
* Options for {@link module :ol/control/Attribution~Attribution}.
|
|
49
|
-
*/
|
|
50
|
-
attributionOptions?: import("./control/Attribution.js").Options | undefined;
|
|
51
|
-
/**
|
|
52
|
-
* Include
|
|
53
|
-
* {@link module :ol/control/Rotate~Rotate}.
|
|
54
|
-
*/
|
|
55
|
-
rotate?: boolean | undefined;
|
|
56
|
-
/**
|
|
57
|
-
* Options
|
|
58
|
-
* for {@link module :ol/control/Rotate~Rotate}.
|
|
59
|
-
*/
|
|
60
|
-
rotateOptions?: import("./control/Rotate.js").Options | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* Include {@link module :ol/control/Zoom~Zoom}.
|
|
63
|
-
*/
|
|
64
|
-
zoom?: boolean | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* Options for
|
|
67
|
-
* {@link module :ol/control/Zoom~Zoom}.
|
|
68
|
-
*/
|
|
69
|
-
zoomOptions?: import("./control/Zoom.js").Options | undefined;
|
|
70
|
-
};
|
|
71
|
-
import Collection from "./Collection.js";
|
|
11
|
+
export { defaults } from "./control/defaults.js";
|
|
72
12
|
//# sourceMappingURL=control.d.ts.map
|
package/control.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["control.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"control.d.ts","sourceRoot":"","sources":["control.js"],"names":[],"mappings":""}
|
package/control.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module ol/control
|
|
3
3
|
*/
|
|
4
|
-
import Attribution from './control/Attribution.js';
|
|
5
|
-
import Collection from './Collection.js';
|
|
6
|
-
import Rotate from './control/Rotate.js';
|
|
7
|
-
import Zoom from './control/Zoom.js';
|
|
8
|
-
|
|
9
4
|
export {default as Attribution} from './control/Attribution.js';
|
|
10
5
|
export {default as Control} from './control/Control.js';
|
|
11
6
|
export {default as FullScreen} from './control/FullScreen.js';
|
|
@@ -16,58 +11,4 @@ export {default as ScaleLine} from './control/ScaleLine.js';
|
|
|
16
11
|
export {default as Zoom} from './control/Zoom.js';
|
|
17
12
|
export {default as ZoomSlider} from './control/ZoomSlider.js';
|
|
18
13
|
export {default as ZoomToExtent} from './control/ZoomToExtent.js';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @typedef {Object} DefaultsOptions
|
|
22
|
-
* @property {boolean} [attribution=true] Include
|
|
23
|
-
* {@link module:ol/control/Attribution~Attribution}.
|
|
24
|
-
* @property {import("./control/Attribution.js").Options} [attributionOptions]
|
|
25
|
-
* Options for {@link module:ol/control/Attribution~Attribution}.
|
|
26
|
-
* @property {boolean} [rotate=true] Include
|
|
27
|
-
* {@link module:ol/control/Rotate~Rotate}.
|
|
28
|
-
* @property {import("./control/Rotate.js").Options} [rotateOptions] Options
|
|
29
|
-
* for {@link module:ol/control/Rotate~Rotate}.
|
|
30
|
-
* @property {boolean} [zoom] Include {@link module:ol/control/Zoom~Zoom}.
|
|
31
|
-
* @property {import("./control/Zoom.js").Options} [zoomOptions] Options for
|
|
32
|
-
* {@link module:ol/control/Zoom~Zoom}.
|
|
33
|
-
* @api
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Set of controls included in maps by default. Unless configured otherwise,
|
|
38
|
-
* this returns a collection containing an instance of each of the following
|
|
39
|
-
* controls:
|
|
40
|
-
* * {@link module:ol/control/Zoom~Zoom}
|
|
41
|
-
* * {@link module:ol/control/Rotate~Rotate}
|
|
42
|
-
* * {@link module:ol/control/Attribution~Attribution}
|
|
43
|
-
*
|
|
44
|
-
* @param {DefaultsOptions} [opt_options]
|
|
45
|
-
* Defaults options.
|
|
46
|
-
* @return {Collection<import("./control/Control.js").default>}
|
|
47
|
-
* Controls.
|
|
48
|
-
* @api
|
|
49
|
-
*/
|
|
50
|
-
export function defaults(opt_options) {
|
|
51
|
-
const options = opt_options ? opt_options : {};
|
|
52
|
-
|
|
53
|
-
/** @type {Collection<import("./control/Control.js").default>} */
|
|
54
|
-
const controls = new Collection();
|
|
55
|
-
|
|
56
|
-
const zoomControl = options.zoom !== undefined ? options.zoom : true;
|
|
57
|
-
if (zoomControl) {
|
|
58
|
-
controls.push(new Zoom(options.zoomOptions));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const rotateControl = options.rotate !== undefined ? options.rotate : true;
|
|
62
|
-
if (rotateControl) {
|
|
63
|
-
controls.push(new Rotate(options.rotateOptions));
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const attributionControl =
|
|
67
|
-
options.attribution !== undefined ? options.attribution : true;
|
|
68
|
-
if (attributionControl) {
|
|
69
|
-
controls.push(new Attribution(options.attributionOptions));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return controls;
|
|
73
|
-
}
|
|
14
|
+
export {defaults} from './control/defaults.js';
|
package/format/GMLBase.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GMLBase.d.ts","sourceRoot":"","sources":["GMLBase.js"],"names":[],"mappings":"AA8BA;;;GAGG;AACH,oBAFU,MAAM,CAEkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"GMLBase.d.ts","sourceRoot":"","sources":["GMLBase.js"],"names":[],"mappings":"AA8BA;;;GAGG;AACH,oBAFU,MAAM,CAEkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA6BpC,MAAM;;;;;;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AE,OAAO,WAAW,EAAE,MAAM;;MAExB;IAM1C;;;OAGG;IACH;YAFiB,MAAM;gBAAS,MAAM,GAAE,OAAO,WAAW,EAAE,MAAM;;MAE3B;IAMvC;;;OAGG;IACH;YAFiB,MAAM;gBAAS,MAAM,GAAE,OAAO,WAAW,EAAE,MAAM;;MAEpC;CAnG7B"}
|
package/format/GMLBase.js
CHANGED
|
@@ -36,16 +36,12 @@ export const GMLNS = 'http://www.opengis.net/gml';
|
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
38
|
* A regular expression that matches if a string only contains whitespace
|
|
39
|
-
* characters. It will e.g. match `''`, `' '`, `'\n'` etc.
|
|
40
|
-
* space (0xa0) is explicitly included as IE doesn't include it in its
|
|
41
|
-
* definition of `\s`.
|
|
42
|
-
*
|
|
43
|
-
* Information from `goog.string.isEmptyOrWhitespace`: https://github.com/google/closure-library/blob/e877b1e/closure/goog/string/string.js#L156-L160
|
|
39
|
+
* characters. It will e.g. match `''`, `' '`, `'\n'` etc.
|
|
44
40
|
*
|
|
45
41
|
* @const
|
|
46
42
|
* @type {RegExp}
|
|
47
43
|
*/
|
|
48
|
-
const ONLY_WHITESPACE_RE =
|
|
44
|
+
const ONLY_WHITESPACE_RE = /^\s*$/;
|
|
49
45
|
|
|
50
46
|
/**
|
|
51
47
|
* @typedef {Object} Options
|
package/format/KML.d.ts
CHANGED
|
@@ -128,9 +128,6 @@ import Style from "../style/Style.js";
|
|
|
128
128
|
* geometry types, and into MultiPoint/MultiLineString/MultiPolygon if they are
|
|
129
129
|
* all of the same type.
|
|
130
130
|
*
|
|
131
|
-
* Note that the KML format uses the URL() constructor. Older browsers such as IE
|
|
132
|
-
* which do not support this will need a URL polyfill to be loaded before use.
|
|
133
|
-
*
|
|
134
131
|
* @api
|
|
135
132
|
*/
|
|
136
133
|
declare class KML extends XMLFeature {
|
package/format/KML.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KML.d.ts","sourceRoot":"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O,uBAAuB,EAAE,OAAO,CAED;IAEhD;;;OAGG;IACH,sBAEuB;IAEvB;;;OAGG;IACH,uBACoE;IAEpE;;OAEG;IACH,cAFU,OAAO,CAG+C;IAEhE;;;OAGG;IACH,sBAAuB;IAEvB;;;OAGG;IACH,wBACsE;IAEtE;;OAEG;IACH,cAFU,IAAI,GAAC,MAAM,CAGkD;IAEvE;;OAEG;IACH,kBAFU,eAAe,CAIC;IAK5B;;;;;OAKG;IACH,8BAiBC;IAED;;;;;OAKG;IACH,uBA8CC;IAED;;;;OAIG;IACH,yBAmBC;IAED;;;;OAIG;IACH,4BAqBC;IAiED;;;;;;OAMG;IACH,iBAJW,QAAQ,GAAC,OAAO,GAAC,MAAM,GACtB,MAAM,GAAC,SAAS,CAc3B;IAED;;;OAGG;IACH,0BAHW,QAAQ,GACP,MAAM,GAAC,SAAS,CAY3B;IAED;;;OAGG;IACH,uBAHW,OAAO,GACN,MAAM,GAAC,SAAS,CAwB3B;IAED;;;;;;OAMG;IACH,yBAJW,QAAQ,GAAC,OAAO,GAAC,MAAM,GACtB,UAAa,CAoBxB;IAED;;;OAGG;IACH,kCAHW,QAAQ,GACP,UAAa,CAaxB;IAED;;;OAGG;IACH,+BAHW,OAAO,GACN,UAAa,CAuBxB;IAED;;;;;;OAMG;IACH,mBAJW,QAAQ,GAAC,OAAO,GAAC,MAAM,GACtB,UAAa,CAiBxB;IAED;;;OAGG;IACH,4BAHW,QAAQ,GACP,UAAa,CAUxB;IAED;;;;OAIG;IACH,yBAJW,OAAO,GACN,UAAa,CAqBxB;CA8CF"}
|
package/format/KML.js
CHANGED
|
@@ -419,9 +419,6 @@ function defaultIconUrlFunction(href) {
|
|
|
419
419
|
* geometry types, and into MultiPoint/MultiLineString/MultiPolygon if they are
|
|
420
420
|
* all of the same type.
|
|
421
421
|
*
|
|
422
|
-
* Note that the KML format uses the URL() constructor. Older browsers such as IE
|
|
423
|
-
* which do not support this will need a URL polyfill to be loaded before use.
|
|
424
|
-
*
|
|
425
422
|
* @api
|
|
426
423
|
*/
|
|
427
424
|
class KML extends XMLFeature {
|
package/format/readme.md
CHANGED
|
@@ -23,7 +23,6 @@ The document ends with guidelines for implementing a new format.
|
|
|
23
23
|
|
|
24
24
|
The `ol/xml` namespace contains a number of useful functions for parsing XML documents. All code in OpenLayers that reads data from XML documents should use it. It has several features:
|
|
25
25
|
|
|
26
|
-
* Browser support back to IE9
|
|
27
26
|
* Correct treatment of XML namespaces
|
|
28
27
|
* Robust handling of errors
|
|
29
28
|
* Modular design to promote the re-use of parsers
|
|
@@ -42,7 +41,7 @@ The `ol/format/XML` class includes a number of methods for reading arrays of fea
|
|
|
42
41
|
|
|
43
42
|
read{Features,Feature,Geometry}From{Document,Node}
|
|
44
43
|
|
|
45
|
-
`Document`s are top-level XML document objects, `Node`s are children of the top-level XML document object. In modern browsers `Document` is a subclass of `Node`, and inherits all of `Node`'s methods.
|
|
44
|
+
`Document`s are top-level XML document objects, `Node`s are children of the top-level XML document object. In modern browsers `Document` is a subclass of `Node`, and inherits all of `Node`'s methods.
|
|
46
45
|
|
|
47
46
|
## `ol/xml`
|
|
48
47
|
|
|
@@ -76,10 +76,6 @@ declare namespace DragAndDropEventType {
|
|
|
76
76
|
* @classdesc
|
|
77
77
|
* Handles input of vector data by drag and drop.
|
|
78
78
|
*
|
|
79
|
-
* Note that the DragAndDrop interaction uses the TextDecoder() constructor if the supplied
|
|
80
|
-
* combination of formats read both text string and ArrayBuffer sources. Older browsers such
|
|
81
|
-
* as IE which do not support this will need a TextDecoder polyfill to be loaded before use.
|
|
82
|
-
*
|
|
83
79
|
* @api
|
|
84
80
|
*
|
|
85
81
|
* @fires DragAndDropEvent
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragAndDrop.d.ts","sourceRoot":"","sources":["DragAndDrop.js"],"names":[],"mappings":"AAqCA;;;;GAIG;AACH;IACE;;;;;OAKG;IACH,kBALW,oBAAoB,QACpB,IAAI,6KA2Bd;IApBC;;;;OA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EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,oBAAoB,EAAE,KAAK,GAC1E,eAAqB,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GAC/D,OAAW,eAAe,EAAE,WAAW,CAAC,aAAa,EAAE,gBAAgB,EAAE,MAAM,CAAC,GAChF,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,GAAC,OAAO,oBAAoB,EAAE,KAAK,GACrH,eAAqB,GAAC,aAAa,EAAE,MAAM,CAAC;;4BAxDnC,MAAM;;;;AAiDhB;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,+CAuEC;IAhEC;;OAEG;IACH,IAFU,uBAAuB,OAAO,WAAW,EAAE,SAAS,CAAC,CAExD;IAEP;;OAEG;IACH,MAFU,uBAAuB,OAAO,WAAW,EAAE,SAAS,CAAC,CAEtD;IAET;;OAEG;IACH,IAFU,uBAAuB,IAAI,CAAC,CAE/B;IAEP;;;OAGG;IACH,sBAA0B;IAE1B;;;OAGG;IACH,iBAAkB;IAclB;;;OAGG;IACH,oBAEQ;IAER;;;OAGG;IACH,wBAA2B;IAE3B;;;OAGG;IACH,gBAAqC;IAErC;;;OAGG;IACH,eAAoD;IAGtD;;;;OAIG;IACH,sBAuCC;IAED;;OAEG;IACH,2BAWC;IAkBD;;;;;OAKG;IACH,YAFW,OAAO,WAAW,EAAE,OAAO,QAQrC;IAED;;;;;;OAMG;IACH,yBASC;IAED;;OAEG;IACH,6BAKC;IAED;;OAEG;IACH,kBAFW,SAAS,QAiBnB;IAED;;OAEG;IACH,kBAFW,SAAS,QAMnB;CACF"}
|
|
@@ -87,10 +87,6 @@ export class DragAndDropEvent extends Event {
|
|
|
87
87
|
* @classdesc
|
|
88
88
|
* Handles input of vector data by drag and drop.
|
|
89
89
|
*
|
|
90
|
-
* Note that the DragAndDrop interaction uses the TextDecoder() constructor if the supplied
|
|
91
|
-
* combination of formats read both text string and ArrayBuffer sources. Older browsers such
|
|
92
|
-
* as IE which do not support this will need a TextDecoder polyfill to be loaded before use.
|
|
93
|
-
*
|
|
94
90
|
* @api
|
|
95
91
|
*
|
|
96
92
|
* @fires DragAndDropEvent
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @typedef {Object} DefaultsOptions
|
|
3
|
+
* @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is
|
|
4
|
+
* desired.
|
|
5
|
+
* @property {boolean} [onFocusOnly=false] Interact only when the map has the
|
|
6
|
+
* focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is
|
|
7
|
+
* useful when page scroll is desired for maps that do not have the browser's
|
|
8
|
+
* focus.
|
|
9
|
+
* @property {boolean} [doubleClickZoom=true] Whether double click zoom is
|
|
10
|
+
* desired.
|
|
11
|
+
* @property {boolean} [keyboard=true] Whether keyboard interaction is desired.
|
|
12
|
+
* @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.
|
|
13
|
+
* @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.
|
|
14
|
+
* @property {boolean} [dragPan=true] Whether drag pan is desired.
|
|
15
|
+
* @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.
|
|
16
|
+
* @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.
|
|
17
|
+
* @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.
|
|
18
|
+
* @property {number} [zoomDuration] Duration of the zoom animation in
|
|
19
|
+
* milliseconds.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Set of interactions included in maps by default. Specific interactions can be
|
|
23
|
+
* excluded by setting the appropriate option to false in the constructor
|
|
24
|
+
* options, but the order of the interactions is fixed. If you want to specify
|
|
25
|
+
* a different order for interactions, you will need to create your own
|
|
26
|
+
* {@link module:ol/interaction/Interaction~Interaction} instances and insert
|
|
27
|
+
* them into a {@link module:ol/Collection~Collection} in the order you want
|
|
28
|
+
* before creating your {@link module:ol/Map~Map} instance. Changing the order can
|
|
29
|
+
* be of interest if the event propagation needs to be stopped at a point.
|
|
30
|
+
* The default set of interactions, in sequence, is:
|
|
31
|
+
* * {@link module:ol/interaction/DragRotate~DragRotate}
|
|
32
|
+
* * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}
|
|
33
|
+
* * {@link module:ol/interaction/DragPan~DragPan}
|
|
34
|
+
* * {@link module:ol/interaction/PinchRotate~PinchRotate}
|
|
35
|
+
* * {@link module:ol/interaction/PinchZoom~PinchZoom}
|
|
36
|
+
* * {@link module:ol/interaction/KeyboardPan~KeyboardPan}
|
|
37
|
+
* * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}
|
|
38
|
+
* * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}
|
|
39
|
+
* * {@link module:ol/interaction/DragZoom~DragZoom}
|
|
40
|
+
*
|
|
41
|
+
* @param {DefaultsOptions} [opt_options] Defaults options.
|
|
42
|
+
* @return {Collection<import("./Interaction.js").default>}
|
|
43
|
+
* A collection of interactions to be used with the {@link module:ol/Map~Map}
|
|
44
|
+
* constructor's `interactions` option.
|
|
45
|
+
* @api
|
|
46
|
+
*/
|
|
47
|
+
export function defaults(opt_options?: DefaultsOptions | undefined): Collection<import("./Interaction.js").default>;
|
|
48
|
+
export type DefaultsOptions = {
|
|
49
|
+
/**
|
|
50
|
+
* Whether Alt-Shift-drag rotate is
|
|
51
|
+
* desired.
|
|
52
|
+
*/
|
|
53
|
+
altShiftDragRotate?: boolean | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Interact only when the map has the
|
|
56
|
+
* focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is
|
|
57
|
+
* useful when page scroll is desired for maps that do not have the browser's
|
|
58
|
+
* focus.
|
|
59
|
+
*/
|
|
60
|
+
onFocusOnly?: boolean | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Whether double click zoom is
|
|
63
|
+
* desired.
|
|
64
|
+
*/
|
|
65
|
+
doubleClickZoom?: boolean | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* Whether keyboard interaction is desired.
|
|
68
|
+
*/
|
|
69
|
+
keyboard?: boolean | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Whether mousewheel zoom is desired.
|
|
72
|
+
*/
|
|
73
|
+
mouseWheelZoom?: boolean | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Whether Shift-drag zoom is desired.
|
|
76
|
+
*/
|
|
77
|
+
shiftDragZoom?: boolean | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Whether drag pan is desired.
|
|
80
|
+
*/
|
|
81
|
+
dragPan?: boolean | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Whether pinch rotate is desired.
|
|
84
|
+
*/
|
|
85
|
+
pinchRotate?: boolean | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Whether pinch zoom is desired.
|
|
88
|
+
*/
|
|
89
|
+
pinchZoom?: boolean | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Zoom level delta when using keyboard or double click zoom.
|
|
92
|
+
*/
|
|
93
|
+
zoomDelta?: number | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Duration of the zoom animation in
|
|
96
|
+
* milliseconds.
|
|
97
|
+
*/
|
|
98
|
+
zoomDuration?: number | undefined;
|
|
99
|
+
};
|
|
100
|
+
import Collection from "../Collection.js";
|
|
101
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["defaults.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qEALY,WAAW,OAAO,kBAAkB,EAAE,OAAO,CAAC,CA0FzD"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module ol/interaction/defaults
|
|
3
|
+
*/
|
|
4
|
+
import Collection from '../Collection.js';
|
|
5
|
+
import DoubleClickZoom from './DoubleClickZoom.js';
|
|
6
|
+
import DragPan from './DragPan.js';
|
|
7
|
+
import DragRotate from './DragRotate.js';
|
|
8
|
+
import DragZoom from './DragZoom.js';
|
|
9
|
+
import KeyboardPan from './KeyboardPan.js';
|
|
10
|
+
import KeyboardZoom from './KeyboardZoom.js';
|
|
11
|
+
import Kinetic from '../Kinetic.js';
|
|
12
|
+
import MouseWheelZoom from './MouseWheelZoom.js';
|
|
13
|
+
import PinchRotate from './PinchRotate.js';
|
|
14
|
+
import PinchZoom from './PinchZoom.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @typedef {Object} DefaultsOptions
|
|
18
|
+
* @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is
|
|
19
|
+
* desired.
|
|
20
|
+
* @property {boolean} [onFocusOnly=false] Interact only when the map has the
|
|
21
|
+
* focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is
|
|
22
|
+
* useful when page scroll is desired for maps that do not have the browser's
|
|
23
|
+
* focus.
|
|
24
|
+
* @property {boolean} [doubleClickZoom=true] Whether double click zoom is
|
|
25
|
+
* desired.
|
|
26
|
+
* @property {boolean} [keyboard=true] Whether keyboard interaction is desired.
|
|
27
|
+
* @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.
|
|
28
|
+
* @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.
|
|
29
|
+
* @property {boolean} [dragPan=true] Whether drag pan is desired.
|
|
30
|
+
* @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.
|
|
31
|
+
* @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.
|
|
32
|
+
* @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.
|
|
33
|
+
* @property {number} [zoomDuration] Duration of the zoom animation in
|
|
34
|
+
* milliseconds.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Set of interactions included in maps by default. Specific interactions can be
|
|
39
|
+
* excluded by setting the appropriate option to false in the constructor
|
|
40
|
+
* options, but the order of the interactions is fixed. If you want to specify
|
|
41
|
+
* a different order for interactions, you will need to create your own
|
|
42
|
+
* {@link module:ol/interaction/Interaction~Interaction} instances and insert
|
|
43
|
+
* them into a {@link module:ol/Collection~Collection} in the order you want
|
|
44
|
+
* before creating your {@link module:ol/Map~Map} instance. Changing the order can
|
|
45
|
+
* be of interest if the event propagation needs to be stopped at a point.
|
|
46
|
+
* The default set of interactions, in sequence, is:
|
|
47
|
+
* * {@link module:ol/interaction/DragRotate~DragRotate}
|
|
48
|
+
* * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}
|
|
49
|
+
* * {@link module:ol/interaction/DragPan~DragPan}
|
|
50
|
+
* * {@link module:ol/interaction/PinchRotate~PinchRotate}
|
|
51
|
+
* * {@link module:ol/interaction/PinchZoom~PinchZoom}
|
|
52
|
+
* * {@link module:ol/interaction/KeyboardPan~KeyboardPan}
|
|
53
|
+
* * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}
|
|
54
|
+
* * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}
|
|
55
|
+
* * {@link module:ol/interaction/DragZoom~DragZoom}
|
|
56
|
+
*
|
|
57
|
+
* @param {DefaultsOptions} [opt_options] Defaults options.
|
|
58
|
+
* @return {Collection<import("./Interaction.js").default>}
|
|
59
|
+
* A collection of interactions to be used with the {@link module:ol/Map~Map}
|
|
60
|
+
* constructor's `interactions` option.
|
|
61
|
+
* @api
|
|
62
|
+
*/
|
|
63
|
+
export function defaults(opt_options) {
|
|
64
|
+
const options = opt_options ? opt_options : {};
|
|
65
|
+
|
|
66
|
+
/** @type {Collection<import("./Interaction.js").default>} */
|
|
67
|
+
const interactions = new Collection();
|
|
68
|
+
|
|
69
|
+
const kinetic = new Kinetic(-0.005, 0.05, 100);
|
|
70
|
+
|
|
71
|
+
const altShiftDragRotate =
|
|
72
|
+
options.altShiftDragRotate !== undefined
|
|
73
|
+
? options.altShiftDragRotate
|
|
74
|
+
: true;
|
|
75
|
+
if (altShiftDragRotate) {
|
|
76
|
+
interactions.push(new DragRotate());
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const doubleClickZoom =
|
|
80
|
+
options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;
|
|
81
|
+
if (doubleClickZoom) {
|
|
82
|
+
interactions.push(
|
|
83
|
+
new DoubleClickZoom({
|
|
84
|
+
delta: options.zoomDelta,
|
|
85
|
+
duration: options.zoomDuration,
|
|
86
|
+
})
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const dragPan = options.dragPan !== undefined ? options.dragPan : true;
|
|
91
|
+
if (dragPan) {
|
|
92
|
+
interactions.push(
|
|
93
|
+
new DragPan({
|
|
94
|
+
onFocusOnly: options.onFocusOnly,
|
|
95
|
+
kinetic: kinetic,
|
|
96
|
+
})
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const pinchRotate =
|
|
101
|
+
options.pinchRotate !== undefined ? options.pinchRotate : true;
|
|
102
|
+
if (pinchRotate) {
|
|
103
|
+
interactions.push(new PinchRotate());
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;
|
|
107
|
+
if (pinchZoom) {
|
|
108
|
+
interactions.push(
|
|
109
|
+
new PinchZoom({
|
|
110
|
+
duration: options.zoomDuration,
|
|
111
|
+
})
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const keyboard = options.keyboard !== undefined ? options.keyboard : true;
|
|
116
|
+
if (keyboard) {
|
|
117
|
+
interactions.push(new KeyboardPan());
|
|
118
|
+
interactions.push(
|
|
119
|
+
new KeyboardZoom({
|
|
120
|
+
delta: options.zoomDelta,
|
|
121
|
+
duration: options.zoomDuration,
|
|
122
|
+
})
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const mouseWheelZoom =
|
|
127
|
+
options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;
|
|
128
|
+
if (mouseWheelZoom) {
|
|
129
|
+
interactions.push(
|
|
130
|
+
new MouseWheelZoom({
|
|
131
|
+
onFocusOnly: options.onFocusOnly,
|
|
132
|
+
duration: options.zoomDuration,
|
|
133
|
+
})
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const shiftDragZoom =
|
|
138
|
+
options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;
|
|
139
|
+
if (shiftDragZoom) {
|
|
140
|
+
interactions.push(
|
|
141
|
+
new DragZoom({
|
|
142
|
+
duration: options.zoomDuration,
|
|
143
|
+
})
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return interactions;
|
|
148
|
+
}
|
package/interaction.d.ts
CHANGED
|
@@ -1,50 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @typedef {Object} DefaultsOptions
|
|
3
|
-
* @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is
|
|
4
|
-
* desired.
|
|
5
|
-
* @property {boolean} [onFocusOnly=false] Interact only when the map has the
|
|
6
|
-
* focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is
|
|
7
|
-
* useful when page scroll is desired for maps that do not have the browser's
|
|
8
|
-
* focus.
|
|
9
|
-
* @property {boolean} [doubleClickZoom=true] Whether double click zoom is
|
|
10
|
-
* desired.
|
|
11
|
-
* @property {boolean} [keyboard=true] Whether keyboard interaction is desired.
|
|
12
|
-
* @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.
|
|
13
|
-
* @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.
|
|
14
|
-
* @property {boolean} [dragPan=true] Whether drag pan is desired.
|
|
15
|
-
* @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.
|
|
16
|
-
* @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.
|
|
17
|
-
* @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.
|
|
18
|
-
* @property {number} [zoomDuration] Duration of the zoom animation in
|
|
19
|
-
* milliseconds.
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* Set of interactions included in maps by default. Specific interactions can be
|
|
23
|
-
* excluded by setting the appropriate option to false in the constructor
|
|
24
|
-
* options, but the order of the interactions is fixed. If you want to specify
|
|
25
|
-
* a different order for interactions, you will need to create your own
|
|
26
|
-
* {@link module:ol/interaction/Interaction~Interaction} instances and insert
|
|
27
|
-
* them into a {@link module:ol/Collection~Collection} in the order you want
|
|
28
|
-
* before creating your {@link module:ol/Map~Map} instance. Changing the order can
|
|
29
|
-
* be of interest if the event propagation needs to be stopped at a point.
|
|
30
|
-
* The default set of interactions, in sequence, is:
|
|
31
|
-
* * {@link module:ol/interaction/DragRotate~DragRotate}
|
|
32
|
-
* * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}
|
|
33
|
-
* * {@link module:ol/interaction/DragPan~DragPan}
|
|
34
|
-
* * {@link module:ol/interaction/PinchRotate~PinchRotate}
|
|
35
|
-
* * {@link module:ol/interaction/PinchZoom~PinchZoom}
|
|
36
|
-
* * {@link module:ol/interaction/KeyboardPan~KeyboardPan}
|
|
37
|
-
* * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}
|
|
38
|
-
* * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}
|
|
39
|
-
* * {@link module:ol/interaction/DragZoom~DragZoom}
|
|
40
|
-
*
|
|
41
|
-
* @param {DefaultsOptions} [opt_options] Defaults options.
|
|
42
|
-
* @return {import("./Collection.js").default<import("./interaction/Interaction.js").default>}
|
|
43
|
-
* A collection of interactions to be used with the {@link module:ol/Map~Map}
|
|
44
|
-
* constructor's `interactions` option.
|
|
45
|
-
* @api
|
|
46
|
-
*/
|
|
47
|
-
export function defaults(opt_options?: DefaultsOptions | undefined): import("./Collection.js").default<import("./interaction/Interaction.js").default>;
|
|
48
1
|
export { default as DoubleClickZoom } from "./interaction/DoubleClickZoom.js";
|
|
49
2
|
export { default as DragAndDrop } from "./interaction/DragAndDrop.js";
|
|
50
3
|
export { default as DragBox } from "./interaction/DragBox.js";
|
|
@@ -66,56 +19,5 @@ export { default as Pointer } from "./interaction/Pointer.js";
|
|
|
66
19
|
export { default as Select } from "./interaction/Select.js";
|
|
67
20
|
export { default as Snap } from "./interaction/Snap.js";
|
|
68
21
|
export { default as Translate } from "./interaction/Translate.js";
|
|
69
|
-
export
|
|
70
|
-
/**
|
|
71
|
-
* Whether Alt-Shift-drag rotate is
|
|
72
|
-
* desired.
|
|
73
|
-
*/
|
|
74
|
-
altShiftDragRotate?: boolean | undefined;
|
|
75
|
-
/**
|
|
76
|
-
* Interact only when the map has the
|
|
77
|
-
* focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is
|
|
78
|
-
* useful when page scroll is desired for maps that do not have the browser's
|
|
79
|
-
* focus.
|
|
80
|
-
*/
|
|
81
|
-
onFocusOnly?: boolean | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* Whether double click zoom is
|
|
84
|
-
* desired.
|
|
85
|
-
*/
|
|
86
|
-
doubleClickZoom?: boolean | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* Whether keyboard interaction is desired.
|
|
89
|
-
*/
|
|
90
|
-
keyboard?: boolean | undefined;
|
|
91
|
-
/**
|
|
92
|
-
* Whether mousewheel zoom is desired.
|
|
93
|
-
*/
|
|
94
|
-
mouseWheelZoom?: boolean | undefined;
|
|
95
|
-
/**
|
|
96
|
-
* Whether Shift-drag zoom is desired.
|
|
97
|
-
*/
|
|
98
|
-
shiftDragZoom?: boolean | undefined;
|
|
99
|
-
/**
|
|
100
|
-
* Whether drag pan is desired.
|
|
101
|
-
*/
|
|
102
|
-
dragPan?: boolean | undefined;
|
|
103
|
-
/**
|
|
104
|
-
* Whether pinch rotate is desired.
|
|
105
|
-
*/
|
|
106
|
-
pinchRotate?: boolean | undefined;
|
|
107
|
-
/**
|
|
108
|
-
* Whether pinch zoom is desired.
|
|
109
|
-
*/
|
|
110
|
-
pinchZoom?: boolean | undefined;
|
|
111
|
-
/**
|
|
112
|
-
* Zoom level delta when using keyboard or double click zoom.
|
|
113
|
-
*/
|
|
114
|
-
zoomDelta?: number | undefined;
|
|
115
|
-
/**
|
|
116
|
-
* Duration of the zoom animation in
|
|
117
|
-
* milliseconds.
|
|
118
|
-
*/
|
|
119
|
-
zoomDuration?: number | undefined;
|
|
120
|
-
};
|
|
22
|
+
export { defaults } from "./interaction/defaults.js";
|
|
121
23
|
//# sourceMappingURL=interaction.d.ts.map
|
package/interaction.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["interaction.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interaction.d.ts","sourceRoot":"","sources":["interaction.js"],"names":[],"mappings":""}
|
package/interaction.js
CHANGED
|
@@ -1,18 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module ol/interaction
|
|
3
3
|
*/
|
|
4
|
-
import Collection from './Collection.js';
|
|
5
|
-
import DoubleClickZoom from './interaction/DoubleClickZoom.js';
|
|
6
|
-
import DragPan from './interaction/DragPan.js';
|
|
7
|
-
import DragRotate from './interaction/DragRotate.js';
|
|
8
|
-
import DragZoom from './interaction/DragZoom.js';
|
|
9
|
-
import KeyboardPan from './interaction/KeyboardPan.js';
|
|
10
|
-
import KeyboardZoom from './interaction/KeyboardZoom.js';
|
|
11
|
-
import Kinetic from './Kinetic.js';
|
|
12
|
-
import MouseWheelZoom from './interaction/MouseWheelZoom.js';
|
|
13
|
-
import PinchRotate from './interaction/PinchRotate.js';
|
|
14
|
-
import PinchZoom from './interaction/PinchZoom.js';
|
|
15
|
-
|
|
16
4
|
export {default as DoubleClickZoom} from './interaction/DoubleClickZoom.js';
|
|
17
5
|
export {default as DragAndDrop} from './interaction/DragAndDrop.js';
|
|
18
6
|
export {default as DragBox} from './interaction/DragBox.js';
|
|
@@ -34,137 +22,4 @@ export {default as Pointer} from './interaction/Pointer.js';
|
|
|
34
22
|
export {default as Select} from './interaction/Select.js';
|
|
35
23
|
export {default as Snap} from './interaction/Snap.js';
|
|
36
24
|
export {default as Translate} from './interaction/Translate.js';
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* @typedef {Object} DefaultsOptions
|
|
40
|
-
* @property {boolean} [altShiftDragRotate=true] Whether Alt-Shift-drag rotate is
|
|
41
|
-
* desired.
|
|
42
|
-
* @property {boolean} [onFocusOnly=false] Interact only when the map has the
|
|
43
|
-
* focus. This affects the `MouseWheelZoom` and `DragPan` interactions and is
|
|
44
|
-
* useful when page scroll is desired for maps that do not have the browser's
|
|
45
|
-
* focus.
|
|
46
|
-
* @property {boolean} [doubleClickZoom=true] Whether double click zoom is
|
|
47
|
-
* desired.
|
|
48
|
-
* @property {boolean} [keyboard=true] Whether keyboard interaction is desired.
|
|
49
|
-
* @property {boolean} [mouseWheelZoom=true] Whether mousewheel zoom is desired.
|
|
50
|
-
* @property {boolean} [shiftDragZoom=true] Whether Shift-drag zoom is desired.
|
|
51
|
-
* @property {boolean} [dragPan=true] Whether drag pan is desired.
|
|
52
|
-
* @property {boolean} [pinchRotate=true] Whether pinch rotate is desired.
|
|
53
|
-
* @property {boolean} [pinchZoom=true] Whether pinch zoom is desired.
|
|
54
|
-
* @property {number} [zoomDelta] Zoom level delta when using keyboard or double click zoom.
|
|
55
|
-
* @property {number} [zoomDuration] Duration of the zoom animation in
|
|
56
|
-
* milliseconds.
|
|
57
|
-
*/
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Set of interactions included in maps by default. Specific interactions can be
|
|
61
|
-
* excluded by setting the appropriate option to false in the constructor
|
|
62
|
-
* options, but the order of the interactions is fixed. If you want to specify
|
|
63
|
-
* a different order for interactions, you will need to create your own
|
|
64
|
-
* {@link module:ol/interaction/Interaction~Interaction} instances and insert
|
|
65
|
-
* them into a {@link module:ol/Collection~Collection} in the order you want
|
|
66
|
-
* before creating your {@link module:ol/Map~Map} instance. Changing the order can
|
|
67
|
-
* be of interest if the event propagation needs to be stopped at a point.
|
|
68
|
-
* The default set of interactions, in sequence, is:
|
|
69
|
-
* * {@link module:ol/interaction/DragRotate~DragRotate}
|
|
70
|
-
* * {@link module:ol/interaction/DoubleClickZoom~DoubleClickZoom}
|
|
71
|
-
* * {@link module:ol/interaction/DragPan~DragPan}
|
|
72
|
-
* * {@link module:ol/interaction/PinchRotate~PinchRotate}
|
|
73
|
-
* * {@link module:ol/interaction/PinchZoom~PinchZoom}
|
|
74
|
-
* * {@link module:ol/interaction/KeyboardPan~KeyboardPan}
|
|
75
|
-
* * {@link module:ol/interaction/KeyboardZoom~KeyboardZoom}
|
|
76
|
-
* * {@link module:ol/interaction/MouseWheelZoom~MouseWheelZoom}
|
|
77
|
-
* * {@link module:ol/interaction/DragZoom~DragZoom}
|
|
78
|
-
*
|
|
79
|
-
* @param {DefaultsOptions} [opt_options] Defaults options.
|
|
80
|
-
* @return {import("./Collection.js").default<import("./interaction/Interaction.js").default>}
|
|
81
|
-
* A collection of interactions to be used with the {@link module:ol/Map~Map}
|
|
82
|
-
* constructor's `interactions` option.
|
|
83
|
-
* @api
|
|
84
|
-
*/
|
|
85
|
-
export function defaults(opt_options) {
|
|
86
|
-
const options = opt_options ? opt_options : {};
|
|
87
|
-
|
|
88
|
-
/** @type {Collection<import("./interaction/Interaction.js").default>} */
|
|
89
|
-
const interactions = new Collection();
|
|
90
|
-
|
|
91
|
-
const kinetic = new Kinetic(-0.005, 0.05, 100);
|
|
92
|
-
|
|
93
|
-
const altShiftDragRotate =
|
|
94
|
-
options.altShiftDragRotate !== undefined
|
|
95
|
-
? options.altShiftDragRotate
|
|
96
|
-
: true;
|
|
97
|
-
if (altShiftDragRotate) {
|
|
98
|
-
interactions.push(new DragRotate());
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const doubleClickZoom =
|
|
102
|
-
options.doubleClickZoom !== undefined ? options.doubleClickZoom : true;
|
|
103
|
-
if (doubleClickZoom) {
|
|
104
|
-
interactions.push(
|
|
105
|
-
new DoubleClickZoom({
|
|
106
|
-
delta: options.zoomDelta,
|
|
107
|
-
duration: options.zoomDuration,
|
|
108
|
-
})
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const dragPan = options.dragPan !== undefined ? options.dragPan : true;
|
|
113
|
-
if (dragPan) {
|
|
114
|
-
interactions.push(
|
|
115
|
-
new DragPan({
|
|
116
|
-
onFocusOnly: options.onFocusOnly,
|
|
117
|
-
kinetic: kinetic,
|
|
118
|
-
})
|
|
119
|
-
);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
const pinchRotate =
|
|
123
|
-
options.pinchRotate !== undefined ? options.pinchRotate : true;
|
|
124
|
-
if (pinchRotate) {
|
|
125
|
-
interactions.push(new PinchRotate());
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
const pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;
|
|
129
|
-
if (pinchZoom) {
|
|
130
|
-
interactions.push(
|
|
131
|
-
new PinchZoom({
|
|
132
|
-
duration: options.zoomDuration,
|
|
133
|
-
})
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const keyboard = options.keyboard !== undefined ? options.keyboard : true;
|
|
138
|
-
if (keyboard) {
|
|
139
|
-
interactions.push(new KeyboardPan());
|
|
140
|
-
interactions.push(
|
|
141
|
-
new KeyboardZoom({
|
|
142
|
-
delta: options.zoomDelta,
|
|
143
|
-
duration: options.zoomDuration,
|
|
144
|
-
})
|
|
145
|
-
);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const mouseWheelZoom =
|
|
149
|
-
options.mouseWheelZoom !== undefined ? options.mouseWheelZoom : true;
|
|
150
|
-
if (mouseWheelZoom) {
|
|
151
|
-
interactions.push(
|
|
152
|
-
new MouseWheelZoom({
|
|
153
|
-
onFocusOnly: options.onFocusOnly,
|
|
154
|
-
duration: options.zoomDuration,
|
|
155
|
-
})
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
const shiftDragZoom =
|
|
160
|
-
options.shiftDragZoom !== undefined ? options.shiftDragZoom : true;
|
|
161
|
-
if (shiftDragZoom) {
|
|
162
|
-
interactions.push(
|
|
163
|
-
new DragZoom({
|
|
164
|
-
duration: options.zoomDuration,
|
|
165
|
-
})
|
|
166
|
-
);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return interactions;
|
|
170
|
-
}
|
|
25
|
+
export {defaults} from './interaction/defaults.js';
|
package/package.json
CHANGED
package/reproj.js
CHANGED
|
@@ -64,7 +64,7 @@ function verifyBrokenDiagonalRendering(data, offset) {
|
|
|
64
64
|
* Determines if the current browser configuration can render triangular clip regions correctly.
|
|
65
65
|
* This value is cached so the function is only expensive the first time called.
|
|
66
66
|
* Firefox on Windows (as of now) does not if HWA is enabled. See https://bugzilla.mozilla.org/show_bug.cgi?id=1606976
|
|
67
|
-
*
|
|
67
|
+
* Chrome works, and everything seems to work on OSX and Android. This function caches the
|
|
68
68
|
* result. I suppose that it is conceivably possible that a browser might flip modes while the app is
|
|
69
69
|
* running, but lets hope not.
|
|
70
70
|
*
|
package/style/Icon.d.ts
CHANGED
|
@@ -82,8 +82,8 @@ export type Options = {
|
|
|
82
82
|
*/
|
|
83
83
|
size?: import("../size.js").Size | undefined;
|
|
84
84
|
/**
|
|
85
|
-
* Image size in pixels. Only required if `img` is set and `src` is not
|
|
86
|
-
*
|
|
85
|
+
* Image size in pixels. Only required if `img` is set and `src` is not.
|
|
86
|
+
* The provided `imgSize` needs to match the actual size of the image.
|
|
87
87
|
*/
|
|
88
88
|
imgSize?: import("../size.js").Size | undefined;
|
|
89
89
|
/**
|
|
@@ -133,8 +133,8 @@ export type Options = {
|
|
|
133
133
|
* @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).
|
|
134
134
|
* @property {import("../size.js").Size} [size] Icon size in pixel. Can be used together with `offset` to define the
|
|
135
135
|
* sub-rectangle to use from the origin (sprite) icon image.
|
|
136
|
-
* @property {import("../size.js").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not
|
|
137
|
-
*
|
|
136
|
+
* @property {import("../size.js").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not.
|
|
137
|
+
* The provided `imgSize` needs to match the actual size of the image.
|
|
138
138
|
* @property {string} [src] Image source URI.
|
|
139
139
|
* @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode
|
|
140
140
|
*/
|
package/style/Icon.js
CHANGED
|
@@ -49,8 +49,8 @@ import {getUid} from '../util.js';
|
|
|
49
49
|
* @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).
|
|
50
50
|
* @property {import("../size.js").Size} [size] Icon size in pixel. Can be used together with `offset` to define the
|
|
51
51
|
* sub-rectangle to use from the origin (sprite) icon image.
|
|
52
|
-
* @property {import("../size.js").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not
|
|
53
|
-
*
|
|
52
|
+
* @property {import("../size.js").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not.
|
|
53
|
+
* The provided `imgSize` needs to match the actual size of the image.
|
|
54
54
|
* @property {string} [src] Image source URI.
|
|
55
55
|
* @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode
|
|
56
56
|
*/
|
package/util.js
CHANGED