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.
Files changed (50) hide show
  1. package/Feature.d.ts +2 -2
  2. package/Feature.d.ts.map +1 -1
  3. package/Feature.js +1 -1
  4. package/color.d.ts +1 -1
  5. package/color.d.ts.map +1 -1
  6. package/color.js +12 -11
  7. package/dist/ol.js +2 -2
  8. package/dist/ol.js.map +1 -1
  9. package/format/EsriJSON.d.ts +8 -0
  10. package/format/EsriJSON.d.ts.map +1 -1
  11. package/format/Feature.d.ts +79 -5
  12. package/format/Feature.d.ts.map +1 -1
  13. package/format/Feature.js +151 -11
  14. package/format/GeoJSON.d.ts +11 -0
  15. package/format/GeoJSON.d.ts.map +1 -1
  16. package/format/GeoJSON.js +144 -52
  17. package/format/JSONFeature.d.ts +4 -24
  18. package/format/JSONFeature.d.ts.map +1 -1
  19. package/format/JSONFeature.js +4 -4
  20. package/format/MVT.d.ts.map +1 -1
  21. package/format/MVT.js +3 -2
  22. package/format/TopoJSON.d.ts +8 -0
  23. package/format/TopoJSON.d.ts.map +1 -1
  24. package/geom/SimpleGeometry.d.ts +5 -0
  25. package/geom/SimpleGeometry.d.ts.map +1 -1
  26. package/geom/SimpleGeometry.js +1 -1
  27. package/interaction/DragAndDrop.d.ts +1 -1
  28. package/interaction/Draw.d.ts +2 -2
  29. package/interaction/Modify.d.ts +1 -1
  30. package/interaction/Snap.d.ts +1 -1
  31. package/layer/BaseVector.d.ts +2 -2
  32. package/layer/Graticule.d.ts +2 -1
  33. package/layer/Graticule.d.ts.map +1 -1
  34. package/layer/Heatmap.d.ts +2 -2
  35. package/layer/Heatmap.js +1 -1
  36. package/layer/Vector.d.ts +1 -1
  37. package/layer/VectorImage.d.ts +2 -2
  38. package/layer/WebGLPoints.d.ts +4 -4
  39. package/layer/WebGLPoints.js +2 -2
  40. package/package.json +2 -1
  41. package/render/Feature.d.ts +33 -11
  42. package/render/Feature.d.ts.map +1 -1
  43. package/render/Feature.js +115 -21
  44. package/render/webgl/MixedGeometryBatch.d.ts.map +1 -1
  45. package/render/webgl/MixedGeometryBatch.js +1 -3
  46. package/source/Cluster.d.ts +2 -2
  47. package/source/Vector.d.ts +74 -66
  48. package/source/Vector.d.ts.map +1 -1
  49. package/source/Vector.js +98 -67
  50. package/util.js +1 -1
@@ -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';
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AAEH;;;;;;;;G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,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"}
@@ -66,7 +66,7 @@ export type Options = {
66
66
  /**
67
67
  * Point source.
68
68
  */
69
- source?: import("../source/Vector.js").default<import("../geom/Point.js").default> | undefined;
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>, WebGLPointsLayerRenderer> {
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<import("../geom/Point.js").default>} [source] Point source.
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>> extends BaseVectorLayer<VectorSourceType, CanvasVectorLayerRenderer> {
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
  */
@@ -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>> extends BaseVectorLayer<VectorSourceType, CanvasVectorImageLayerRenderer> {
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
  */
@@ -1,5 +1,5 @@
1
1
  export default WebGLPointsLayer;
2
- export type Options<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Point.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
  * 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<import("../geom/Point.js").default>} VectorSourceType
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<import("../geom/Point.js").default>} VectorSourceType
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/Point.js").default>> extends Layer<VectorSourceType, WebGLPointsLayerRenderer> {
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
  */
@@ -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<import("../geom/Point.js").default>} VectorSourceType
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<import("../geom/Point.js").default>} VectorSourceType
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.1694608919656",
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",
@@ -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 {import("../geom/Geometry.js").Type} type Geometry type.
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>|Array<Array<number>>} ends Ends or Endss.
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: import("../geom/Geometry.js").Type, flatCoordinates: Array<number>, ends: Array<number> | Array<Array<number>>, properties: {
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 {import("../geom/Geometry.js").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>|Array<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 {import("../geom/Geometry.js").Type} Geometry type.
186
+ * @return {Type} Geometry type.
169
187
  * @api
170
188
  */
171
- getType(): import("../geom/Geometry.js").Type;
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>|Array<Array<number>>} Ends or endss.
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
- getEnds(): Array<number> | Array<Array<number>>;
194
- getEndss: () => Array<number> | Array<Array<number>>;
216
+ enableSimplifyTransformed(): RenderFeature;
195
217
  /**
196
218
  * @return {Array<number>} Flat coordinates.
197
219
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Feature.d.ts","sourceRoot":"","sources":["Feature.js"],"names":[],"mappings":"AAqXA;;;;;;;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;;AAzYD;;;;GAIG;AACH;IACE;;;;;;;OAOG;IACH,kBAPW,OAAO,qBAAqB,EAAE,IAAI,mBAClC,MAAM,MAAM,CAAC,QAEb,MAAM,MAAM,CAAC,GAAC,MAAM,MAAM,MAAM,CAAC,CAAC;YAC3B,MAAM;WACb,MAAM,GAAC,MAAM,GAAC,SAAS,EAuDjC;IApDC;;OAEG;IACH,eAFU,OAAO,mBAAmB,EAAE,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ED;;;;OAIG;IACH,aAHY,OAAO,cAAc,EAAE,MAAM,CAgBxC;IAED;;OAEG;IACH,wBAFY,MAAM,MAAM,CAAC,CAexB;IAED;;OAEG;IACH,yBAFY,MAAM,MAAM,CAAC,CAexB;IAED;;OAEG;IACH,mBAFY,MAAM,MAAM,CAAC,CAaxB;IAED;;OAEG;IACH,oBAFY,MAAM,MAAM,CAAC,CAgBxB;IAED;;;;;OAKG;IACH,SAHY,MAAM,GAAC,MAAM,GAAC,SAAS,CAKlC;IAED;;OAEG;IACH,8BAFY,MAAM,MAAM,CAAC,CAIxB;IAED;;;;;OAKG;IACH,eAHY,aAAa,CAKxB;IAED;;;OAGG;IACH,wCAHW,MAAM,GACL,aAAa,CAIxB;IAED;;;;;OAKG;IACH,sCAJW,MAAM,mEAEL,aAAa,CAIxB;IAED;;;;OAIG;IACH;YAHmB,MAAM;MAKxB;IAED;;;;OAIG;IACH;YAFmB,MAAM;aAIxB;IAED;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;OAEG;IACH,oBAFY,OAAO,mBAAmB,EAAE,aAAa,GAAC,SAAS,CAI9D;IAED;;;;OAIG;IACH,WAHY,IAAI,CAKf;IAED;;;;OAIG;IACH,sBAFW,OAAO,YAAY,EAAE,cAAc,QA2B7C;IAED;;;;;;OAMG;IACH,4BAFW,OAAO,YAAY,EAAE,iBAAiB,QAIhD;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 {import("../geom/Geometry.js").Type} type Geometry type.
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>|Array<Array<number>>} ends Ends or Endss.
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 {import("../geom/Geometry.js").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>|Array<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 flatCenters = linearRingssCenter(
162
- this.flatCoordinates_,
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
- /** @type {Array<Array<number>>} */ (this.ends_),
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 2;
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 {import("../geom/Geometry.js").Type} Geometry type.
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
- if (this.flatCoordinates_) {
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>|Array<Array<number>>} Ends or endss.
382
+ * @return {Array<number>} Ends.
360
383
  */
361
384
  getEnds() {
362
385
  return this.ends_;
363
386
  }
364
- }
365
387
 
366
- RenderFeature.prototype.getEndss = RenderFeature.prototype.getEnds;
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,M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;;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|RenderFeature} */ (
189
- geometry
190
- );
188
+ /** @type {import("../../geom").MultiPolygon} */ (geometry);
191
189
  this.addCoordinates_(
192
190
  type,
193
191
  multiPolygonGeom.getFlatCoordinates(),
@@ -49,7 +49,7 @@ export type Options = {
49
49
  /**
50
50
  * Source.
51
51
  */
52
- source?: VectorSource<import("../geom/Geometry.js").default> | undefined;
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
  */