ol 7.0.0-dev.1658967082721 → 7.0.0-dev.1659037691355
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.map +1 -1
- package/Map.js +1 -2
- package/Map.js.map +1 -1
- package/Object.js +3 -3
- package/Object.js.map +1 -1
- package/View.d.ts.map +1 -1
- package/View.js +5 -6
- package/View.js.map +1 -1
- package/coordinate.d.ts.map +1 -1
- package/coordinate.js +14 -14
- package/coordinate.js.map +1 -1
- package/format/EsriJSON.js +3 -3
- package/format/EsriJSON.js.map +1 -1
- package/format/Feature.d.ts.map +1 -1
- package/format/Feature.js +1 -2
- package/format/Feature.js.map +1 -1
- package/format/GML2.d.ts.map +1 -1
- package/format/GML2.js +2 -3
- package/format/GML2.js.map +1 -1
- package/format/GML3.d.ts.map +1 -1
- package/format/GML3.js +5 -6
- package/format/GML3.js.map +1 -1
- package/format/GMLBase.d.ts.map +1 -1
- package/format/GMLBase.js +1 -2
- package/format/GMLBase.js.map +1 -1
- package/format/GeoJSON.js +2 -2
- package/format/GeoJSON.js.map +1 -1
- package/format/WFS.d.ts.map +1 -1
- package/format/WFS.js +12 -13
- package/format/WFS.js.map +1 -1
- package/format/WKB.d.ts.map +1 -1
- package/format/WKB.js +2 -3
- package/format/WKB.js.map +1 -1
- package/format/WMSGetFeatureInfo.d.ts.map +1 -1
- package/format/WMSGetFeatureInfo.js +1 -2
- package/format/WMSGetFeatureInfo.js.map +1 -1
- package/interaction/Link.d.ts.map +1 -1
- package/interaction/Link.js +2 -3
- package/interaction/Link.js.map +1 -1
- package/layer/Base.d.ts.map +1 -1
- package/layer/Base.js +2 -3
- package/layer/Base.js.map +1 -1
- package/layer/BaseTile.d.ts.map +1 -1
- package/layer/BaseTile.js +1 -2
- package/layer/BaseTile.js.map +1 -1
- package/layer/BaseVector.d.ts.map +1 -1
- package/layer/BaseVector.js +1 -2
- package/layer/BaseVector.js.map +1 -1
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Graticule.js +1 -2
- package/layer/Graticule.js.map +1 -1
- package/layer/Group.js +2 -2
- package/layer/Group.js.map +1 -1
- package/layer/Heatmap.d.ts.map +1 -1
- package/layer/Heatmap.js +1 -2
- package/layer/Heatmap.js.map +1 -1
- package/layer/Layer.d.ts.map +1 -1
- package/layer/Layer.js +1 -2
- package/layer/Layer.js.map +1 -1
- package/layer/VectorImage.d.ts.map +1 -1
- package/layer/VectorImage.js +1 -2
- package/layer/VectorImage.js.map +1 -1
- package/layer/VectorTile.d.ts.map +1 -1
- package/layer/VectorTile.js +1 -2
- package/layer/VectorTile.js.map +1 -1
- package/layer/WebGLPoints.d.ts.map +1 -1
- package/layer/WebGLPoints.js +2 -3
- package/layer/WebGLPoints.js.map +1 -1
- package/layer/WebGLTile.d.ts.map +1 -1
- package/layer/WebGLTile.js +2 -3
- package/layer/WebGLTile.js.map +1 -1
- package/obj.d.ts +3 -1
- package/obj.d.ts.map +1 -1
- package/obj.js +0 -28
- package/obj.js.map +1 -1
- package/package.json +2 -2
- package/renderer/canvas/ImageLayer.d.ts.map +1 -1
- package/renderer/canvas/ImageLayer.js +2 -3
- package/renderer/canvas/ImageLayer.js.map +1 -1
- package/renderer/canvas/TileLayer.d.ts.map +1 -1
- package/renderer/canvas/TileLayer.js +2 -3
- package/renderer/canvas/TileLayer.js.map +1 -1
- package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
- package/renderer/canvas/VectorImageLayer.js +3 -4
- package/renderer/canvas/VectorImageLayer.js.map +1 -1
- package/reproj.d.ts.map +1 -1
- package/reproj.js +2 -3
- package/reproj.js.map +1 -1
- package/source/CartoDB.d.ts.map +1 -1
- package/source/CartoDB.js +1 -2
- package/source/CartoDB.js.map +1 -1
- package/source/DataTile.d.ts.map +1 -1
- package/source/DataTile.js +1 -2
- package/source/DataTile.js.map +1 -1
- package/source/ImageArcGISRest.d.ts.map +1 -1
- package/source/ImageArcGISRest.js +2 -3
- package/source/ImageArcGISRest.js.map +1 -1
- package/source/ImageMapGuide.d.ts.map +1 -1
- package/source/ImageMapGuide.js +2 -3
- package/source/ImageMapGuide.js.map +1 -1
- package/source/ImageStatic.d.ts.map +1 -1
- package/source/ImageStatic.js +1 -2
- package/source/ImageStatic.js.map +1 -1
- package/source/ImageWMS.d.ts.map +1 -1
- package/source/ImageWMS.js +4 -5
- package/source/ImageWMS.js.map +1 -1
- package/source/Raster.d.ts.map +1 -1
- package/source/Raster.js +2 -3
- package/source/Raster.js.map +1 -1
- package/source/TileArcGISRest.d.ts.map +1 -1
- package/source/TileArcGISRest.js +2 -3
- package/source/TileArcGISRest.js.map +1 -1
- package/source/TileWMS.d.ts.map +1 -1
- package/source/TileWMS.js +4 -5
- package/source/TileWMS.js.map +1 -1
- package/source/WMTS.d.ts.map +1 -1
- package/source/WMTS.js +3 -4
- package/source/WMTS.js.map +1 -1
- package/source/ogcTileUtil.d.ts.map +1 -1
- package/source/ogcTileUtil.js +1 -2
- package/source/ogcTileUtil.js.map +1 -1
- package/src/Map.js +1 -2
- package/src/Object.js +3 -3
- package/src/View.js +5 -6
- package/src/coordinate.js +15 -16
- package/src/format/EsriJSON.js +3 -3
- package/src/format/Feature.js +1 -2
- package/src/format/GML2.js +2 -3
- package/src/format/GML3.js +5 -6
- package/src/format/GMLBase.js +1 -2
- package/src/format/GeoJSON.js +2 -2
- package/src/format/WFS.js +15 -13
- package/src/format/WKB.js +2 -3
- package/src/format/WMSGetFeatureInfo.js +1 -2
- package/src/interaction/Link.js +2 -3
- package/src/layer/Base.js +2 -3
- package/src/layer/BaseTile.js +1 -2
- package/src/layer/BaseVector.js +1 -2
- package/src/layer/Graticule.js +1 -2
- package/src/layer/Group.js +2 -2
- package/src/layer/Heatmap.js +1 -2
- package/src/layer/Layer.js +1 -2
- package/src/layer/VectorImage.js +1 -2
- package/src/layer/VectorTile.js +1 -2
- package/src/layer/WebGLPoints.js +2 -3
- package/src/layer/WebGLTile.js +2 -3
- package/src/obj.js +0 -31
- package/src/renderer/canvas/ImageLayer.js +2 -3
- package/src/renderer/canvas/TileLayer.js +2 -3
- package/src/renderer/canvas/VectorImageLayer.js +3 -4
- package/src/reproj.js +2 -3
- package/src/source/CartoDB.js +1 -2
- package/src/source/DataTile.js +1 -2
- package/src/source/ImageArcGISRest.js +2 -3
- package/src/source/ImageMapGuide.js +2 -3
- package/src/source/ImageStatic.js +1 -2
- package/src/source/ImageWMS.js +4 -5
- package/src/source/Raster.js +2 -3
- package/src/source/TileArcGISRest.js +2 -3
- package/src/source/TileWMS.js +4 -5
- package/src/source/WMTS.js +3 -4
- package/src/source/ogcTileUtil.js +1 -2
- package/src/webgl.js +1 -2
- package/src/worker/webgl.js +1 -1
- package/util.js +1 -1
- package/webgl.d.ts.map +1 -1
- package/webgl.js +1 -2
- package/webgl.js.map +1 -1
- package/worker/webgl.js +1 -1
- package/worker/webgl.js.map +1 -1
package/src/View.js
CHANGED
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
rotate as rotateCoordinate,
|
|
25
25
|
} from './coordinate.js';
|
|
26
26
|
import {assert} from './asserts.js';
|
|
27
|
-
import {assign} from './obj.js';
|
|
28
27
|
import {none as centerNone, createExtent} from './centerconstraint.js';
|
|
29
28
|
import {clamp, modulo} from './math.js';
|
|
30
29
|
import {
|
|
@@ -325,7 +324,7 @@ class View extends BaseObject {
|
|
|
325
324
|
*/
|
|
326
325
|
this.un;
|
|
327
326
|
|
|
328
|
-
const options = assign({}, opt_options);
|
|
327
|
+
const options = Object.assign({}, opt_options);
|
|
329
328
|
|
|
330
329
|
/**
|
|
331
330
|
* @private
|
|
@@ -418,7 +417,7 @@ class View extends BaseObject {
|
|
|
418
417
|
* @param {ViewOptions} options View options.
|
|
419
418
|
*/
|
|
420
419
|
applyOptions_(options) {
|
|
421
|
-
const properties = assign({}, options);
|
|
420
|
+
const properties = Object.assign({}, options);
|
|
422
421
|
for (const key in ViewProperty) {
|
|
423
422
|
delete properties[key];
|
|
424
423
|
}
|
|
@@ -541,7 +540,7 @@ class View extends BaseObject {
|
|
|
541
540
|
// preserve rotation
|
|
542
541
|
options.rotation = this.getRotation();
|
|
543
542
|
|
|
544
|
-
return assign({}, options, newOptions);
|
|
543
|
+
return Object.assign({}, options, newOptions);
|
|
545
544
|
}
|
|
546
545
|
|
|
547
546
|
/**
|
|
@@ -585,14 +584,14 @@ class View extends BaseObject {
|
|
|
585
584
|
for (let i = 0; i < args.length; ++i) {
|
|
586
585
|
let options = arguments[i];
|
|
587
586
|
if (options.center) {
|
|
588
|
-
options = assign({}, options);
|
|
587
|
+
options = Object.assign({}, options);
|
|
589
588
|
options.center = fromUserCoordinate(
|
|
590
589
|
options.center,
|
|
591
590
|
this.getProjection()
|
|
592
591
|
);
|
|
593
592
|
}
|
|
594
593
|
if (options.anchor) {
|
|
595
|
-
options = assign({}, options);
|
|
594
|
+
options = Object.assign({}, options);
|
|
596
595
|
options.anchor = fromUserCoordinate(
|
|
597
596
|
options.anchor,
|
|
598
597
|
this.getProjection()
|
package/src/coordinate.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module ol/coordinate
|
|
3
3
|
*/
|
|
4
4
|
import {getWidth} from './extent.js';
|
|
5
|
-
import {modulo} from './math.js';
|
|
5
|
+
import {modulo, toFixed} from './math.js';
|
|
6
6
|
import {padNumber} from './string.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -162,13 +162,11 @@ export function createStringXY(opt_fractionDigits) {
|
|
|
162
162
|
export function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {
|
|
163
163
|
const normalizedDegrees = modulo(degrees + 180, 360) - 180;
|
|
164
164
|
const x = Math.abs(3600 * normalizedDegrees);
|
|
165
|
-
const
|
|
166
|
-
const precision = Math.pow(10, dflPrecision);
|
|
165
|
+
const decimals = opt_fractionDigits || 0;
|
|
167
166
|
|
|
168
167
|
let deg = Math.floor(x / 3600);
|
|
169
168
|
let min = Math.floor((x - deg * 3600) / 60);
|
|
170
|
-
let sec = x - deg * 3600 - min * 60;
|
|
171
|
-
sec = Math.ceil(sec * precision) / precision;
|
|
169
|
+
let sec = toFixed(x - deg * 3600 - min * 60, decimals);
|
|
172
170
|
|
|
173
171
|
if (sec >= 60) {
|
|
174
172
|
sec = 0;
|
|
@@ -180,17 +178,18 @@ export function degreesToStringHDMS(hemispheres, degrees, opt_fractionDigits) {
|
|
|
180
178
|
deg += 1;
|
|
181
179
|
}
|
|
182
180
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
'
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
padNumber(sec, 2,
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
181
|
+
let hdms = deg + '\u00b0';
|
|
182
|
+
if (min !== 0 || sec !== 0) {
|
|
183
|
+
hdms += ' ' + padNumber(min, 2) + '\u2032';
|
|
184
|
+
}
|
|
185
|
+
if (sec !== 0) {
|
|
186
|
+
hdms += ' ' + padNumber(sec, 2, decimals) + '\u2033';
|
|
187
|
+
}
|
|
188
|
+
if (normalizedDegrees !== 0) {
|
|
189
|
+
hdms += ' ' + hemispheres.charAt(normalizedDegrees < 0 ? 1 : 0);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
return hdms;
|
|
194
193
|
}
|
|
195
194
|
|
|
196
195
|
/**
|
package/src/format/EsriJSON.js
CHANGED
|
@@ -11,10 +11,10 @@ import MultiPolygon from '../geom/MultiPolygon.js';
|
|
|
11
11
|
import Point from '../geom/Point.js';
|
|
12
12
|
import Polygon from '../geom/Polygon.js';
|
|
13
13
|
import {assert} from '../asserts.js';
|
|
14
|
-
import {assign, isEmpty} from '../obj.js';
|
|
15
14
|
import {containsExtent} from '../extent.js';
|
|
16
15
|
import {deflateCoordinates} from '../geom/flat/deflate.js';
|
|
17
16
|
import {get as getProjection} from '../proj.js';
|
|
17
|
+
import {isEmpty} from '../obj.js';
|
|
18
18
|
import {linearRingIsClockwise} from '../geom/flat/orient.js';
|
|
19
19
|
import {transformGeometryWithOptions} from './Feature.js';
|
|
20
20
|
|
|
@@ -274,10 +274,10 @@ function readGeometry(object, opt_options) {
|
|
|
274
274
|
const rings = convertRings(esriJSONPolygon.rings, layout);
|
|
275
275
|
if (rings.length === 1) {
|
|
276
276
|
type = 'Polygon';
|
|
277
|
-
object = assign({}, object, {['rings']: rings[0]});
|
|
277
|
+
object = Object.assign({}, object, {['rings']: rings[0]});
|
|
278
278
|
} else {
|
|
279
279
|
type = 'MultiPolygon';
|
|
280
|
-
object = assign({}, object, {['rings']: rings});
|
|
280
|
+
object = Object.assign({}, object, {['rings']: rings});
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
const geometryReader = GEOMETRY_READERS[type];
|
package/src/format/Feature.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import Units from '../proj/Units.js';
|
|
5
5
|
import {abstract} from '../util.js';
|
|
6
|
-
import {assign} from '../obj.js';
|
|
7
6
|
import {
|
|
8
7
|
equivalent as equivalentProjection,
|
|
9
8
|
get as getProjection,
|
|
@@ -127,7 +126,7 @@ class FeatureFormat {
|
|
|
127
126
|
* Updated options.
|
|
128
127
|
*/
|
|
129
128
|
adaptOptions(options) {
|
|
130
|
-
return assign(
|
|
129
|
+
return Object.assign(
|
|
131
130
|
{
|
|
132
131
|
dataProjection: this.dataProjection,
|
|
133
132
|
featureProjection: this.defaultFeatureProjection,
|
package/src/format/GML2.js
CHANGED
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
pushParseAndPop,
|
|
14
14
|
pushSerializeAndPop,
|
|
15
15
|
} from '../xml.js';
|
|
16
|
-
import {assign} from '../obj.js';
|
|
17
16
|
import {createOrUpdate} from '../extent.js';
|
|
18
17
|
import {get as getProjection} from '../proj.js';
|
|
19
18
|
import {
|
|
@@ -245,7 +244,7 @@ class GML2 extends GMLBase {
|
|
|
245
244
|
}
|
|
246
245
|
}
|
|
247
246
|
}
|
|
248
|
-
const item = assign({}, context);
|
|
247
|
+
const item = Object.assign({}, context);
|
|
249
248
|
item.node = node;
|
|
250
249
|
pushSerializeAndPop(
|
|
251
250
|
/** @type {import("../xml.js").NodeStackItem} */
|
|
@@ -330,7 +329,7 @@ class GML2 extends GMLBase {
|
|
|
330
329
|
const context = /** @type {import("./Feature.js").WriteOptions} */ (
|
|
331
330
|
objectStack[objectStack.length - 1]
|
|
332
331
|
);
|
|
333
|
-
const item = assign({}, context);
|
|
332
|
+
const item = Object.assign({}, context);
|
|
334
333
|
item['node'] = node;
|
|
335
334
|
let value;
|
|
336
335
|
if (Array.isArray(geometry)) {
|
package/src/format/GML3.js
CHANGED
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
pushParseAndPop,
|
|
22
22
|
pushSerializeAndPop,
|
|
23
23
|
} from '../xml.js';
|
|
24
|
-
import {assign} from '../obj.js';
|
|
25
24
|
import {createOrUpdate} from '../extent.js';
|
|
26
25
|
import {extend} from '../array.js';
|
|
27
26
|
import {get as getProjection} from '../proj.js';
|
|
@@ -815,7 +814,7 @@ class GML3 extends GMLBase {
|
|
|
815
814
|
const context = /** @type {import("./Feature.js").WriteOptions} */ (
|
|
816
815
|
objectStack[objectStack.length - 1]
|
|
817
816
|
);
|
|
818
|
-
const item = assign({}, context);
|
|
817
|
+
const item = Object.assign({}, context);
|
|
819
818
|
item['node'] = node;
|
|
820
819
|
let value;
|
|
821
820
|
if (Array.isArray(geometry)) {
|
|
@@ -888,7 +887,7 @@ class GML3 extends GMLBase {
|
|
|
888
887
|
}
|
|
889
888
|
}
|
|
890
889
|
}
|
|
891
|
-
const item = assign({}, context);
|
|
890
|
+
const item = Object.assign({}, context);
|
|
892
891
|
item.node = node;
|
|
893
892
|
pushSerializeAndPop(
|
|
894
893
|
/** @type {import("../xml.js").NodeStackItem} */
|
|
@@ -918,7 +917,7 @@ class GML3 extends GMLBase {
|
|
|
918
917
|
this.writeFeatureElement,
|
|
919
918
|
this
|
|
920
919
|
);
|
|
921
|
-
const item = assign({}, context);
|
|
920
|
+
const item = Object.assign({}, context);
|
|
922
921
|
item.node = node;
|
|
923
922
|
pushSerializeAndPop(
|
|
924
923
|
/** @type {import("../xml.js").NodeStackItem} */
|
|
@@ -1001,7 +1000,7 @@ class GML3 extends GMLBase {
|
|
|
1001
1000
|
multiCurve: this.multiCurve_,
|
|
1002
1001
|
};
|
|
1003
1002
|
if (opt_options) {
|
|
1004
|
-
assign(context, opt_options);
|
|
1003
|
+
Object.assign(context, opt_options);
|
|
1005
1004
|
}
|
|
1006
1005
|
this.writeGeometryElement(geom, geometry, [context]);
|
|
1007
1006
|
return geom;
|
|
@@ -1034,7 +1033,7 @@ class GML3 extends GMLBase {
|
|
|
1034
1033
|
featureType: this.featureType,
|
|
1035
1034
|
};
|
|
1036
1035
|
if (opt_options) {
|
|
1037
|
-
assign(context, opt_options);
|
|
1036
|
+
Object.assign(context, opt_options);
|
|
1038
1037
|
}
|
|
1039
1038
|
this.writeFeatureMembers_(node, features, [context]);
|
|
1040
1039
|
return node;
|
package/src/format/GMLBase.js
CHANGED
|
@@ -13,7 +13,6 @@ import MultiPolygon from '../geom/MultiPolygon.js';
|
|
|
13
13
|
import Point from '../geom/Point.js';
|
|
14
14
|
import Polygon from '../geom/Polygon.js';
|
|
15
15
|
import XMLFeature from './XMLFeature.js';
|
|
16
|
-
import {assign} from '../obj.js';
|
|
17
16
|
import {extend} from '../array.js';
|
|
18
17
|
import {
|
|
19
18
|
getAllTextContent,
|
|
@@ -570,7 +569,7 @@ class GMLBase extends XMLFeature {
|
|
|
570
569
|
featureNS: this.featureNS,
|
|
571
570
|
};
|
|
572
571
|
if (opt_options) {
|
|
573
|
-
assign(options, this.getReadOptions(node, opt_options));
|
|
572
|
+
Object.assign(options, this.getReadOptions(node, opt_options));
|
|
574
573
|
}
|
|
575
574
|
const features = this.readFeaturesInternal(node, [options]);
|
|
576
575
|
return features || [];
|
package/src/format/GeoJSON.js
CHANGED
|
@@ -12,8 +12,8 @@ import MultiPolygon from '../geom/MultiPolygon.js';
|
|
|
12
12
|
import Point from '../geom/Point.js';
|
|
13
13
|
import Polygon from '../geom/Polygon.js';
|
|
14
14
|
import {assert} from '../asserts.js';
|
|
15
|
-
import {assign, isEmpty} from '../obj.js';
|
|
16
15
|
import {get as getProjection} from '../proj.js';
|
|
16
|
+
import {isEmpty} from '../obj.js';
|
|
17
17
|
import {transformGeometryWithOptions} from './Feature.js';
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -476,7 +476,7 @@ function writeGeometry(geometry, opt_options) {
|
|
|
476
476
|
*/
|
|
477
477
|
function writeGeometryCollectionGeometry(geometry, opt_options) {
|
|
478
478
|
const geometries = geometry.getGeometriesArray().map(function (geometry) {
|
|
479
|
-
const options = assign({}, opt_options);
|
|
479
|
+
const options = Object.assign({}, opt_options);
|
|
480
480
|
delete options.featureProjection;
|
|
481
481
|
return writeGeometry(geometry, options);
|
|
482
482
|
});
|
package/src/format/WFS.js
CHANGED
|
@@ -21,7 +21,6 @@ import {
|
|
|
21
21
|
} from '../xml.js';
|
|
22
22
|
import {and as andFilterFn, bbox as bboxFilterFn} from './filter.js';
|
|
23
23
|
import {assert} from '../asserts.js';
|
|
24
|
-
import {assign} from '../obj.js';
|
|
25
24
|
import {get as getProjection} from '../proj.js';
|
|
26
25
|
import {
|
|
27
26
|
readNonNegativeIntegerString,
|
|
@@ -333,12 +332,15 @@ class WFS extends XMLFeature {
|
|
|
333
332
|
const context = {
|
|
334
333
|
node,
|
|
335
334
|
};
|
|
336
|
-
assign(context, {
|
|
335
|
+
Object.assign(context, {
|
|
337
336
|
'featureType': this.featureType_,
|
|
338
337
|
'featureNS': this.featureNS_,
|
|
339
338
|
});
|
|
340
339
|
|
|
341
|
-
assign(
|
|
340
|
+
Object.assign(
|
|
341
|
+
context,
|
|
342
|
+
this.getReadOptions(node, opt_options ? opt_options : {})
|
|
343
|
+
);
|
|
342
344
|
const objectStack = [context];
|
|
343
345
|
let featuresNS;
|
|
344
346
|
if (this.version_ === '2.0.0') {
|
|
@@ -511,7 +513,7 @@ class WFS extends XMLFeature {
|
|
|
511
513
|
const context = {
|
|
512
514
|
node,
|
|
513
515
|
};
|
|
514
|
-
assign(context, {
|
|
516
|
+
Object.assign(context, {
|
|
515
517
|
'version': this.version_,
|
|
516
518
|
'srsName': options.srsName,
|
|
517
519
|
'featureNS': options.featureNS ? options.featureNS : this.featureNS_,
|
|
@@ -530,7 +532,7 @@ class WFS extends XMLFeature {
|
|
|
530
532
|
filter
|
|
531
533
|
);
|
|
532
534
|
}
|
|
533
|
-
assign(context, {
|
|
535
|
+
Object.assign(context, {
|
|
534
536
|
'geometryName': options.geometryName,
|
|
535
537
|
'filter': filter,
|
|
536
538
|
});
|
|
@@ -548,7 +550,7 @@ class WFS extends XMLFeature {
|
|
|
548
550
|
options.srsName,
|
|
549
551
|
options.filter
|
|
550
552
|
);
|
|
551
|
-
assign(context, {
|
|
553
|
+
Object.assign(context, {
|
|
552
554
|
'geometryName': featureType.geometryName,
|
|
553
555
|
'filter': completeFilter,
|
|
554
556
|
});
|
|
@@ -686,7 +688,7 @@ function createTransactionRequest(node, baseObj, version, options) {
|
|
|
686
688
|
} else if (version === '2.0.0') {
|
|
687
689
|
gmlVersion = 3.2;
|
|
688
690
|
}
|
|
689
|
-
const obj = assign(
|
|
691
|
+
const obj = Object.assign(
|
|
690
692
|
{node},
|
|
691
693
|
{
|
|
692
694
|
version,
|
|
@@ -1035,7 +1037,7 @@ function writeQuery(node, featureType, objectStack) {
|
|
|
1035
1037
|
node.setAttributeNS(XMLNS, 'xmlns:' + featurePrefix, featureNS);
|
|
1036
1038
|
}
|
|
1037
1039
|
const item = /** @type {import("../xml.js").NodeStackItem} */ (
|
|
1038
|
-
assign({}, context)
|
|
1040
|
+
Object.assign({}, context)
|
|
1039
1041
|
);
|
|
1040
1042
|
item.node = node;
|
|
1041
1043
|
pushSerializeAndPop(
|
|
@@ -1062,7 +1064,7 @@ function writeFilterCondition(node, filter, objectStack) {
|
|
|
1062
1064
|
const context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
|
1063
1065
|
/** @type {import("../xml.js").NodeStackItem} */
|
|
1064
1066
|
const item = {node};
|
|
1065
|
-
assign(item, {context});
|
|
1067
|
+
Object.assign(item, {context});
|
|
1066
1068
|
pushSerializeAndPop(
|
|
1067
1069
|
item,
|
|
1068
1070
|
GETFEATURE_SERIALIZERS,
|
|
@@ -1167,7 +1169,7 @@ function writeLogicalFilter(node, filter, objectStack) {
|
|
|
1167
1169
|
const context = parent['context'];
|
|
1168
1170
|
/** @type {import("../xml.js").NodeStackItem} */
|
|
1169
1171
|
const item = {node};
|
|
1170
|
-
assign(item, {context});
|
|
1172
|
+
Object.assign(item, {context});
|
|
1171
1173
|
const conditions = filter.conditions;
|
|
1172
1174
|
for (let i = 0, ii = conditions.length; i < ii; ++i) {
|
|
1173
1175
|
const condition = conditions[i];
|
|
@@ -1191,7 +1193,7 @@ function writeNotFilter(node, filter, objectStack) {
|
|
|
1191
1193
|
const context = parent['context'];
|
|
1192
1194
|
/** @type {import("../xml.js").NodeStackItem} */
|
|
1193
1195
|
const item = {node};
|
|
1194
|
-
assign(item, {context});
|
|
1196
|
+
Object.assign(item, {context});
|
|
1195
1197
|
const condition = filter.condition;
|
|
1196
1198
|
pushSerializeAndPop(
|
|
1197
1199
|
item,
|
|
@@ -1332,7 +1334,7 @@ export function writeFilter(filter, opt_version) {
|
|
|
1332
1334
|
const context = {
|
|
1333
1335
|
node: child,
|
|
1334
1336
|
};
|
|
1335
|
-
assign(context, {
|
|
1337
|
+
Object.assign(context, {
|
|
1336
1338
|
'version': version,
|
|
1337
1339
|
'filter': filter,
|
|
1338
1340
|
});
|
|
@@ -1348,7 +1350,7 @@ export function writeFilter(filter, opt_version) {
|
|
|
1348
1350
|
function writeGetFeature(node, featureTypes, objectStack) {
|
|
1349
1351
|
const context = /** @type {Object} */ (objectStack[objectStack.length - 1]);
|
|
1350
1352
|
const item = /** @type {import("../xml.js").NodeStackItem} */ (
|
|
1351
|
-
assign({}, context)
|
|
1353
|
+
Object.assign({}, context)
|
|
1352
1354
|
);
|
|
1353
1355
|
item.node = node;
|
|
1354
1356
|
pushSerializeAndPop(
|
package/src/format/WKB.js
CHANGED
|
@@ -13,7 +13,6 @@ import Polygon from '../geom/Polygon.js';
|
|
|
13
13
|
import {get as getProjection} from '../proj.js';
|
|
14
14
|
|
|
15
15
|
import SimpleGeometry from '../geom/SimpleGeometry.js';
|
|
16
|
-
import {assign} from '../obj.js';
|
|
17
16
|
|
|
18
17
|
// WKB spec: https://www.ogc.org/standards/sfa
|
|
19
18
|
// EWKB spec: https://raw.githubusercontent.com/postgis/postgis/2.1.0/doc/ZMSgeoms.txt
|
|
@@ -423,7 +422,7 @@ class WkbWriter {
|
|
|
423
422
|
* @property {number} Z NoData value for Z
|
|
424
423
|
* @property {number} M NoData value for M
|
|
425
424
|
*/
|
|
426
|
-
this.nodata_ = assign({X: 0, Y: 0, Z: 0, M: 0}, opts.nodata);
|
|
425
|
+
this.nodata_ = Object.assign({X: 0, Y: 0, Z: 0, M: 0}, opts.nodata);
|
|
427
426
|
}
|
|
428
427
|
|
|
429
428
|
/**
|
|
@@ -459,7 +458,7 @@ class WkbWriter {
|
|
|
459
458
|
* @property {number} [Z] NoData value for Z
|
|
460
459
|
* @property {number} [M] NoData value for M
|
|
461
460
|
*/
|
|
462
|
-
const coordsObj = assign.apply(
|
|
461
|
+
const coordsObj = Object.assign.apply(
|
|
463
462
|
null,
|
|
464
463
|
layout.split('').map((axis, idx) => ({[axis]: coords[idx]}))
|
|
465
464
|
);
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import GML2 from './GML2.js';
|
|
5
5
|
import XMLFeature from './XMLFeature.js';
|
|
6
|
-
import {assign} from '../obj.js';
|
|
7
6
|
import {extend} from '../array.js';
|
|
8
7
|
import {makeArrayPusher, makeStructureNS, pushParseAndPop} from '../xml.js';
|
|
9
8
|
|
|
@@ -157,7 +156,7 @@ class WMSGetFeatureInfo extends XMLFeature {
|
|
|
157
156
|
readFeaturesFromNode(node, opt_options) {
|
|
158
157
|
const options = {};
|
|
159
158
|
if (opt_options) {
|
|
160
|
-
assign(options, this.getReadOptions(node, opt_options));
|
|
159
|
+
Object.assign(options, this.getReadOptions(node, opt_options));
|
|
161
160
|
}
|
|
162
161
|
return this.readFeatures_(node, [options]);
|
|
163
162
|
}
|
package/src/interaction/Link.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
import EventType from '../events/EventType.js';
|
|
5
5
|
import Interaction from './Interaction.js';
|
|
6
6
|
import MapEventType from '../MapEventType.js';
|
|
7
|
-
import {assign} from '../obj.js';
|
|
8
7
|
import {listen, unlistenByKey} from '../events.js';
|
|
9
8
|
import {toFixed} from '../math.js';
|
|
10
9
|
|
|
@@ -76,7 +75,7 @@ class Link extends Interaction {
|
|
|
76
75
|
constructor(opt_options) {
|
|
77
76
|
super();
|
|
78
77
|
|
|
79
|
-
const options = assign(
|
|
78
|
+
const options = Object.assign(
|
|
80
79
|
{animate: true, replace: false, prefix: ''},
|
|
81
80
|
opt_options || {}
|
|
82
81
|
);
|
|
@@ -282,7 +281,7 @@ class Link extends Interaction {
|
|
|
282
281
|
|
|
283
282
|
if (updateView) {
|
|
284
283
|
if (!this.initial_ && this.animationOptions_) {
|
|
285
|
-
view.animate(assign(viewProperties, this.animationOptions_));
|
|
284
|
+
view.animate(Object.assign(viewProperties, this.animationOptions_));
|
|
286
285
|
} else {
|
|
287
286
|
if (viewProperties.center) {
|
|
288
287
|
view.setCenter(viewProperties.center);
|
package/src/layer/Base.js
CHANGED
|
@@ -5,7 +5,6 @@ import BaseObject from '../Object.js';
|
|
|
5
5
|
import LayerProperty from './Property.js';
|
|
6
6
|
import {abstract} from '../util.js';
|
|
7
7
|
import {assert} from '../asserts.js';
|
|
8
|
-
import {assign} from '../obj.js';
|
|
9
8
|
import {clamp} from '../math.js';
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -92,10 +91,10 @@ class BaseLayer extends BaseObject {
|
|
|
92
91
|
/**
|
|
93
92
|
* @type {Object<string, *>}
|
|
94
93
|
*/
|
|
95
|
-
const properties = assign({}, options);
|
|
94
|
+
const properties = Object.assign({}, options);
|
|
96
95
|
if (typeof options.properties === 'object') {
|
|
97
96
|
delete properties.properties;
|
|
98
|
-
assign(properties, options.properties);
|
|
97
|
+
Object.assign(properties, options.properties);
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
properties[LayerProperty.OPACITY] =
|
package/src/layer/BaseTile.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import Layer from './Layer.js';
|
|
5
5
|
import TileProperty from './TileProperty.js';
|
|
6
|
-
import {assign} from '../obj.js';
|
|
7
6
|
|
|
8
7
|
/***
|
|
9
8
|
* @template Return
|
|
@@ -66,7 +65,7 @@ class BaseTileLayer extends Layer {
|
|
|
66
65
|
constructor(opt_options) {
|
|
67
66
|
const options = opt_options ? opt_options : {};
|
|
68
67
|
|
|
69
|
-
const baseOptions = assign({}, options);
|
|
68
|
+
const baseOptions = Object.assign({}, options);
|
|
70
69
|
|
|
71
70
|
delete baseOptions.preload;
|
|
72
71
|
delete baseOptions.useInterimTilesOnError;
|
package/src/layer/BaseVector.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import Layer from './Layer.js';
|
|
5
5
|
import RBush from 'rbush';
|
|
6
|
-
import {assign} from '../obj.js';
|
|
7
6
|
import {
|
|
8
7
|
createDefaultStyle,
|
|
9
8
|
toFunction as toStyleFunction,
|
|
@@ -91,7 +90,7 @@ class BaseVectorLayer extends Layer {
|
|
|
91
90
|
constructor(opt_options) {
|
|
92
91
|
const options = opt_options ? opt_options : {};
|
|
93
92
|
|
|
94
|
-
const baseOptions = assign({}, options);
|
|
93
|
+
const baseOptions = Object.assign({}, options);
|
|
95
94
|
|
|
96
95
|
delete baseOptions.style;
|
|
97
96
|
delete baseOptions.renderBuffer;
|
package/src/layer/Graticule.js
CHANGED
|
@@ -25,7 +25,6 @@ import {
|
|
|
25
25
|
isEmpty,
|
|
26
26
|
wrapX as wrapExtentX,
|
|
27
27
|
} from '../extent.js';
|
|
28
|
-
import {assign} from '../obj.js';
|
|
29
28
|
import {clamp} from '../math.js';
|
|
30
29
|
import {degreesToStringHDMS} from '../coordinate.js';
|
|
31
30
|
import {
|
|
@@ -170,7 +169,7 @@ class Graticule extends VectorLayer {
|
|
|
170
169
|
constructor(opt_options) {
|
|
171
170
|
const options = opt_options ? opt_options : {};
|
|
172
171
|
|
|
173
|
-
const baseOptions = assign(
|
|
172
|
+
const baseOptions = Object.assign(
|
|
174
173
|
{
|
|
175
174
|
updateWhileAnimating: true,
|
|
176
175
|
updateWhileInteracting: true,
|
package/src/layer/Group.js
CHANGED
|
@@ -8,7 +8,7 @@ import Event from '../events/Event.js';
|
|
|
8
8
|
import EventType from '../events/EventType.js';
|
|
9
9
|
import ObjectEventType from '../ObjectEventType.js';
|
|
10
10
|
import {assert} from '../asserts.js';
|
|
11
|
-
import {
|
|
11
|
+
import {clear} from '../obj.js';
|
|
12
12
|
import {getIntersection} from '../extent.js';
|
|
13
13
|
import {getUid} from '../util.js';
|
|
14
14
|
import {listen, unlistenByKey} from '../events.js';
|
|
@@ -92,7 +92,7 @@ class LayerGroup extends BaseLayer {
|
|
|
92
92
|
*/
|
|
93
93
|
constructor(opt_options) {
|
|
94
94
|
const options = opt_options || {};
|
|
95
|
-
const baseOptions = /** @type {Options} */ (assign({}, options));
|
|
95
|
+
const baseOptions = /** @type {Options} */ (Object.assign({}, options));
|
|
96
96
|
delete baseOptions.layers;
|
|
97
97
|
|
|
98
98
|
let layers = options.layers;
|
package/src/layer/Heatmap.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import BaseVector from './BaseVector.js';
|
|
5
5
|
import WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';
|
|
6
|
-
import {assign} from '../obj.js';
|
|
7
6
|
import {clamp} from '../math.js';
|
|
8
7
|
import {createCanvasContext2D} from '../dom.js';
|
|
9
8
|
|
|
@@ -71,7 +70,7 @@ class Heatmap extends BaseVector {
|
|
|
71
70
|
constructor(opt_options) {
|
|
72
71
|
const options = opt_options ? opt_options : {};
|
|
73
72
|
|
|
74
|
-
const baseOptions = assign({}, options);
|
|
73
|
+
const baseOptions = Object.assign({}, options);
|
|
75
74
|
|
|
76
75
|
delete baseOptions.gradient;
|
|
77
76
|
delete baseOptions.radius;
|
package/src/layer/Layer.js
CHANGED
|
@@ -6,7 +6,6 @@ import EventType from '../events/EventType.js';
|
|
|
6
6
|
import LayerProperty from './Property.js';
|
|
7
7
|
import RenderEventType from '../render/EventType.js';
|
|
8
8
|
import {assert} from '../asserts.js';
|
|
9
|
-
import {assign} from '../obj.js';
|
|
10
9
|
import {listen, unlistenByKey} from '../events.js';
|
|
11
10
|
|
|
12
11
|
/**
|
|
@@ -95,7 +94,7 @@ class Layer extends BaseLayer {
|
|
|
95
94
|
* @param {Options<SourceType>} options Layer options.
|
|
96
95
|
*/
|
|
97
96
|
constructor(options) {
|
|
98
|
-
const baseOptions = assign({}, options);
|
|
97
|
+
const baseOptions = Object.assign({}, options);
|
|
99
98
|
delete baseOptions.source;
|
|
100
99
|
|
|
101
100
|
super(baseOptions);
|
package/src/layer/VectorImage.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import BaseVectorLayer from './BaseVector.js';
|
|
5
5
|
import CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.js';
|
|
6
|
-
import {assign} from '../obj.js';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* @template {import("../source/Vector.js").default} VectorSourceType
|
|
@@ -69,7 +68,7 @@ class VectorImageLayer extends BaseVectorLayer {
|
|
|
69
68
|
constructor(opt_options) {
|
|
70
69
|
const options = opt_options ? opt_options : {};
|
|
71
70
|
|
|
72
|
-
const baseOptions = assign({}, options);
|
|
71
|
+
const baseOptions = Object.assign({}, options);
|
|
73
72
|
delete baseOptions.imageRatio;
|
|
74
73
|
super(baseOptions);
|
|
75
74
|
|
package/src/layer/VectorTile.js
CHANGED
|
@@ -6,7 +6,6 @@ import CanvasVectorTileLayerRenderer from '../renderer/canvas/VectorTileLayer.js
|
|
|
6
6
|
import TileProperty from './TileProperty.js';
|
|
7
7
|
import VectorTileRenderType from './VectorTileRenderType.js';
|
|
8
8
|
import {assert} from '../asserts.js';
|
|
9
|
-
import {assign} from '../obj.js';
|
|
10
9
|
|
|
11
10
|
/***
|
|
12
11
|
* @template Return
|
|
@@ -102,7 +101,7 @@ class VectorTileLayer extends BaseVectorLayer {
|
|
|
102
101
|
constructor(opt_options) {
|
|
103
102
|
const options = opt_options ? opt_options : {};
|
|
104
103
|
|
|
105
|
-
const baseOptions = /** @type {Object} */ (assign({}, options));
|
|
104
|
+
const baseOptions = /** @type {Object} */ (Object.assign({}, options));
|
|
106
105
|
delete baseOptions.preload;
|
|
107
106
|
delete baseOptions.useInterimTilesOnError;
|
|
108
107
|
|
package/src/layer/WebGLPoints.js
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import Layer from './Layer.js';
|
|
5
5
|
import WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';
|
|
6
|
-
import {assign} from '../obj.js';
|
|
7
6
|
import {parseLiteralStyle} from '../webgl/ShaderBuilder.js';
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -77,7 +76,7 @@ class WebGLPointsLayer extends Layer {
|
|
|
77
76
|
* @param {Options<VectorSourceType>} options Options.
|
|
78
77
|
*/
|
|
79
78
|
constructor(options) {
|
|
80
|
-
const baseOptions = assign({}, options);
|
|
79
|
+
const baseOptions = Object.assign({}, options);
|
|
81
80
|
|
|
82
81
|
super(baseOptions);
|
|
83
82
|
|
|
@@ -120,7 +119,7 @@ class WebGLPointsLayer extends Layer {
|
|
|
120
119
|
* @param {Object<string, number>} variables Variables to update.
|
|
121
120
|
*/
|
|
122
121
|
updateStyleVariables(variables) {
|
|
123
|
-
assign(this.styleVariables_, variables);
|
|
122
|
+
Object.assign(this.styleVariables_, variables);
|
|
124
123
|
this.changed();
|
|
125
124
|
}
|
|
126
125
|
}
|
package/src/layer/WebGLTile.js
CHANGED
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
getStringNumberEquivalent,
|
|
15
15
|
uniformNameForVariable,
|
|
16
16
|
} from '../style/expressions.js';
|
|
17
|
-
import {assign} from '../obj.js';
|
|
18
17
|
|
|
19
18
|
/**
|
|
20
19
|
* @typedef {import("../source/DataTile.js").default|import("../source/TileImage.js").default} SourceType
|
|
@@ -308,7 +307,7 @@ class WebGLTileLayer extends BaseTileLayer {
|
|
|
308
307
|
* @param {Options} opt_options Tile layer options.
|
|
309
308
|
*/
|
|
310
309
|
constructor(opt_options) {
|
|
311
|
-
const options = opt_options ? assign({}, opt_options) : {};
|
|
310
|
+
const options = opt_options ? Object.assign({}, opt_options) : {};
|
|
312
311
|
|
|
313
312
|
const style = options.style || {};
|
|
314
313
|
delete options.style;
|
|
@@ -511,7 +510,7 @@ class WebGLTileLayer extends BaseTileLayer {
|
|
|
511
510
|
* @api
|
|
512
511
|
*/
|
|
513
512
|
updateStyleVariables(variables) {
|
|
514
|
-
assign(this.styleVariables_, variables);
|
|
513
|
+
Object.assign(this.styleVariables_, variables);
|
|
515
514
|
this.changed();
|
|
516
515
|
}
|
|
517
516
|
}
|