ol 8.1.1-dev.1694608919656 → 8.1.1-dev.1694687206621
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 +2 -2
- package/Feature.d.ts.map +1 -1
- package/Feature.js +1 -1
- package/color.d.ts +1 -1
- package/color.d.ts.map +1 -1
- package/color.js +12 -11
- package/dist/ol.js +2 -2
- package/dist/ol.js.map +1 -1
- package/format/EsriJSON.d.ts +8 -0
- package/format/EsriJSON.d.ts.map +1 -1
- package/format/Feature.d.ts +79 -5
- package/format/Feature.d.ts.map +1 -1
- package/format/Feature.js +151 -11
- package/format/GeoJSON.d.ts +11 -0
- package/format/GeoJSON.d.ts.map +1 -1
- package/format/GeoJSON.js +144 -52
- package/format/JSONFeature.d.ts +4 -24
- package/format/JSONFeature.d.ts.map +1 -1
- package/format/JSONFeature.js +4 -4
- package/format/MVT.d.ts.map +1 -1
- package/format/MVT.js +3 -2
- package/format/TopoJSON.d.ts +8 -0
- package/format/TopoJSON.d.ts.map +1 -1
- package/geom/SimpleGeometry.d.ts +5 -0
- package/geom/SimpleGeometry.d.ts.map +1 -1
- package/geom/SimpleGeometry.js +1 -1
- package/interaction/DragAndDrop.d.ts +1 -1
- package/interaction/Draw.d.ts +2 -2
- package/interaction/Modify.d.ts +1 -1
- package/interaction/Snap.d.ts +1 -1
- package/layer/BaseVector.d.ts +2 -2
- package/layer/Graticule.d.ts +2 -1
- package/layer/Graticule.d.ts.map +1 -1
- package/layer/Heatmap.d.ts +2 -2
- package/layer/Heatmap.js +1 -1
- package/layer/Vector.d.ts +1 -1
- package/layer/VectorImage.d.ts +2 -2
- package/layer/WebGLPoints.d.ts +4 -4
- package/layer/WebGLPoints.js +2 -2
- package/package.json +2 -1
- package/render/Feature.d.ts +33 -11
- package/render/Feature.d.ts.map +1 -1
- package/render/Feature.js +115 -21
- package/render/webgl/MixedGeometryBatch.d.ts.map +1 -1
- package/render/webgl/MixedGeometryBatch.js +1 -3
- package/source/Cluster.d.ts +2 -2
- package/source/Vector.d.ts +74 -66
- package/source/Vector.d.ts.map +1 -1
- package/source/Vector.js +98 -67
- package/util.js +1 -1
package/layer/Graticule.d.ts
CHANGED
|
@@ -277,7 +277,7 @@ export type Options = {
|
|
|
277
277
|
* @extends {VectorLayer<import("../source/Vector.js").default>}
|
|
278
278
|
* @api
|
|
279
279
|
*/
|
|
280
|
-
declare class Graticule extends VectorLayer<VectorSource<import("../geom/Geometry.js").default
|
|
280
|
+
declare class Graticule extends VectorLayer<VectorSource<Feature<import("../geom/Geometry.js").default>>> {
|
|
281
281
|
/**
|
|
282
282
|
* @param {Options} [options] Options.
|
|
283
283
|
*/
|
|
@@ -586,6 +586,7 @@ declare class Graticule extends VectorLayer<VectorSource<import("../geom/Geometr
|
|
|
586
586
|
import Point from '../geom/Point.js';
|
|
587
587
|
import Stroke from '../style/Stroke.js';
|
|
588
588
|
import Text from '../style/Text.js';
|
|
589
|
+
import Feature from '../Feature.js';
|
|
589
590
|
import VectorSource from '../source/Vector.js';
|
|
590
591
|
import VectorLayer from './Vector.js';
|
|
591
592
|
import LineString from '../geom/LineString.js';
|
package/layer/Graticule.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Graticule.d.ts","sourceRoot":"","sources":["Graticule.js"],"names":[],"mappings":";;;;;UA2Ec,KAAK;;;;UACL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAuCG,MAAM,KAAE,MAAM;;;;;;;gCAId,MAAM,KAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA9CrC;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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IACH,qBAuBC;IAED;;;;;;;;;OASG;IACH,qBAuBC;IAED;;;OAGG;IACH,oBAiFC;IAED;;;;;;OAMG;IACH,yBAsNC;IAED;;;;OAIG;IACH,qBA0BC;IAED;;;;;;;;OAQG;IACH,qBAiBC;IAED;;;;;;OAMG;IACH,0BAwBC;IAED;;;;OAIG;IACH,gBAHY,MAAM,UAAU,CAAC,CAK5B;IAED;;;;;;;;OAQG;IACH,qBAgBC;IAED;;;;;;OAMG;IACH,0BAwBC;IAED;;;;OAIG;IACH,gBAHY,MAAM,UAAU,CAAC,CAK5B;IAED;;;OAGG;IACH,8BA0EC;CACF;kBA/tCiB,kBAAkB;mBACjB,oBAAoB;iBAEtB,kBAAkB;oBANf,eAAe;yBAQV,qBAAqB;wBADtB,aAAa;uBALd,uBAAuB"}
|
package/layer/Heatmap.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ export type Options = {
|
|
|
66
66
|
/**
|
|
67
67
|
* Point source.
|
|
68
68
|
*/
|
|
69
|
-
source?: import("../source/Vector.js").default<import("../geom/
|
|
69
|
+
source?: import("../source/Vector.js").default<import("../Feature.js").default<import("../geom/Geometry.js").default>> | undefined;
|
|
70
70
|
/**
|
|
71
71
|
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
|
|
72
72
|
*/
|
|
@@ -85,7 +85,7 @@ export type Options = {
|
|
|
85
85
|
* @extends {BaseVector<import("../source/Vector.js").default, WebGLPointsLayerRenderer>}
|
|
86
86
|
* @api
|
|
87
87
|
*/
|
|
88
|
-
declare class Heatmap extends BaseVector<import("../source/Vector.js").default<import("../geom/Geometry.js").default
|
|
88
|
+
declare class Heatmap extends BaseVector<import("../source/Vector.js").default<import("../Feature.js").default<import("../geom/Geometry.js").default>>, WebGLPointsLayerRenderer> {
|
|
89
89
|
/**
|
|
90
90
|
* @param {Options} [options] Options.
|
|
91
91
|
*/
|
package/layer/Heatmap.js
CHANGED
|
@@ -33,7 +33,7 @@ import {createCanvasContext2D} from '../dom.js';
|
|
|
33
33
|
* @property {string|function(import("../Feature.js").default):number} [weight='weight'] The feature
|
|
34
34
|
* attribute to use for the weight or a function that returns a weight from a feature. Weight values
|
|
35
35
|
* should range from 0 to 1 (and values outside will be clamped to that range).
|
|
36
|
-
* @property {import("../source/Vector.js").default
|
|
36
|
+
* @property {import("../source/Vector.js").default} [source] Point source.
|
|
37
37
|
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
|
|
38
38
|
*/
|
|
39
39
|
|
package/layer/Vector.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export default VectorLayer;
|
|
|
14
14
|
* @extends {BaseVectorLayer<VectorSourceType, CanvasVectorLayerRenderer>}
|
|
15
15
|
* @api
|
|
16
16
|
*/
|
|
17
|
-
declare class VectorLayer<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Geometry.js").default
|
|
17
|
+
declare class VectorLayer<VectorSourceType extends import("../source/Vector.js").default<import("../Feature.js").default<import("../geom/Geometry.js").default>>> extends BaseVectorLayer<VectorSourceType, CanvasVectorLayerRenderer> {
|
|
18
18
|
/**
|
|
19
19
|
* @param {import("./BaseVector.js").Options<VectorSourceType>} [options] Options.
|
|
20
20
|
*/
|
package/layer/VectorImage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default VectorImageLayer;
|
|
2
|
-
export type Options<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Geometry.js").default
|
|
2
|
+
export type Options<VectorSourceType extends import("../source/Vector.js").default<import("../Feature.js").default<import("../geom/Geometry.js").default>>> = {
|
|
3
3
|
/**
|
|
4
4
|
* A CSS class name to set to the layer element.
|
|
5
5
|
*/
|
|
@@ -147,7 +147,7 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
147
147
|
* @extends {BaseVectorLayer<VectorSourceType, CanvasVectorImageLayerRenderer>}
|
|
148
148
|
* @api
|
|
149
149
|
*/
|
|
150
|
-
declare class VectorImageLayer<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Geometry.js").default
|
|
150
|
+
declare class VectorImageLayer<VectorSourceType extends import("../source/Vector.js").default<import("../Feature.js").default<import("../geom/Geometry.js").default>>> extends BaseVectorLayer<VectorSourceType, CanvasVectorImageLayerRenderer> {
|
|
151
151
|
/**
|
|
152
152
|
* @param {Options<VectorSourceType>} [options] Options.
|
|
153
153
|
*/
|
package/layer/WebGLPoints.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default WebGLPointsLayer;
|
|
2
|
-
export type Options<VectorSourceType extends import("../source/Vector.js").default<import("../geom/
|
|
2
|
+
export type Options<VectorSourceType extends import("../source/Vector.js").default<import("../Feature.js").default<import("../geom/Geometry.js").default>>> = {
|
|
3
3
|
/**
|
|
4
4
|
* Literal style to apply to the layer features.
|
|
5
5
|
*/
|
|
@@ -65,7 +65,7 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
65
65
|
} | undefined;
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
68
|
-
* @template {import("../source/Vector.js").default
|
|
68
|
+
* @template {import("../source/Vector.js").default} VectorSourceType
|
|
69
69
|
* @typedef {Object} Options
|
|
70
70
|
* @property {import('../style/literal.js').LiteralStyle} style Literal style to apply to the layer features.
|
|
71
71
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
@@ -120,11 +120,11 @@ export type Options<VectorSourceType extends import("../source/Vector.js").defau
|
|
|
120
120
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
121
121
|
* options means that `title` is observable, and has get/set accessors.
|
|
122
122
|
*
|
|
123
|
-
* @template {import("../source/Vector.js").default
|
|
123
|
+
* @template {import("../source/Vector.js").default} VectorSourceType
|
|
124
124
|
* @extends {Layer<VectorSourceType, WebGLPointsLayerRenderer>}
|
|
125
125
|
* @fires import("../render/Event.js").RenderEvent
|
|
126
126
|
*/
|
|
127
|
-
declare class WebGLPointsLayer<VectorSourceType extends import("../source/Vector.js").default<import("../geom/
|
|
127
|
+
declare class WebGLPointsLayer<VectorSourceType extends import("../source/Vector.js").default<import("../Feature.js").default<import("../geom/Geometry.js").default>>> extends Layer<VectorSourceType, WebGLPointsLayerRenderer> {
|
|
128
128
|
/**
|
|
129
129
|
* @param {Options<VectorSourceType>} options Options.
|
|
130
130
|
*/
|
package/layer/WebGLPoints.js
CHANGED
|
@@ -6,7 +6,7 @@ import WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';
|
|
|
6
6
|
import {parseLiteralStyle} from '../webgl/styleparser.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @template {import("../source/Vector.js").default
|
|
9
|
+
* @template {import("../source/Vector.js").default} VectorSourceType
|
|
10
10
|
* @typedef {Object} Options
|
|
11
11
|
* @property {import('../style/literal.js').LiteralStyle} style Literal style to apply to the layer features.
|
|
12
12
|
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
|
@@ -62,7 +62,7 @@ import {parseLiteralStyle} from '../webgl/styleparser.js';
|
|
|
62
62
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
|
63
63
|
* options means that `title` is observable, and has get/set accessors.
|
|
64
64
|
*
|
|
65
|
-
* @template {import("../source/Vector.js").default
|
|
65
|
+
* @template {import("../source/Vector.js").default} VectorSourceType
|
|
66
66
|
* @extends {Layer<VectorSourceType, WebGLPointsLayerRenderer>}
|
|
67
67
|
* @fires import("../render/Event.js").RenderEvent
|
|
68
68
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ol",
|
|
3
|
-
"version": "8.1.1-dev.
|
|
3
|
+
"version": "8.1.1-dev.1694687206621",
|
|
4
4
|
"description": "OpenLayers mapping library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"map",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"url": "https://opencollective.com/openlayers"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
+
"color-name": "^2.0.0",
|
|
25
26
|
"earcut": "^2.2.3",
|
|
26
27
|
"geotiff": "^2.0.7",
|
|
27
28
|
"pbf": "3.2.1",
|
package/render/Feature.d.ts
CHANGED
|
@@ -18,6 +18,11 @@ export function toGeometry(renderFeature: RenderFeature): Point | MultiPoint | L
|
|
|
18
18
|
*/
|
|
19
19
|
export function toFeature(renderFeature: RenderFeature, geometryName?: string | undefined): Feature;
|
|
20
20
|
export default RenderFeature;
|
|
21
|
+
/**
|
|
22
|
+
* The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,
|
|
23
|
+
* `'Polygon'`, `'MultiPoint'` or 'MultiLineString'`.
|
|
24
|
+
*/
|
|
25
|
+
export type Type = 'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString';
|
|
21
26
|
/**
|
|
22
27
|
* Lightweight, read-only, {@link module:ol/Feature~Feature} and {@link module:ol/geom/Geometry~Geometry} like
|
|
23
28
|
* structure, optimized for vector tile rendering and styling. Geometry access
|
|
@@ -25,14 +30,15 @@ export default RenderFeature;
|
|
|
25
30
|
*/
|
|
26
31
|
declare class RenderFeature {
|
|
27
32
|
/**
|
|
28
|
-
* @param {
|
|
33
|
+
* @param {Type} type Geometry type.
|
|
29
34
|
* @param {Array<number>} flatCoordinates Flat coordinates. These always need
|
|
30
35
|
* to be right-handed for polygons.
|
|
31
|
-
* @param {Array<number
|
|
36
|
+
* @param {Array<number>} ends Ends.
|
|
37
|
+
* @param {number} stride Stride.
|
|
32
38
|
* @param {Object<string, *>} properties Properties.
|
|
33
39
|
* @param {number|string|undefined} id Feature id.
|
|
34
40
|
*/
|
|
35
|
-
constructor(type:
|
|
41
|
+
constructor(type: Type, flatCoordinates: Array<number>, ends: Array<number>, stride: number, properties: {
|
|
36
42
|
[x: string]: any;
|
|
37
43
|
}, id: number | string | undefined);
|
|
38
44
|
/**
|
|
@@ -51,7 +57,7 @@ declare class RenderFeature {
|
|
|
51
57
|
private id_;
|
|
52
58
|
/**
|
|
53
59
|
* @private
|
|
54
|
-
* @type {
|
|
60
|
+
* @type {Type}
|
|
55
61
|
*/
|
|
56
62
|
private type_;
|
|
57
63
|
/**
|
|
@@ -71,7 +77,7 @@ declare class RenderFeature {
|
|
|
71
77
|
private flatMidpoints_;
|
|
72
78
|
/**
|
|
73
79
|
* @private
|
|
74
|
-
* @type {Array<number
|
|
80
|
+
* @type {Array<number>}
|
|
75
81
|
*/
|
|
76
82
|
private ends_;
|
|
77
83
|
/**
|
|
@@ -79,6 +85,19 @@ declare class RenderFeature {
|
|
|
79
85
|
* @type {Object<string, *>}
|
|
80
86
|
*/
|
|
81
87
|
private properties_;
|
|
88
|
+
/**
|
|
89
|
+
* @type {number}
|
|
90
|
+
*/
|
|
91
|
+
squaredTolerance_: number;
|
|
92
|
+
/**
|
|
93
|
+
* @type {number}
|
|
94
|
+
*/
|
|
95
|
+
stride_: number;
|
|
96
|
+
/**
|
|
97
|
+
* @private
|
|
98
|
+
* @type {RenderFeature}
|
|
99
|
+
*/
|
|
100
|
+
private simplifiedGeometry_;
|
|
82
101
|
/**
|
|
83
102
|
* Get a feature property by its key.
|
|
84
103
|
* @param {string} key Key
|
|
@@ -133,7 +152,6 @@ declare class RenderFeature {
|
|
|
133
152
|
getSimplifiedGeometry(squaredTolerance: number): RenderFeature;
|
|
134
153
|
/**
|
|
135
154
|
* Get a transformed and simplified version of the geometry.
|
|
136
|
-
* @abstract
|
|
137
155
|
* @param {number} squaredTolerance Squared tolerance.
|
|
138
156
|
* @param {import("../proj.js").TransformFunction} [transform] Optional transform function.
|
|
139
157
|
* @return {RenderFeature} Simplified geometry.
|
|
@@ -165,10 +183,10 @@ declare class RenderFeature {
|
|
|
165
183
|
getStyleFunction(): import('../style/Style.js').StyleFunction | undefined;
|
|
166
184
|
/**
|
|
167
185
|
* Get the type of this feature's geometry.
|
|
168
|
-
* @return {
|
|
186
|
+
* @return {Type} Geometry type.
|
|
169
187
|
* @api
|
|
170
188
|
*/
|
|
171
|
-
getType():
|
|
189
|
+
getType(): Type;
|
|
172
190
|
/**
|
|
173
191
|
* Transform geometry coordinates from tile pixel space to projected.
|
|
174
192
|
*
|
|
@@ -188,10 +206,14 @@ declare class RenderFeature {
|
|
|
188
206
|
*/
|
|
189
207
|
clone(): RenderFeature;
|
|
190
208
|
/**
|
|
191
|
-
* @return {Array<number
|
|
209
|
+
* @return {Array<number>} Ends.
|
|
210
|
+
*/
|
|
211
|
+
getEnds(): Array<number>;
|
|
212
|
+
/**
|
|
213
|
+
* Add transform and resolution based geometry simplification to this instance.
|
|
214
|
+
* @return {RenderFeature} This render feature.
|
|
192
215
|
*/
|
|
193
|
-
|
|
194
|
-
getEndss: () => Array<number> | Array<Array<number>>;
|
|
216
|
+
enableSimplifyTransformed(): RenderFeature;
|
|
195
217
|
/**
|
|
196
218
|
* @return {Array<number>} Flat coordinates.
|
|
197
219
|
*/
|
package/render/Feature.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["Feature.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["Feature.js"],"names":[],"mappings":"AAmdA;;;;;;;GAOG;AACH,0CANW,aAAa,GAEZ,KAAK,GAAC,UAAU,GAAC,UAAU,GAAC,eAAe,GAAC,OAAO,GAAC,YAAY,CA6B3E;AAED;;;;;;;;GAQG;AACH,yCAPW,aAAa,sCAGZ,OAAO,CAkBlB;;;;;;mBAreY,OAAO,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,iBAAiB;AAUjG;;;;GAIG;AACH;IACE;;;;;;;;OAQG;IACH,kBARW,IAAI,mBACJ,MAAM,MAAM,CAAC,QAEb,MAAM,MAAM,CAAC,UACb,MAAM;YACC,MAAM;WACb,MAAM,GAAC,MAAM,GAAC,SAAS,EAuEjC;IApEC;;OAEG;IACH,eAFU,OAAO,mBAAmB,EAAE,aAAa,GAA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AIhD;IAED;;OAEG;IACH,SAFY,aAAa,CAWxB;IAED;;OAEG;IACH,WAFY,MAAM,MAAM,CAAC,CAIxB;IAED;;;OAGG;IACH,6BAFY,aAAa,CAqExB;IAGH;;OAEG;IACH,0BAxNc,MAAM,MAAM,CAAC,CAwNe;CALzC;sBAhcM,YAAY;2BAAZ,YAAY;2BAAZ,YAAY;gCAAZ,YAAY;wBAAZ,YAAY;6BAAZ,YAAY;oBARC,eAAe"}
|
package/render/Feature.js
CHANGED
|
@@ -20,6 +20,11 @@ import {
|
|
|
20
20
|
getCenter,
|
|
21
21
|
getHeight,
|
|
22
22
|
} from '../extent.js';
|
|
23
|
+
import {
|
|
24
|
+
douglasPeucker,
|
|
25
|
+
douglasPeuckerArray,
|
|
26
|
+
quantizeArray,
|
|
27
|
+
} from '../geom/flat/simplify.js';
|
|
23
28
|
import {extend} from '../array.js';
|
|
24
29
|
import {
|
|
25
30
|
getInteriorPointOfArray,
|
|
@@ -29,8 +34,15 @@ import {get as getProjection} from '../proj.js';
|
|
|
29
34
|
import {inflateEnds} from '../geom/flat/orient.js';
|
|
30
35
|
import {interpolatePoint} from '../geom/flat/interpolate.js';
|
|
31
36
|
import {linearRingss as linearRingssCenter} from '../geom/flat/center.js';
|
|
37
|
+
import {memoizeOne} from '../functions.js';
|
|
32
38
|
import {transform2D} from '../geom/flat/transform.js';
|
|
33
39
|
|
|
40
|
+
/**
|
|
41
|
+
* @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString'} Type
|
|
42
|
+
* The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,
|
|
43
|
+
* `'Polygon'`, `'MultiPoint'` or 'MultiLineString'`.
|
|
44
|
+
*/
|
|
45
|
+
|
|
34
46
|
/**
|
|
35
47
|
* @type {import("../transform.js").Transform}
|
|
36
48
|
*/
|
|
@@ -43,14 +55,15 @@ const tmpTransform = createTransform();
|
|
|
43
55
|
*/
|
|
44
56
|
class RenderFeature {
|
|
45
57
|
/**
|
|
46
|
-
* @param {
|
|
58
|
+
* @param {Type} type Geometry type.
|
|
47
59
|
* @param {Array<number>} flatCoordinates Flat coordinates. These always need
|
|
48
60
|
* to be right-handed for polygons.
|
|
49
|
-
* @param {Array<number
|
|
61
|
+
* @param {Array<number>} ends Ends.
|
|
62
|
+
* @param {number} stride Stride.
|
|
50
63
|
* @param {Object<string, *>} properties Properties.
|
|
51
64
|
* @param {number|string|undefined} id Feature id.
|
|
52
65
|
*/
|
|
53
|
-
constructor(type, flatCoordinates, ends, properties, id) {
|
|
66
|
+
constructor(type, flatCoordinates, ends, stride, properties, id) {
|
|
54
67
|
/**
|
|
55
68
|
* @type {import("../style/Style.js").StyleFunction|undefined}
|
|
56
69
|
*/
|
|
@@ -70,7 +83,7 @@ class RenderFeature {
|
|
|
70
83
|
|
|
71
84
|
/**
|
|
72
85
|
* @private
|
|
73
|
-
* @type {
|
|
86
|
+
* @type {Type}
|
|
74
87
|
*/
|
|
75
88
|
this.type_ = type;
|
|
76
89
|
|
|
@@ -94,7 +107,7 @@ class RenderFeature {
|
|
|
94
107
|
|
|
95
108
|
/**
|
|
96
109
|
* @private
|
|
97
|
-
* @type {Array<number
|
|
110
|
+
* @type {Array<number>}
|
|
98
111
|
*/
|
|
99
112
|
this.ends_ = ends;
|
|
100
113
|
|
|
@@ -103,6 +116,22 @@ class RenderFeature {
|
|
|
103
116
|
* @type {Object<string, *>}
|
|
104
117
|
*/
|
|
105
118
|
this.properties_ = properties;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @type {number}
|
|
122
|
+
*/
|
|
123
|
+
this.squaredTolerance_;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* @type {number}
|
|
127
|
+
*/
|
|
128
|
+
this.stride_ = stride;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @private
|
|
132
|
+
* @type {RenderFeature}
|
|
133
|
+
*/
|
|
134
|
+
this.simplifiedGeometry_;
|
|
106
135
|
}
|
|
107
136
|
|
|
108
137
|
/**
|
|
@@ -158,16 +187,12 @@ class RenderFeature {
|
|
|
158
187
|
*/
|
|
159
188
|
getFlatInteriorPoints() {
|
|
160
189
|
if (!this.flatInteriorPoints_) {
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
0,
|
|
164
|
-
/** @type {Array<Array<number>>} */ (this.ends_),
|
|
165
|
-
2
|
|
166
|
-
);
|
|
190
|
+
const ends = inflateEnds(this.flatCoordinates_, this.ends_);
|
|
191
|
+
const flatCenters = linearRingssCenter(this.flatCoordinates_, 0, ends, 2);
|
|
167
192
|
this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(
|
|
168
193
|
this.flatCoordinates_,
|
|
169
194
|
0,
|
|
170
|
-
|
|
195
|
+
ends,
|
|
171
196
|
2,
|
|
172
197
|
flatCenters
|
|
173
198
|
);
|
|
@@ -247,7 +272,6 @@ class RenderFeature {
|
|
|
247
272
|
|
|
248
273
|
/**
|
|
249
274
|
* Get a transformed and simplified version of the geometry.
|
|
250
|
-
* @abstract
|
|
251
275
|
* @param {number} squaredTolerance Squared tolerance.
|
|
252
276
|
* @param {import("../proj.js").TransformFunction} [transform] Optional transform function.
|
|
253
277
|
* @return {RenderFeature} Simplified geometry.
|
|
@@ -278,7 +302,7 @@ class RenderFeature {
|
|
|
278
302
|
* @return {number} Stride.
|
|
279
303
|
*/
|
|
280
304
|
getStride() {
|
|
281
|
-
return
|
|
305
|
+
return this.stride_;
|
|
282
306
|
}
|
|
283
307
|
|
|
284
308
|
/**
|
|
@@ -290,7 +314,7 @@ class RenderFeature {
|
|
|
290
314
|
|
|
291
315
|
/**
|
|
292
316
|
* Get the type of this feature's geometry.
|
|
293
|
-
* @return {
|
|
317
|
+
* @return {Type} Geometry type.
|
|
294
318
|
* @api
|
|
295
319
|
*/
|
|
296
320
|
getType() {
|
|
@@ -337,9 +361,7 @@ class RenderFeature {
|
|
|
337
361
|
* @param {import("../proj.js").TransformFunction} transformFn Transform function.
|
|
338
362
|
*/
|
|
339
363
|
applyTransform(transformFn) {
|
|
340
|
-
|
|
341
|
-
transformFn(this.flatCoordinates_, this.flatCoordinates_, 2);
|
|
342
|
-
}
|
|
364
|
+
transformFn(this.flatCoordinates_, this.flatCoordinates_, this.stride_);
|
|
343
365
|
}
|
|
344
366
|
|
|
345
367
|
/**
|
|
@@ -350,20 +372,92 @@ class RenderFeature {
|
|
|
350
372
|
this.type_,
|
|
351
373
|
this.flatCoordinates_.slice(),
|
|
352
374
|
this.ends_.slice(),
|
|
375
|
+
this.stride_,
|
|
353
376
|
Object.assign({}, this.properties_),
|
|
354
377
|
this.id_
|
|
355
378
|
);
|
|
356
379
|
}
|
|
357
380
|
|
|
358
381
|
/**
|
|
359
|
-
* @return {Array<number
|
|
382
|
+
* @return {Array<number>} Ends.
|
|
360
383
|
*/
|
|
361
384
|
getEnds() {
|
|
362
385
|
return this.ends_;
|
|
363
386
|
}
|
|
364
|
-
}
|
|
365
387
|
|
|
366
|
-
|
|
388
|
+
/**
|
|
389
|
+
* Add transform and resolution based geometry simplification to this instance.
|
|
390
|
+
* @return {RenderFeature} This render feature.
|
|
391
|
+
*/
|
|
392
|
+
enableSimplifyTransformed() {
|
|
393
|
+
this.simplifyTransformed = memoizeOne((squaredTolerance, transform) => {
|
|
394
|
+
if (squaredTolerance === this.squaredTolerance_) {
|
|
395
|
+
return this.simplifiedGeometry_;
|
|
396
|
+
}
|
|
397
|
+
this.simplifiedGeometry_ = this.clone();
|
|
398
|
+
if (transform) {
|
|
399
|
+
this.simplifiedGeometry_.applyTransform(transform);
|
|
400
|
+
}
|
|
401
|
+
const simplifiedFlatCoordinates =
|
|
402
|
+
this.simplifiedGeometry_.getFlatCoordinates();
|
|
403
|
+
let simplifiedEnds;
|
|
404
|
+
switch (this.type_) {
|
|
405
|
+
case 'LineString':
|
|
406
|
+
simplifiedFlatCoordinates.length = douglasPeucker(
|
|
407
|
+
simplifiedFlatCoordinates,
|
|
408
|
+
0,
|
|
409
|
+
this.simplifiedGeometry_.flatCoordinates_.length,
|
|
410
|
+
this.simplifiedGeometry_.stride_,
|
|
411
|
+
squaredTolerance,
|
|
412
|
+
simplifiedFlatCoordinates,
|
|
413
|
+
0
|
|
414
|
+
);
|
|
415
|
+
simplifiedEnds = [simplifiedFlatCoordinates.length];
|
|
416
|
+
break;
|
|
417
|
+
case 'MultiLineString':
|
|
418
|
+
simplifiedEnds = [];
|
|
419
|
+
simplifiedFlatCoordinates.length = douglasPeuckerArray(
|
|
420
|
+
simplifiedFlatCoordinates,
|
|
421
|
+
0,
|
|
422
|
+
this.simplifiedGeometry_.ends_,
|
|
423
|
+
this.simplifiedGeometry_.stride_,
|
|
424
|
+
squaredTolerance,
|
|
425
|
+
simplifiedFlatCoordinates,
|
|
426
|
+
0,
|
|
427
|
+
simplifiedEnds
|
|
428
|
+
);
|
|
429
|
+
break;
|
|
430
|
+
case 'Polygon':
|
|
431
|
+
simplifiedEnds = [];
|
|
432
|
+
simplifiedFlatCoordinates.length = quantizeArray(
|
|
433
|
+
simplifiedFlatCoordinates,
|
|
434
|
+
0,
|
|
435
|
+
this.simplifiedGeometry_.ends_,
|
|
436
|
+
this.simplifiedGeometry_.stride_,
|
|
437
|
+
Math.sqrt(squaredTolerance),
|
|
438
|
+
simplifiedFlatCoordinates,
|
|
439
|
+
0,
|
|
440
|
+
simplifiedEnds
|
|
441
|
+
);
|
|
442
|
+
break;
|
|
443
|
+
default:
|
|
444
|
+
}
|
|
445
|
+
if (simplifiedEnds) {
|
|
446
|
+
this.simplifiedGeometry_ = new RenderFeature(
|
|
447
|
+
this.type_,
|
|
448
|
+
simplifiedFlatCoordinates,
|
|
449
|
+
simplifiedEnds,
|
|
450
|
+
2,
|
|
451
|
+
this.properties_,
|
|
452
|
+
this.id_
|
|
453
|
+
);
|
|
454
|
+
}
|
|
455
|
+
this.squaredTolerance_ = squaredTolerance;
|
|
456
|
+
return this.simplifiedGeometry_;
|
|
457
|
+
});
|
|
458
|
+
return this;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
367
461
|
|
|
368
462
|
/**
|
|
369
463
|
* @return {Array<number>} Flat coordinates.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MixedGeometryBatch.d.ts","sourceRoot":"","sources":["MixedGeometryBatch.js"],"names":[],"mappings":";sBAQa,OAAO,eAAe,EAAE,OAAO;2BAG/B,OAAO,wBAAwB,EAAE,IAAI;;;;;;;;aAKpC,OAAO,GAAC,aAAa;;;;iBACrB,MAAM,MAAM,MAAM,CAAC,CAAC;;;;;;;;;;;;;;4BAOrB,kBAAkB,GAAC,uBAAuB,GAAC,oBAAoB;;;;;;;;;;YAKvD,MAAM,GAAE,iBAAiB;;;;;qBAEhC,MAAM;;;;mBACN,MAAM;;;;gBACN,MAAM;;;;;;;;;;;YAKC,MAAM,GAAE,iBAAiB;;;;;qBAEhC,MAAM;;;;mBACN,MAAM;;;;;;;;;;;YAKC,MAAM,GAAE,iBAAiB;;;;;qBAEhC,MAAM;;AAzCpB;;GAEG;AACH;;GAEG;AAEH;;;;;;;GAOG;AAEH;;GAEG;AAEH;;;;;;;GAOG;AAEH;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAEI;;OAEG;IACH,cAFU,oBAAoB,CAO7B;IAED;;OAEG;IACH,YAFU,kBAAkB,CAK3B;IAED;;OAEG;IACH,iBAFU,uBAAuB,CAMhC;IAGH;;;OAGG;IACH,sBAHW,MAAM,OAAO,GAAC,aAAa,CAAC,qFAOtC;IAED;;;OAGG;IACH,oBAHW,OAAO,GAAC,aAAa,qFAa/B;IAED;;;OAGG;IACH,uCAOC;IAED;;;OAGG;IACH,4CAQC;IAED;;;OAGG;IACH,yCASC;IAED;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"MixedGeometryBatch.d.ts","sourceRoot":"","sources":["MixedGeometryBatch.js"],"names":[],"mappings":";sBAQa,OAAO,eAAe,EAAE,OAAO;2BAG/B,OAAO,wBAAwB,EAAE,IAAI;;;;;;;;aAKpC,OAAO,GAAC,aAAa;;;;iBACrB,MAAM,MAAM,MAAM,CAAC,CAAC;;;;;;;;;;;;;;4BAOrB,kBAAkB,GAAC,uBAAuB,GAAC,oBAAoB;;;;;;;;;;YAKvD,MAAM,GAAE,iBAAiB;;;;;qBAEhC,MAAM;;;;mBACN,MAAM;;;;gBACN,MAAM;;;;;;;;;;;YAKC,MAAM,GAAE,iBAAiB;;;;;qBAEhC,MAAM;;;;mBACN,MAAM;;;;;;;;;;;YAKC,MAAM,GAAE,iBAAiB;;;;;qBAEhC,MAAM;;AAzCpB;;GAEG;AACH;;GAEG;AAEH;;;;;;;GAOG;AAEH;;GAEG;AAEH;;;;;;;GAOG;AAEH;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAEI;;OAEG;IACH,cAFU,oBAAoB,CAO7B;IAED;;OAEG;IACH,YAFU,kBAAkB,CAK3B;IAED;;OAEG;IACH,iBAFU,uBAAuB,CAMhC;IAGH;;;OAGG;IACH,sBAHW,MAAM,OAAO,GAAC,aAAa,CAAC,qFAOtC;IAED;;;OAGG;IACH,oBAHW,OAAO,GAAC,aAAa,qFAa/B;IAED;;;OAGG;IACH,uCAOC;IAED;;;OAGG;IACH,4CAQC;IAED;;;OAGG;IACH,yCASC;IAED;;;;OAIG;IACH,qBA4FC;IAED;;;;;;;;OAQG;IACH,wBAwIC;IAED;;OAEG;IACH,uBAFW,OAAO,GAAC,aAAa,QAW/B;IAED;;OAEG;IACH,uBAFW,OAAO,GAAC,aAAa,QAM/B;IAED,cAUC;CACF;0BA7byB,yBAAyB"}
|
|
@@ -185,9 +185,7 @@ class MixedGeometryBatch {
|
|
|
185
185
|
break;
|
|
186
186
|
case 'MultiPolygon':
|
|
187
187
|
const multiPolygonGeom =
|
|
188
|
-
/** @type {import("../../geom").MultiPolygon
|
|
189
|
-
geometry
|
|
190
|
-
);
|
|
188
|
+
/** @type {import("../../geom").MultiPolygon} */ (geometry);
|
|
191
189
|
this.addCoordinates_(
|
|
192
190
|
type,
|
|
193
191
|
multiPolygonGeom.getFlatCoordinates(),
|
package/source/Cluster.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export type Options = {
|
|
|
49
49
|
/**
|
|
50
50
|
* Source.
|
|
51
51
|
*/
|
|
52
|
-
source?: VectorSource<import("../geom/Geometry.js").default
|
|
52
|
+
source?: VectorSource<Feature<import("../geom/Geometry.js").default>> | undefined;
|
|
53
53
|
/**
|
|
54
54
|
* Whether to wrap the world horizontally.
|
|
55
55
|
*/
|
|
@@ -104,7 +104,7 @@ export type Options = {
|
|
|
104
104
|
* from the wrapped source.
|
|
105
105
|
* @api
|
|
106
106
|
*/
|
|
107
|
-
declare class Cluster extends VectorSource<import("../geom/Geometry.js").default
|
|
107
|
+
declare class Cluster extends VectorSource<Feature<import("../geom/Geometry.js").default>> {
|
|
108
108
|
/**
|
|
109
109
|
* @param {Options} options Cluster options.
|
|
110
110
|
*/
|