ol 7.0.0-dev.1660818676079 → 7.0.0-dev.1660829860979

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "7.0.0-dev.1660818676079",
3
+ "version": "7.0.0-dev.1660829860979",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
@@ -28,6 +28,11 @@
28
28
  "pbf": "3.2.1",
29
29
  "rbush": "^3.0.1"
30
30
  },
31
+ "browserslist": [
32
+ "> 1%",
33
+ "last 2 versions",
34
+ "not dead"
35
+ ],
31
36
  "sideEffects": [
32
37
  "proj.js",
33
38
  "ol.css"
package/style/Icon.d.ts CHANGED
@@ -47,19 +47,15 @@ export type Options = {
47
47
  */
48
48
  img?: HTMLCanvasElement | HTMLImageElement | undefined;
49
49
  /**
50
- * Offset, which, together with the size and the offset origin, define the
51
- * sub-rectangle to use from the original icon image.
50
+ * Image size in pixels. Only required if `img` is set and `src` is not.
51
+ * The provided `imgSize` needs to match the actual size of the image.
52
52
  */
53
- offset?: number[] | undefined;
53
+ imgSize?: import("../size.js").Size | undefined;
54
54
  /**
55
- * Displacement of the icon.
55
+ * Displacement of the icon in pixels.
56
+ * Positive values will shift the icon right and up.
56
57
  */
57
58
  displacement?: number[] | undefined;
58
- /**
59
- * Origin of the offset: `bottom-left`, `bottom-right`,
60
- * `top-left` or `top-right`.
61
- */
62
- offsetOrigin?: IconOrigin | undefined;
63
59
  /**
64
60
  * Opacity of the icon.
65
61
  */
@@ -77,21 +73,26 @@ export type Options = {
77
73
  */
78
74
  rotation?: number | undefined;
79
75
  /**
80
- * Icon size in pixel. Can be used together with `offset` to define the
81
- * sub-rectangle to use from the origin (sprite) icon image.
76
+ * Offset which, together with `size` and `offsetOrigin`, defines the
77
+ * sub-rectangle to use from the original (sprite) image.
82
78
  */
83
- size?: import("../size.js").Size | undefined;
79
+ offset?: number[] | undefined;
84
80
  /**
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.
81
+ * Origin of the offset: `bottom-left`, `bottom-right`,
82
+ * `top-left` or `top-right`.
87
83
  */
88
- imgSize?: import("../size.js").Size | undefined;
84
+ offsetOrigin?: IconOrigin | undefined;
85
+ /**
86
+ * Icon size in pixels. Used together with `offset` to define the
87
+ * sub-rectangle to use from the original (sprite) image.
88
+ */
89
+ size?: import("../size.js").Size | undefined;
89
90
  /**
90
91
  * Image source URI.
91
92
  */
92
93
  src?: string | undefined;
93
94
  /**
94
- * Declutter mode
95
+ * Declutter mode.
95
96
  */
96
97
  declutterMode?: "declutter" | "obstacle" | "none" | undefined;
97
98
  };
@@ -122,21 +123,22 @@ export type Options = {
122
123
  * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the
123
124
  * provided image must already be loaded. And in that case, it is required
124
125
  * to provide the size of the image, with the `imgSize` option.
125
- * @property {Array<number>} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the
126
- * sub-rectangle to use from the original icon image.
127
- * @property {Array<number>} [displacement=[0,0]] Displacement of the icon.
128
- * @property {IconOrigin} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,
129
- * `top-left` or `top-right`.
126
+ * @property {import("../size.js").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not.
127
+ * The provided `imgSize` needs to match the actual size of the image.
128
+ * @property {Array<number>} [displacement=[0, 0]] Displacement of the icon in pixels.
129
+ * Positive values will shift the icon right and up.
130
130
  * @property {number} [opacity=1] Opacity of the icon.
131
131
  * @property {number|import("../size.js").Size} [scale=1] Scale.
132
132
  * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.
133
133
  * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).
134
- * @property {import("../size.js").Size} [size] Icon size in pixel. Can be used together with `offset` to define the
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
- * The provided `imgSize` needs to match the actual size of the image.
134
+ * @property {Array<number>} [offset=[0, 0]] Offset which, together with `size` and `offsetOrigin`, defines the
135
+ * sub-rectangle to use from the original (sprite) image.
136
+ * @property {IconOrigin} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,
137
+ * `top-left` or `top-right`.
138
+ * @property {import("../size.js").Size} [size] Icon size in pixels. Used together with `offset` to define the
139
+ * sub-rectangle to use from the original (sprite) image.
138
140
  * @property {string} [src] Image source URI.
139
- * @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode
141
+ * @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode.
140
142
  */
141
143
  /**
142
144
  * @classdesc
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["Icon.js"],"names":[],"mappings":";;;;8BAYa,UAAU,GAAG,QAAQ;;;;yBAKrB,aAAa,GAAG,cAAc,GAAG,UAAU,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAqCxD,WAAW,GAAC,UAAU,GAAC,MAAM,GAAC,SAAS;;AA3CrD;;;GAGG;AAEH;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH;;;;GAIG;AACH;IACE;;OAEG;IACH,2CAkJC;IAhHC;;;OAGG;IACH,gBAAyE;IAEzE;;;OAGG;IACH,0BAA6B;IAE7B;;;OAGG;IACH,sBACwE;IAExE;;;OAGG;IACH,sBACwE;IAExE;;;OAGG;IACH,sBACwE;IAExE;;;OAGG;IACH,qBACgE;IAOhE;;;OAGG;IACH,iBAA+B;IAqB/B;;;OAGG;IACH,eAAyE;IAEzE;;;OAGG;IACH,mBAOC;IAED;;;OAGG;IACH,gBA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;;;;OAIG;IACH,SAHY,IAAI,CA2Bf;IA6DD;;;;;;OAMG;IACH,kBAHW,MAAM,MAAM,CAAC,QAMvB;IAED;;;;OAIG;IACH,YAHY,OAAO,aAAa,EAAE,KAAK,CAKtC;IAED;;;;;OAKG;IACH,qBAJW,MAAM,GACL,gBAAgB,GAAC,iBAAiB,CAK7C;IA0BD;;OAEG;IACH,wBAFY,gBAAgB,GAAC,iBAAiB,CAI7C;IAqCD;;;;OAIG;IACH,UAHY,MAAM,GAAC,SAAS,CAK3B;CAmCF"}
package/style/Icon.js CHANGED
@@ -38,21 +38,22 @@ import {getUid} from '../util.js';
38
38
  * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the
39
39
  * provided image must already be loaded. And in that case, it is required
40
40
  * to provide the size of the image, with the `imgSize` option.
41
- * @property {Array<number>} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the
42
- * sub-rectangle to use from the original icon image.
43
- * @property {Array<number>} [displacement=[0,0]] Displacement of the icon.
44
- * @property {IconOrigin} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,
45
- * `top-left` or `top-right`.
41
+ * @property {import("../size.js").Size} [imgSize] Image size in pixels. Only required if `img` is set and `src` is not.
42
+ * The provided `imgSize` needs to match the actual size of the image.
43
+ * @property {Array<number>} [displacement=[0, 0]] Displacement of the icon in pixels.
44
+ * Positive values will shift the icon right and up.
46
45
  * @property {number} [opacity=1] Opacity of the icon.
47
46
  * @property {number|import("../size.js").Size} [scale=1] Scale.
48
47
  * @property {boolean} [rotateWithView=false] Whether to rotate the icon with the view.
49
48
  * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).
50
- * @property {import("../size.js").Size} [size] Icon size in pixel. Can be used together with `offset` to define the
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
- * The provided `imgSize` needs to match the actual size of the image.
49
+ * @property {Array<number>} [offset=[0, 0]] Offset which, together with `size` and `offsetOrigin`, defines the
50
+ * sub-rectangle to use from the original (sprite) image.
51
+ * @property {IconOrigin} [offsetOrigin='top-left'] Origin of the offset: `bottom-left`, `bottom-right`,
52
+ * `top-left` or `top-right`.
53
+ * @property {import("../size.js").Size} [size] Icon size in pixels. Used together with `offset` to define the
54
+ * sub-rectangle to use from the original (sprite) image.
54
55
  * @property {string} [src] Image source URI.
55
- * @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode
56
+ * @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode.
56
57
  */
57
58
 
58
59
  /**
@@ -25,11 +25,12 @@ export type Options = {
25
25
  */
26
26
  radius2?: number | undefined;
27
27
  /**
28
- * Shape's angle in radians. A value of 0 will have one of the shape's point facing up.
28
+ * Shape's angle in radians. A value of 0 will have one of the shape's points facing up.
29
29
  */
30
30
  angle?: number | undefined;
31
31
  /**
32
- * Displacement of the shape
32
+ * Displacement of the shape in pixels.
33
+ * Positive values will shift the shape right and up.
33
34
  */
34
35
  displacement?: number[] | undefined;
35
36
  /**
@@ -50,7 +51,7 @@ export type Options = {
50
51
  */
51
52
  scale?: number | import("../size.js").Size | undefined;
52
53
  /**
53
- * Declutter mode
54
+ * Declutter mode.
54
55
  */
55
56
  declutterMode?: "declutter" | "obstacle" | "none" | undefined;
56
57
  };
@@ -93,14 +94,15 @@ export type RenderOptions = {
93
94
  * @property {number} [radius] Radius of a regular polygon.
94
95
  * @property {number} [radius1] First radius of a star. Ignored if radius is set.
95
96
  * @property {number} [radius2] Second radius of a star.
96
- * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up.
97
- * @property {Array<number>} [displacement=[0,0]] Displacement of the shape
97
+ * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's points facing up.
98
+ * @property {Array<number>} [displacement=[0, 0]] Displacement of the shape in pixels.
99
+ * Positive values will shift the shape right and up.
98
100
  * @property {import("./Stroke.js").default} [stroke] Stroke style.
99
101
  * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).
100
102
  * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.
101
103
  * @property {number|import("../size.js").Size} [scale=1] Scale. Unless two dimensional scaling is required a better
102
104
  * result may be obtained with appropriate settings for `radius`, `radius1` and `radius2`.
103
- * @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode
105
+ * @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode.
104
106
  */
105
107
  /**
106
108
  * @typedef {Object} RenderOptions
@@ -1 +1 @@
1
- {"version":3,"file":"RegularShape.d.ts","sourceRoot":"","sources":["RegularShape.js"],"names":[],"mappings":";;;;;;;;;;;;;YAqBc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAYN,WAAW,GAAC,UAAU,GAAC,MAAM,GAAC,SAAS;;;;;;;;;;iBAMvC,MAAM;;;;UACN,MAAM;;;;cACN,MAAM,MAAM,CAAC,GAAC,IAAI;;;;oBAClB,MAAM;;;;cACN,cAAc;;;;gBACd,MAAM;;AA3BpB;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAuFjB;IApEC;;;OAGG;IACH,gBAAwB;IAExB;;;OAGG;IACH,4BAA+B;IAE/B;;;OAGG;IACH,cAA6D;IAE7D;;;OAGG;IACH,gBAAqB;IAErB;;;OAGG;IACH,gBAA6B;IAE7B;;;OAGG;IACH,mBAFU,MAAM,CAGiD;IAEjE;;;OAGG;IACH,iBAA+B;IAE/B;;;OAGG;IACH,eAA6D;IAE7D;;;OAGG;IACH,gBAAmE;IAEnE;;;OAGG;IACH,cAAiB;IAEjB;;;OAGG;IACH,uBAA0B;IAK5B;;;;OAIG;IACH,SAHY,YAAY,CAoBvB;IAuBD;;;;OAIG;IACH,YAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,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B;;;OAGG;IACH,mBAFU,MAAM,CAGiD;IAEjE;;;OAGG;IACH,iBAA+B;IAE/B;;;OAGG;IACH,eAA6D;IAE7D;;;OAGG;IACH,gBAAmE;IAEnE;;;OAGG;IACH,cAAiB;IAEjB;;;OAGG;IACH,uBAA0B;IAK5B;;;;OAIG;IACH,SAHY,YAAY,CAoBvB;IAuBD;;;;OAIG;IACH,YAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,WAHY,OAAO,WAAW,EAAE,OAAO,CAKtC;IAED;;;;OAIG;IACH,cAHW,OAAO,WAAW,EAAE,OAAO,QAMrC;IAED;;OAEG;IACH,wBAFY,iBAAiB,CAO5B;IAED;;;;;OAKG;IACH,qBAJW,MAAM,GACL,iBAAiB,CAiB5B;IAkCD;;;;OAIG;IACH,aAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,aAHY,MAAM,CAKjB;IAED;;;;OAIG;IACH,cAHY,MAAM,GAAC,SAAS,CAK3B;IAWD;;;;OAIG;IACH,aAHY,OAAO,aAAa,EAAE,OAAO,CAKxC;IAED;;;;OAIG;IACH,kBAHW,OAAO,aAAa,EAAE,OAAO,QAMvC;IAiBD;;;;;;;OAOG;IACH,+BAgFC;IAED;;;OAGG;IACH,iCAHY,aAAa,CA8CxB;IAED;;OAEG;IACH,yBAKC;IAED;;;;;OAKG;IACH,cA0BC;IAED;;;OAGG;IACH,kCA6BC;IAED;;;OAGG;IACH,oBAmBC;IAED;;;;OAIG;IACH,gCAmBC;CACF"}
@@ -24,14 +24,15 @@ import {
24
24
  * @property {number} [radius] Radius of a regular polygon.
25
25
  * @property {number} [radius1] First radius of a star. Ignored if radius is set.
26
26
  * @property {number} [radius2] Second radius of a star.
27
- * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's point facing up.
28
- * @property {Array<number>} [displacement=[0,0]] Displacement of the shape
27
+ * @property {number} [angle=0] Shape's angle in radians. A value of 0 will have one of the shape's points facing up.
28
+ * @property {Array<number>} [displacement=[0, 0]] Displacement of the shape in pixels.
29
+ * Positive values will shift the shape right and up.
29
30
  * @property {import("./Stroke.js").default} [stroke] Stroke style.
30
31
  * @property {number} [rotation=0] Rotation in radians (positive rotation clockwise).
31
32
  * @property {boolean} [rotateWithView=false] Whether to rotate the shape with the view.
32
33
  * @property {number|import("../size.js").Size} [scale=1] Scale. Unless two dimensional scaling is required a better
33
34
  * result may be obtained with appropriate settings for `radius`, `radius1` and `radius2`.
34
- * @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode
35
+ * @property {"declutter"|"obstacle"|"none"|undefined} [declutterMode] Declutter mode.
35
36
  */
36
37
 
37
38
  /**
package/util.js CHANGED
@@ -33,4 +33,4 @@ export function getUid(obj) {
33
33
  * OpenLayers version.
34
34
  * @type {string}
35
35
  */
36
- export const VERSION = '7.0.0-dev.1660818676079';
36
+ export const VERSION = '7.0.0-dev.1660829860979';