ol 7.0.0-dev.1660029478215 → 7.0.0-dev.1660134174309

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/Feature.d.ts CHANGED
@@ -65,20 +65,20 @@ export type ObjectWithGeometry<Geometry> = {
65
65
  * import Polygon from 'ol/geom/Polygon';
66
66
  * import Point from 'ol/geom/Point';
67
67
  *
68
- * var feature = new Feature({
68
+ * const feature = new Feature({
69
69
  * geometry: new Polygon(polyCoords),
70
70
  * labelPoint: new Point(labelCoords),
71
- * name: 'My Polygon'
71
+ * name: 'My Polygon',
72
72
  * });
73
73
  *
74
74
  * // get the polygon geometry
75
- * var poly = feature.getGeometry();
75
+ * const poly = feature.getGeometry();
76
76
  *
77
77
  * // Render the feature as a point using the coordinates from labelPoint
78
78
  * feature.setGeometryName('labelPoint');
79
79
  *
80
80
  * // get the point geometry
81
- * var point = feature.getGeometry();
81
+ * const point = feature.getGeometry();
82
82
  * ```
83
83
  *
84
84
  * @api
package/Feature.js CHANGED
@@ -53,20 +53,20 @@ import {listen, unlistenByKey} from './events.js';
53
53
  * import Polygon from 'ol/geom/Polygon';
54
54
  * import Point from 'ol/geom/Point';
55
55
  *
56
- * var feature = new Feature({
56
+ * const feature = new Feature({
57
57
  * geometry: new Polygon(polyCoords),
58
58
  * labelPoint: new Point(labelCoords),
59
- * name: 'My Polygon'
59
+ * name: 'My Polygon',
60
60
  * });
61
61
  *
62
62
  * // get the polygon geometry
63
- * var poly = feature.getGeometry();
63
+ * const poly = feature.getGeometry();
64
64
  *
65
65
  * // Render the feature as a point using the coordinates from labelPoint
66
66
  * feature.setGeometryName('labelPoint');
67
67
  *
68
68
  * // get the point geometry
69
- * var point = feature.getGeometry();
69
+ * const point = feature.getGeometry();
70
70
  * ```
71
71
  *
72
72
  * @api
package/Geolocation.d.ts CHANGED
@@ -54,7 +54,7 @@ export type GeolocationOnSignature<Return> = import("./Observable").OnSignature<
54
54
  *
55
55
  * Example:
56
56
  *
57
- * var geolocation = new Geolocation({
57
+ * const geolocation = new Geolocation({
58
58
  * // take the projection to use from the map's view
59
59
  * projection: view.getProjection()
60
60
  * });
package/Geolocation.js CHANGED
@@ -87,7 +87,7 @@ class GeolocationError extends BaseEvent {
87
87
  *
88
88
  * Example:
89
89
  *
90
- * var geolocation = new Geolocation({
90
+ * const geolocation = new Geolocation({
91
91
  * // take the projection to use from the map's view
92
92
  * projection: view.getProjection()
93
93
  * });
package/Map.d.ts CHANGED
@@ -221,17 +221,17 @@ export type MapOptions = {
221
221
  * import TileLayer from 'ol/layer/Tile';
222
222
  * import OSM from 'ol/source/OSM';
223
223
  *
224
- * var map = new Map({
224
+ * const map = new Map({
225
225
  * view: new View({
226
226
  * center: [0, 0],
227
- * zoom: 1
227
+ * zoom: 1,
228
228
  * }),
229
229
  * layers: [
230
230
  * new TileLayer({
231
- * source: new OSM()
232
- * })
231
+ * source: new OSM(),
232
+ * }),
233
233
  * ],
234
- * target: 'map'
234
+ * target: 'map',
235
235
  * });
236
236
  *
237
237
  * The above snippet creates a map using a {@link module:ol/layer/Tile~TileLayer} to
package/Map.js CHANGED
@@ -190,17 +190,17 @@ function setLayerMapProperty(layer, map) {
190
190
  * import TileLayer from 'ol/layer/Tile';
191
191
  * import OSM from 'ol/source/OSM';
192
192
  *
193
- * var map = new Map({
193
+ * const map = new Map({
194
194
  * view: new View({
195
195
  * center: [0, 0],
196
- * zoom: 1
196
+ * zoom: 1,
197
197
  * }),
198
198
  * layers: [
199
199
  * new TileLayer({
200
- * source: new OSM()
201
- * })
200
+ * source: new OSM(),
201
+ * }),
202
202
  * ],
203
- * target: 'map'
203
+ * target: 'map',
204
204
  * });
205
205
  *
206
206
  * The above snippet creates a map using a {@link module:ol/layer/Tile~TileLayer} to
package/Overlay.d.ts CHANGED
@@ -114,8 +114,9 @@ export type OverlayOnSignature<Return> = import("./Observable").OnSignature<impo
114
114
  *
115
115
  * import Overlay from 'ol/Overlay';
116
116
  *
117
- * var popup = new Overlay({
118
- * element: document.getElementById('popup')
117
+ * // ...
118
+ * const popup = new Overlay({
119
+ * element: document.getElementById('popup'),
119
120
  * });
120
121
  * popup.setPosition(coordinate);
121
122
  * map.addOverlay(popup);
package/Overlay.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["Overlay.js"],"names":[],"mappings":";;;;;;0BAWa,aAAa,GAAG,eAAe,GAAG,cAAc,GAAG,aAAa,GAAG,eAAe,GAAG,cAAc,GAAG,UAAU,GAAG,YAAY,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA2CnI,MAAM,KAAE,MAAM;;;;;;;;;;;;;sCAyBxB,OAAO,mBAAmB,EAAE,KAAK,GAAC,gBAAgB,GAAC,YAAY,GAAC,eAAe,GAAC,iBAAiB,GAC7G,oBAAwB;;;;yCAKZ,OAAO,cAAc,EAAE,WAAW,CAAC,OAAO,cAAc,EAAE,UAAU,EAAE,OAAO,mBAAmB,EAAE,OAAO,EAAE,MAAM,CAAC,GAC9H,OAAW,cAAc,EAAE,WAAW,CAAC,uBAAuB,EAAE,OAAO,UAAU,EAAE,WAAW,EAAE,MAAM,CAAC,GACvG,OAAW,cAAc,EAAE,mBAAmB,CAAC,OAAO,cAAc,EAAE,UAAU,GAAC,uBAAuB,EAAE,MAAM,CAAC;AATlH;;;GAGG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAgGjB;IA3FC;;OAEG;IACH,IAFU,mBAAmB,OAAO,UAAU,EAAE,SAAS,CAAC,CAEnD;IAEP;;OAEG;IACH,MAFU,mBAAmB,OAAO,UAAU,EAAE,SAAS,CAAC,CAEjD;IAET;;OAEG;IACH,IAFU,mBAAmB,IAAI,CAAC,CAE3B;IAEP;;;OAGG;IACH,mBAFU,OAAO,CAEK;I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;;;;OAKG;IACH,2EA2DC;IAED;;;;;;OAMG;IACH,2BALW,WAAW,QACX,OAAO,WAAW,EAAE,IAAI,GACvB,OAAO,aAAa,EAAE,MAAM,CAQvC;IAED;;;;;;OAMG;IACH,4BALW,WAAW,QAOrB;IAED;;;;OAIG;IACH,8BAHW,OAAO,QAQjB;IAED;;;OAGG;IACH,sCAWC;IAED;;;;OAIG;IACH,wCAJW,OAAO,YAAY,EAAE,KAAK,WAC1B,OAAO,WAAW,EAAE,IAAI,GAAC,SAAS,QA8C5C;IAED;;;OAGG;IACH,cAFY,OAAO,CAIlB;CACF"}
package/Overlay.js CHANGED
@@ -100,8 +100,9 @@ const Property = {
100
100
  *
101
101
  * import Overlay from 'ol/Overlay';
102
102
  *
103
- * var popup = new Overlay({
104
- * element: document.getElementById('popup')
103
+ * // ...
104
+ * const popup = new Overlay({
105
+ * element: document.getElementById('popup'),
105
106
  * });
106
107
  * popup.setPosition(coordinate);
107
108
  * map.addOverlay(popup);
package/Tile.d.ts CHANGED
@@ -14,10 +14,10 @@ export default Tile;
14
14
  * import TileState from 'ol/TileState';
15
15
  *
16
16
  * source.setTileLoadFunction(function(tile, src) {
17
- * var xhr = new XMLHttpRequest();
17
+ * const xhr = new XMLHttpRequest();
18
18
  * xhr.responseType = 'blob';
19
19
  * xhr.addEventListener('loadend', function (evt) {
20
- * var data = this.response;
20
+ * const data = this.response;
21
21
  * if (data !== undefined) {
22
22
  * tile.getImage().src = URL.createObjectURL(data);
23
23
  * } else {
@@ -71,10 +71,10 @@ export type Options = {
71
71
  * import TileState from 'ol/TileState';
72
72
  *
73
73
  * source.setTileLoadFunction(function(tile, src) {
74
- * var xhr = new XMLHttpRequest();
74
+ * const xhr = new XMLHttpRequest();
75
75
  * xhr.responseType = 'blob';
76
76
  * xhr.addEventListener('loadend', function (evt) {
77
- * var data = this.response;
77
+ * const data = this.response;
78
78
  * if (data !== undefined) {
79
79
  * tile.getImage().src = URL.createObjectURL(data);
80
80
  * } else {
package/Tile.js CHANGED
@@ -22,10 +22,10 @@ import {easeIn} from './easing.js';
22
22
  * import TileState from 'ol/TileState';
23
23
  *
24
24
  * source.setTileLoadFunction(function(tile, src) {
25
- * var xhr = new XMLHttpRequest();
25
+ * const xhr = new XMLHttpRequest();
26
26
  * xhr.responseType = 'blob';
27
27
  * xhr.addEventListener('loadend', function (evt) {
28
- * var data = this.response;
28
+ * const data = this.response;
29
29
  * if (data !== undefined) {
30
30
  * tile.getImage().src = URL.createObjectURL(data);
31
31
  * } else {
@@ -40,7 +40,7 @@ export type Options = {
40
40
  * This is the base class for controls. You can use it for simple custom
41
41
  * controls by creating the element with listeners, creating an instance:
42
42
  * ```js
43
- * var myControl = new Control({element: myElement});
43
+ * const myControl = new Control({element: myElement});
44
44
  * ```
45
45
  * and then adding this to the map.
46
46
  *
@@ -30,7 +30,7 @@ import {removeNode} from '../dom.js';
30
30
  * This is the base class for controls. You can use it for simple custom
31
31
  * controls by creating the element with listeners, creating an instance:
32
32
  * ```js
33
- * var myControl = new Control({element: myElement});
33
+ * const myControl = new Control({element: myElement});
34
34
  * ```
35
35
  * and then adding this to the map.
36
36
  *
package/coordinate.d.ts CHANGED
@@ -18,7 +18,7 @@
18
18
  *
19
19
  * import {add} from 'ol/coordinate';
20
20
  *
21
- * var coord = [7.85, 47.983333];
21
+ * const coord = [7.85, 47.983333];
22
22
  * add(coord, [-2, 4]);
23
23
  * // coord is now [5.85, 51.983333]
24
24
  *
@@ -59,18 +59,18 @@ export function closestOnSegment(coordinate: Coordinate, segment: Array<Coordina
59
59
  *
60
60
  * import {createStringXY} from 'ol/coordinate';
61
61
  *
62
- * var coord = [7.85, 47.983333];
63
- * var stringifyFunc = createStringXY();
64
- * var out = stringifyFunc(coord);
62
+ * const coord = [7.85, 47.983333];
63
+ * const stringifyFunc = createStringXY();
64
+ * const out = stringifyFunc(coord);
65
65
  * // out is now '8, 48'
66
66
  *
67
67
  * Example with explicitly specifying 2 fractional digits:
68
68
  *
69
69
  * import {createStringXY} from 'ol/coordinate';
70
70
  *
71
- * var coord = [7.85, 47.983333];
72
- * var stringifyFunc = createStringXY(2);
73
- * var out = stringifyFunc(coord);
71
+ * const coord = [7.85, 47.983333];
72
+ * const stringifyFunc = createStringXY(2);
73
+ * const out = stringifyFunc(coord);
74
74
  * // out is now '7.85, 47.98'
75
75
  *
76
76
  * @param {number} [opt_fractionDigits] The number of digits to include
@@ -96,18 +96,18 @@ export function degreesToStringHDMS(hemispheres: string, degrees: number, opt_fr
96
96
  *
97
97
  * import {format} from 'ol/coordinate';
98
98
  *
99
- * var coord = [7.85, 47.983333];
100
- * var template = 'Coordinate is ({x}|{y}).';
101
- * var out = format(coord, template);
99
+ * const coord = [7.85, 47.983333];
100
+ * const template = 'Coordinate is ({x}|{y}).';
101
+ * const out = format(coord, template);
102
102
  * // out is now 'Coordinate is (8|48).'
103
103
  *
104
104
  * Example explicitly specifying the fractional digits:
105
105
  *
106
106
  * import {format} from 'ol/coordinate';
107
107
  *
108
- * var coord = [7.85, 47.983333];
109
- * var template = 'Coordinate is ({x}|{y}).';
110
- * var out = format(coord, template, 2);
108
+ * const coord = [7.85, 47.983333];
109
+ * const template = 'Coordinate is ({x}|{y}).';
110
+ * const out = format(coord, template, 2);
111
111
  * // out is now 'Coordinate is (7.85|47.98).'
112
112
  *
113
113
  * @param {Coordinate} coordinate Coordinate.
@@ -133,8 +133,8 @@ export function equals(coordinate1: Coordinate, coordinate2: Coordinate): boolea
133
133
  *
134
134
  * import {rotate} from 'ol/coordinate';
135
135
  *
136
- * var coord = [7.85, 47.983333];
137
- * var rotateRadians = Math.PI / 2; // 90 degrees
136
+ * const coord = [7.85, 47.983333];
137
+ * const rotateRadians = Math.PI / 2; // 90 degrees
138
138
  * rotate(coord, rotateRadians);
139
139
  * // coord is now [-47.983333, 7.85]
140
140
  *
@@ -152,8 +152,8 @@ export function rotate(coordinate: Coordinate, angle: number): Coordinate;
152
152
  *
153
153
  * import {scale as scaleCoordinate} from 'ol/coordinate';
154
154
  *
155
- * var coord = [7.85, 47.983333];
156
- * var scale = 1.2;
155
+ * const coord = [7.85, 47.983333];
156
+ * const scale = 1.2;
157
157
  * scaleCoordinate(coord, scale);
158
158
  * // coord is now [9.42, 57.5799996]
159
159
  *
@@ -191,16 +191,16 @@ export function squaredDistanceToSegment(coordinate: Coordinate, segment: Array<
191
191
  *
192
192
  * import {toStringHDMS} from 'ol/coordinate';
193
193
  *
194
- * var coord = [7.85, 47.983333];
195
- * var out = toStringHDMS(coord);
194
+ * const coord = [7.85, 47.983333];
195
+ * const out = toStringHDMS(coord);
196
196
  * // out is now '47° 58′ 60″ N 7° 50′ 60″ E'
197
197
  *
198
198
  * Example explicitly specifying 1 fractional digit:
199
199
  *
200
200
  * import {toStringHDMS} from 'ol/coordinate';
201
201
  *
202
- * var coord = [7.85, 47.983333];
203
- * var out = toStringHDMS(coord, 1);
202
+ * const coord = [7.85, 47.983333];
203
+ * const out = toStringHDMS(coord, 1);
204
204
  * // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'
205
205
  *
206
206
  * @param {Coordinate} coordinate Coordinate.
@@ -217,16 +217,16 @@ export function toStringHDMS(coordinate: Coordinate, opt_fractionDigits?: number
217
217
  *
218
218
  * import {toStringXY} from 'ol/coordinate';
219
219
  *
220
- * var coord = [7.85, 47.983333];
221
- * var out = toStringXY(coord);
220
+ * const coord = [7.85, 47.983333];
221
+ * const out = toStringXY(coord);
222
222
  * // out is now '8, 48'
223
223
  *
224
224
  * Example explicitly specifying 1 fractional digit:
225
225
  *
226
226
  * import {toStringXY} from 'ol/coordinate';
227
227
  *
228
- * var coord = [7.85, 47.983333];
229
- * var out = toStringXY(coord, 1);
228
+ * const coord = [7.85, 47.983333];
229
+ * const out = toStringXY(coord, 1);
230
230
  * // out is now '7.8, 48.0'
231
231
  *
232
232
  * @param {Coordinate} coordinate Coordinate.
package/coordinate.js CHANGED
@@ -27,7 +27,7 @@ import {padNumber} from './string.js';
27
27
  *
28
28
  * import {add} from 'ol/coordinate';
29
29
  *
30
- * var coord = [7.85, 47.983333];
30
+ * const coord = [7.85, 47.983333];
31
31
  * add(coord, [-2, 4]);
32
32
  * // coord is now [5.85, 51.983333]
33
33
  *
@@ -121,18 +121,18 @@ export function closestOnSegment(coordinate, segment) {
121
121
  *
122
122
  * import {createStringXY} from 'ol/coordinate';
123
123
  *
124
- * var coord = [7.85, 47.983333];
125
- * var stringifyFunc = createStringXY();
126
- * var out = stringifyFunc(coord);
124
+ * const coord = [7.85, 47.983333];
125
+ * const stringifyFunc = createStringXY();
126
+ * const out = stringifyFunc(coord);
127
127
  * // out is now '8, 48'
128
128
  *
129
129
  * Example with explicitly specifying 2 fractional digits:
130
130
  *
131
131
  * import {createStringXY} from 'ol/coordinate';
132
132
  *
133
- * var coord = [7.85, 47.983333];
134
- * var stringifyFunc = createStringXY(2);
135
- * var out = stringifyFunc(coord);
133
+ * const coord = [7.85, 47.983333];
134
+ * const stringifyFunc = createStringXY(2);
135
+ * const out = stringifyFunc(coord);
136
136
  * // out is now '7.85, 47.98'
137
137
  *
138
138
  * @param {number} [opt_fractionDigits] The number of digits to include
@@ -201,18 +201,18 @@ export function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {
201
201
  *
202
202
  * import {format} from 'ol/coordinate';
203
203
  *
204
- * var coord = [7.85, 47.983333];
205
- * var template = 'Coordinate is ({x}|{y}).';
206
- * var out = format(coord, template);
204
+ * const coord = [7.85, 47.983333];
205
+ * const template = 'Coordinate is ({x}|{y}).';
206
+ * const out = format(coord, template);
207
207
  * // out is now 'Coordinate is (8|48).'
208
208
  *
209
209
  * Example explicitly specifying the fractional digits:
210
210
  *
211
211
  * import {format} from 'ol/coordinate';
212
212
  *
213
- * var coord = [7.85, 47.983333];
214
- * var template = 'Coordinate is ({x}|{y}).';
215
- * var out = format(coord, template, 2);
213
+ * const coord = [7.85, 47.983333];
214
+ * const template = 'Coordinate is ({x}|{y}).';
215
+ * const out = format(coord, template, 2);
216
216
  * // out is now 'Coordinate is (7.85|47.98).'
217
217
  *
218
218
  * @param {Coordinate} coordinate Coordinate.
@@ -257,8 +257,8 @@ export function equals(coordinate1, coordinate2) {
257
257
  *
258
258
  * import {rotate} from 'ol/coordinate';
259
259
  *
260
- * var coord = [7.85, 47.983333];
261
- * var rotateRadians = Math.PI / 2; // 90 degrees
260
+ * const coord = [7.85, 47.983333];
261
+ * const rotateRadians = Math.PI / 2; // 90 degrees
262
262
  * rotate(coord, rotateRadians);
263
263
  * // coord is now [-47.983333, 7.85]
264
264
  *
@@ -285,8 +285,8 @@ export function rotate(coordinate, angle) {
285
285
  *
286
286
  * import {scale as scaleCoordinate} from 'ol/coordinate';
287
287
  *
288
- * var coord = [7.85, 47.983333];
289
- * var scale = 1.2;
288
+ * const coord = [7.85, 47.983333];
289
+ * const scale = 1.2;
290
290
  * scaleCoordinate(coord, scale);
291
291
  * // coord is now [9.42, 57.5799996]
292
292
  *
@@ -340,16 +340,16 @@ export function squaredDistanceToSegment(coordinate, segment) {
340
340
  *
341
341
  * import {toStringHDMS} from 'ol/coordinate';
342
342
  *
343
- * var coord = [7.85, 47.983333];
344
- * var out = toStringHDMS(coord);
343
+ * const coord = [7.85, 47.983333];
344
+ * const out = toStringHDMS(coord);
345
345
  * // out is now '47° 58′ 60″ N 7° 50′ 60″ E'
346
346
  *
347
347
  * Example explicitly specifying 1 fractional digit:
348
348
  *
349
349
  * import {toStringHDMS} from 'ol/coordinate';
350
350
  *
351
- * var coord = [7.85, 47.983333];
352
- * var out = toStringHDMS(coord, 1);
351
+ * const coord = [7.85, 47.983333];
352
+ * const out = toStringHDMS(coord, 1);
353
353
  * // out is now '47° 58′ 60.0″ N 7° 50′ 60.0″ E'
354
354
  *
355
355
  * @param {Coordinate} coordinate Coordinate.
@@ -377,16 +377,16 @@ export function toStringHDMS(coordinate, opt_fractionDigits) {
377
377
  *
378
378
  * import {toStringXY} from 'ol/coordinate';
379
379
  *
380
- * var coord = [7.85, 47.983333];
381
- * var out = toStringXY(coord);
380
+ * const coord = [7.85, 47.983333];
381
+ * const out = toStringXY(coord);
382
382
  * // out is now '8, 48'
383
383
  *
384
384
  * Example explicitly specifying 1 fractional digit:
385
385
  *
386
386
  * import {toStringXY} from 'ol/coordinate';
387
387
  *
388
- * var coord = [7.85, 47.983333];
389
- * var out = toStringXY(coord, 1);
388
+ * const coord = [7.85, 47.983333];
389
+ * const out = toStringXY(coord, 1);
390
390
  * // out is now '7.8, 48.0'
391
391
  *
392
392
  * @param {Coordinate} coordinate Coordinate.
package/format/readme.md CHANGED
@@ -60,7 +60,7 @@ It's handy to have the [`src/ol/xml.js` source code](https://github.com/openlaye
60
60
  The `parserNS` argument to `parse` is an `Object` whose keys are XML namespaces and whose values are `Objects` whose keys are local element names and whose values are functions. A simple example might look like this:
61
61
 
62
62
  ```js
63
- var parserNS = {
63
+ const parserNS = {
64
64
  'http://my/first/namespace': {
65
65
  'elementLocalName': function(/* ... */) {
66
66
  // parse an <elementLocalName> element in the http://my/first/namespace namespace
@@ -235,18 +235,18 @@ export type Options = {
235
235
  * property (all layers must share the same vector source). See the constructor options for
236
236
  * more detail.
237
237
  *
238
- * var map = new Map({
238
+ * const map = new Map({
239
239
  * view: new View({
240
240
  * center: [0, 0],
241
- * zoom: 1
241
+ * zoom: 1,
242
242
  * }),
243
243
  * layers: [
244
244
  * new MapboxVectorLayer({
245
245
  * styleUrl: 'mapbox://styles/mapbox/bright-v9',
246
- * accessToken: 'your-mapbox-access-token-here'
247
- * })
246
+ * accessToken: 'your-mapbox-access-token-here',
247
+ * }),
248
248
  * ],
249
- * target: 'map'
249
+ * target: 'map',
250
250
  * });
251
251
  *
252
252
  * On configuration or loading error, the layer will trigger an `'error'` event. Listeners
@@ -113,18 +113,18 @@ class ErrorEvent extends BaseEvent {
113
113
  * property (all layers must share the same vector source). See the constructor options for
114
114
  * more detail.
115
115
  *
116
- * var map = new Map({
116
+ * const map = new Map({
117
117
  * view: new View({
118
118
  * center: [0, 0],
119
- * zoom: 1
119
+ * zoom: 1,
120
120
  * }),
121
121
  * layers: [
122
122
  * new MapboxVectorLayer({
123
123
  * styleUrl: 'mapbox://styles/mapbox/bright-v9',
124
- * accessToken: 'your-mapbox-access-token-here'
125
- * })
124
+ * accessToken: 'your-mapbox-access-token-here',
125
+ * }),
126
126
  * ],
127
- * target: 'map'
127
+ * target: 'map',
128
128
  * });
129
129
  *
130
130
  * On configuration or loading error, the layer will trigger an `'error'` event. Listeners
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol",
3
- "version": "7.0.0-dev.1660029478215",
3
+ "version": "7.0.0-dev.1660134174309",
4
4
  "description": "OpenLayers mapping library",
5
5
  "keywords": [
6
6
  "map",
package/render.d.ts CHANGED
@@ -35,12 +35,15 @@
35
35
  * import Fill from 'ol/style/Fill';
36
36
  * import Polygon from 'ol/geom/Polygon';
37
37
  *
38
- * var canvas = document.createElement('canvas');
39
- * var render = toContext(canvas.getContext('2d'),
40
- * { size: [100, 100] });
38
+ * const canvas = document.createElement('canvas');
39
+ * const render = toContext(
40
+ * canvas.getContext('2d'),
41
+ * {size: [100, 100]}
42
+ * );
41
43
  * render.setFillStrokeStyle(new Fill({ color: blue }));
42
44
  * render.drawPolygon(
43
- * new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]]));
45
+ * new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]])
46
+ * );
44
47
  * ```
45
48
  *
46
49
  * @param {CanvasRenderingContext2D} context Canvas context.
package/render.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["render.js"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AAEH;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,mCALW,wBAAwB,+CAEvB,uBAAuB,CAiBlC;AAED;;;;;GAKG;AACH,wCAJW,OAAO,mBAAmB,EAAE,OAAO,GAClC,uBAAuB,CAqClC;AAED;;;;;;;GAOG;AACH,sCANW,OAAO,mBAAmB,EAAE,OAAO,SACnC,OAAO,YAAY,EAAE,KAAK,GAEzB,OAAO,YAAY,EAAE,KAAK,CAKrC;;;;;aAvHa,wBAAwB;;;;aACxB,OAAO,cAAc,EAAE,WAAW;;;;cAClC,OAAO,0BAA0B,EAAE,OAAO;;;;gBAC1C,MAAM;;;;;gBACN,MAAM;;;;cAEN,MAAM;;;;;;;mCAQE,OAAO,cAAc,EAAE,WAAW,QAAE,OAAO,cAAc,EAAE,WAAW,KAAE,MAAM"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["render.js"],"names":[],"mappings":"AAcA;;;;;;;;;GASG;AAEH;;;;;;GAMG;AAEH;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,mCALW,wBAAwB,+CAEvB,uBAAuB,CAiBlC;AAED;;;;;GAKG;AACH,wCAJW,OAAO,mBAAmB,EAAE,OAAO,GAClC,uBAAuB,CAqClC;AAED;;;;;;;GAOG;AACH,sCANW,OAAO,mBAAmB,EAAE,OAAO,SACnC,OAAO,YAAY,EAAE,KAAK,GAEzB,OAAO,YAAY,EAAE,KAAK,CAKrC;;;;;aA1Ha,wBAAwB;;;;aACxB,OAAO,cAAc,EAAE,WAAW;;;;cAClC,OAAO,0BAA0B,EAAE,OAAO;;;;gBAC1C,MAAM;;;;;gBACN,MAAM;;;;cAEN,MAAM;;;;;;;mCAQE,OAAO,cAAc,EAAE,WAAW,QAAE,OAAO,cAAc,EAAE,WAAW,KAAE,MAAM"}
package/render.js CHANGED
@@ -52,12 +52,15 @@ import {getTransformFromProjections, getUserProjection} from './proj.js';
52
52
  * import Fill from 'ol/style/Fill';
53
53
  * import Polygon from 'ol/geom/Polygon';
54
54
  *
55
- * var canvas = document.createElement('canvas');
56
- * var render = toContext(canvas.getContext('2d'),
57
- * { size: [100, 100] });
55
+ * const canvas = document.createElement('canvas');
56
+ * const render = toContext(
57
+ * canvas.getContext('2d'),
58
+ * {size: [100, 100]}
59
+ * );
58
60
  * render.setFillStrokeStyle(new Fill({ color: blue }));
59
61
  * render.drawPolygon(
60
- * new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]]));
62
+ * new Polygon([[[0, 0], [100, 100], [100, 0], [0, 0]]])
63
+ * );
61
64
  * ```
62
65
  *
63
66
  * @param {CanvasRenderingContext2D} context Canvas context.
package/source/Raster.js CHANGED
@@ -136,15 +136,15 @@ function createMinion(operation) {
136
136
  */
137
137
  function createWorker(config, onMessage) {
138
138
  const lib = Object.keys(config.lib || {}).map(function (name) {
139
- return 'var ' + name + ' = ' + config.lib[name].toString() + ';';
139
+ return 'const ' + name + ' = ' + config.lib[name].toString() + ';';
140
140
  });
141
141
 
142
142
  const lines = lib.concat([
143
- 'var __minion__ = (' + createMinion.toString() + ')(',
143
+ 'const __minion__ = (' + createMinion.toString() + ')(',
144
144
  config.operation.toString(),
145
145
  ');',
146
146
  'self.addEventListener("message", function(event) {',
147
- ' var buffer = __minion__(event.data);',
147
+ ' const buffer = __minion__(event.data);',
148
148
  ' self.postMessage({buffer: buffer, meta: event.data.meta}, [buffer]);',
149
149
  '});',
150
150
  ]);
@@ -71,24 +71,24 @@ export type Options<Geometry extends import("../geom/Geometry.js").default = imp
71
71
  * import {GeoJSON} from 'ol/format';
72
72
  * import {bbox} from 'ol/loadingstrategy';
73
73
  *
74
- * var vectorSource = new Vector({
74
+ * const vectorSource = new Vector({
75
75
  * format: new GeoJSON(),
76
76
  * loader: function(extent, resolution, projection, success, failure) {
77
- * var proj = projection.getCode();
78
- * var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +
77
+ * const proj = projection.getCode();
78
+ * const url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +
79
79
  * 'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +
80
80
  * 'outputFormat=application/json&srsname=' + proj + '&' +
81
81
  * 'bbox=' + extent.join(',') + ',' + proj;
82
- * var xhr = new XMLHttpRequest();
82
+ * const xhr = new XMLHttpRequest();
83
83
  * xhr.open('GET', url);
84
- * var onError = function() {
84
+ * const onError = function() {
85
85
  * vectorSource.removeLoadedExtent(extent);
86
86
  * failure();
87
87
  * }
88
88
  * xhr.onerror = onError;
89
89
  * xhr.onload = function() {
90
90
  * if (xhr.status == 200) {
91
- * var features = vectorSource.getFormat().readFeatures(xhr.responseText);
91
+ * const features = vectorSource.getFormat().readFeatures(xhr.responseText);
92
92
  * vectorSource.addFeatures(features);
93
93
  * success(features);
94
94
  * } else {
@@ -97,7 +97,7 @@ export type Options<Geometry extends import("../geom/Geometry.js").default = imp
97
97
  * }
98
98
  * xhr.send();
99
99
  * },
100
- * strategy: bbox
100
+ * strategy: bbox,
101
101
  * });
102
102
  * ```
103
103
  */
@@ -185,24 +185,24 @@ import Event from "../events/Event.js";
185
185
  * import {GeoJSON} from 'ol/format';
186
186
  * import {bbox} from 'ol/loadingstrategy';
187
187
  *
188
- * var vectorSource = new Vector({
188
+ * const vectorSource = new Vector({
189
189
  * format: new GeoJSON(),
190
190
  * loader: function(extent, resolution, projection, success, failure) {
191
- * var proj = projection.getCode();
192
- * var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +
191
+ * const proj = projection.getCode();
192
+ * const url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +
193
193
  * 'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +
194
194
  * 'outputFormat=application/json&srsname=' + proj + '&' +
195
195
  * 'bbox=' + extent.join(',') + ',' + proj;
196
- * var xhr = new XMLHttpRequest();
196
+ * const xhr = new XMLHttpRequest();
197
197
  * xhr.open('GET', url);
198
- * var onError = function() {
198
+ * const onError = function() {
199
199
  * vectorSource.removeLoadedExtent(extent);
200
200
  * failure();
201
201
  * }
202
202
  * xhr.onerror = onError;
203
203
  * xhr.onload = function() {
204
204
  * if (xhr.status == 200) {
205
- * var features = vectorSource.getFormat().readFeatures(xhr.responseText);
205
+ * const features = vectorSource.getFormat().readFeatures(xhr.responseText);
206
206
  * vectorSource.addFeatures(features);
207
207
  * success(features);
208
208
  * } else {
@@ -211,7 +211,7 @@ import Event from "../events/Event.js";
211
211
  * }
212
212
  * xhr.send();
213
213
  * },
214
- * strategy: bbox
214
+ * strategy: bbox,
215
215
  * });
216
216
  * ```
217
217
  * @property {boolean} [overlaps=true] This source may have overlapping geometries.
package/source/Vector.js CHANGED
@@ -90,24 +90,24 @@ export class VectorSourceEvent extends Event {
90
90
  * import {GeoJSON} from 'ol/format';
91
91
  * import {bbox} from 'ol/loadingstrategy';
92
92
  *
93
- * var vectorSource = new Vector({
93
+ * const vectorSource = new Vector({
94
94
  * format: new GeoJSON(),
95
95
  * loader: function(extent, resolution, projection, success, failure) {
96
- * var proj = projection.getCode();
97
- * var url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +
96
+ * const proj = projection.getCode();
97
+ * const url = 'https://ahocevar.com/geoserver/wfs?service=WFS&' +
98
98
  * 'version=1.1.0&request=GetFeature&typename=osm:water_areas&' +
99
99
  * 'outputFormat=application/json&srsname=' + proj + '&' +
100
100
  * 'bbox=' + extent.join(',') + ',' + proj;
101
- * var xhr = new XMLHttpRequest();
101
+ * const xhr = new XMLHttpRequest();
102
102
  * xhr.open('GET', url);
103
- * var onError = function() {
103
+ * const onError = function() {
104
104
  * vectorSource.removeLoadedExtent(extent);
105
105
  * failure();
106
106
  * }
107
107
  * xhr.onerror = onError;
108
108
  * xhr.onload = function() {
109
109
  * if (xhr.status == 200) {
110
- * var features = vectorSource.getFormat().readFeatures(xhr.responseText);
110
+ * const features = vectorSource.getFormat().readFeatures(xhr.responseText);
111
111
  * vectorSource.addFeatures(features);
112
112
  * success(features);
113
113
  * } else {
@@ -116,7 +116,7 @@ export class VectorSourceEvent extends Event {
116
116
  * }
117
117
  * xhr.send();
118
118
  * },
119
- * strategy: bbox
119
+ * strategy: bbox,
120
120
  * });
121
121
  * ```
122
122
  * @property {boolean} [overlaps=true] This source may have overlapping geometries.
package/util.d.ts CHANGED
@@ -2,9 +2,9 @@
2
2
  * @module ol/util
3
3
  */
4
4
  /**
5
- * @return {?} Any return.
5
+ * @return {never} Any return.
6
6
  */
7
- export function abstract(): unknown;
7
+ export function abstract(): never;
8
8
  /**
9
9
  * Gets a unique ID for an object. This mutates the object so that further calls
10
10
  * with the same object as a parameter returns the same value. Unique IDs are generated
package/util.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,oCAMC;AASD;;;;;;;;GAQG;AACH,kCAHY,MAAM,CAKjB;AAED;;;GAGG;AACH,sBAFU,MAAM,CAEgB"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["util.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,4BAFY,KAAK,CAIhB;AASD;;;;;;;;GAQG;AACH,kCAHY,MAAM,CAKjB;AAED;;;GAGG;AACH,sBAFU,MAAM,CAEgB"}
package/util.js CHANGED
@@ -3,14 +3,10 @@
3
3
  */
4
4
 
5
5
  /**
6
- * @return {?} Any return.
6
+ * @return {never} Any return.
7
7
  */
8
8
  export function abstract() {
9
- return /** @type {?} */ (
10
- (function () {
11
- throw new Error('Unimplemented abstract method.');
12
- })()
13
- );
9
+ throw new Error('Unimplemented abstract method.');
14
10
  }
15
11
 
16
12
  /**
@@ -37,4 +33,4 @@ export function getUid(obj) {
37
33
  * OpenLayers version.
38
34
  * @type {string}
39
35
  */
40
- export const VERSION = 'latest';
36
+ export const VERSION = '7.0.0-dev.1660134174309';