ol 9.0.0-dev.1707154322322 → 9.0.0-dev.1707413332477

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 (105) hide show
  1. package/Map.d.ts +5 -10
  2. package/Map.d.ts.map +1 -1
  3. package/Map.js +3 -17
  4. package/VectorRenderTile.d.ts +0 -7
  5. package/VectorRenderTile.d.ts.map +1 -1
  6. package/VectorRenderTile.js +0 -6
  7. package/dist/ol.d.ts +2 -0
  8. package/dist/ol.d.ts.map +1 -1
  9. package/dist/ol.js +2 -2
  10. package/dist/ol.js.map +1 -1
  11. package/layer/BaseVector.d.ts +7 -22
  12. package/layer/BaseVector.d.ts.map +1 -1
  13. package/layer/BaseVector.js +12 -20
  14. package/layer/Layer.d.ts +12 -0
  15. package/layer/Layer.d.ts.map +1 -1
  16. package/layer/Layer.js +23 -0
  17. package/layer/VectorImage.d.ts +10 -6
  18. package/layer/VectorImage.d.ts.map +1 -1
  19. package/layer/VectorImage.js +5 -3
  20. package/layer/VectorTile.d.ts +22 -30
  21. package/layer/VectorTile.d.ts.map +1 -1
  22. package/layer/VectorTile.js +10 -14
  23. package/package.json +1 -1
  24. package/render/VectorContext.d.ts +22 -11
  25. package/render/VectorContext.d.ts.map +1 -1
  26. package/render/VectorContext.js +22 -11
  27. package/render/canvas/Builder.d.ts +2 -1
  28. package/render/canvas/Builder.d.ts.map +1 -1
  29. package/render/canvas/Builder.js +19 -3
  30. package/render/canvas/Executor.d.ts +18 -7
  31. package/render/canvas/Executor.d.ts.map +1 -1
  32. package/render/canvas/Executor.js +101 -57
  33. package/render/canvas/ExecutorGroup.d.ts +39 -9
  34. package/render/canvas/ExecutorGroup.d.ts.map +1 -1
  35. package/render/canvas/ExecutorGroup.js +96 -25
  36. package/render/canvas/ImageBuilder.d.ts +1 -1
  37. package/render/canvas/ImageBuilder.d.ts.map +1 -1
  38. package/render/canvas/ImageBuilder.js +30 -8
  39. package/render/canvas/Immediate.d.ts +11 -0
  40. package/render/canvas/Immediate.d.ts.map +1 -1
  41. package/render/canvas/LineStringBuilder.d.ts.map +1 -1
  42. package/render/canvas/LineStringBuilder.js +6 -4
  43. package/render/canvas/PolygonBuilder.d.ts.map +1 -1
  44. package/render/canvas/PolygonBuilder.js +9 -6
  45. package/render/canvas/TextBuilder.d.ts +4 -0
  46. package/render/canvas/TextBuilder.d.ts.map +1 -1
  47. package/render/canvas/TextBuilder.js +15 -6
  48. package/render/canvas/ZIndexContext.d.ts +56 -0
  49. package/render/canvas/ZIndexContext.d.ts.map +1 -0
  50. package/render/canvas/ZIndexContext.js +112 -0
  51. package/render/canvas/style.d.ts.map +1 -1
  52. package/render/canvas/style.js +9 -2
  53. package/render/canvas.d.ts +2 -2
  54. package/render/canvas.d.ts.map +1 -1
  55. package/render/canvas.js +6 -2
  56. package/renderer/Composite.d.ts +3 -2
  57. package/renderer/Composite.d.ts.map +1 -1
  58. package/renderer/Composite.js +26 -19
  59. package/renderer/Layer.d.ts +4 -0
  60. package/renderer/Layer.d.ts.map +1 -1
  61. package/renderer/Layer.js +5 -0
  62. package/renderer/Map.d.ts +0 -4
  63. package/renderer/Map.d.ts.map +1 -1
  64. package/renderer/Map.js +0 -5
  65. package/renderer/canvas/Layer.d.ts +4 -0
  66. package/renderer/canvas/Layer.d.ts.map +1 -1
  67. package/renderer/canvas/Layer.js +32 -0
  68. package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
  69. package/renderer/canvas/VectorImageLayer.js +8 -1
  70. package/renderer/canvas/VectorLayer.d.ts +6 -5
  71. package/renderer/canvas/VectorLayer.d.ts.map +1 -1
  72. package/renderer/canvas/VectorLayer.js +55 -58
  73. package/renderer/canvas/VectorTileLayer.d.ts +14 -3
  74. package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
  75. package/renderer/canvas/VectorTileLayer.js +129 -60
  76. package/renderer/vector.d.ts +3 -2
  77. package/renderer/vector.d.ts.map +1 -1
  78. package/renderer/vector.js +68 -126
  79. package/renderer/webgl/PointsLayer.d.ts +1 -0
  80. package/renderer/webgl/PointsLayer.d.ts.map +1 -1
  81. package/renderer/webgl/PointsLayer.js +2 -0
  82. package/source/Raster.js +1 -1
  83. package/source/WMTS.js +1 -1
  84. package/style/Circle.d.ts +2 -2
  85. package/style/Circle.d.ts.map +1 -1
  86. package/style/Circle.js +1 -1
  87. package/style/Icon.d.ts +1 -1
  88. package/style/Icon.d.ts.map +1 -1
  89. package/style/Icon.js +1 -1
  90. package/style/Image.d.ts +7 -6
  91. package/style/Image.d.ts.map +1 -1
  92. package/style/Image.js +4 -3
  93. package/style/RegularShape.d.ts +2 -2
  94. package/style/RegularShape.d.ts.map +1 -1
  95. package/style/RegularShape.js +1 -1
  96. package/style/Style.d.ts +17 -0
  97. package/style/Style.d.ts.map +1 -1
  98. package/style/Style.js +10 -0
  99. package/style/Text.d.ts +16 -0
  100. package/style/Text.d.ts.map +1 -1
  101. package/style/Text.js +17 -0
  102. package/style/flat.d.ts +11 -6
  103. package/style/flat.d.ts.map +1 -1
  104. package/style/flat.js +4 -3
  105. package/util.js +1 -1
@@ -17,7 +17,28 @@ import {transform2D} from '../../geom/flat/transform.js';
17
17
  * @const
18
18
  * @type {Array<import("../canvas.js").BuilderType>}
19
19
  */
20
- const ORDER = ['Polygon', 'Circle', 'LineString', 'Image', 'Text', 'Default'];
20
+ export const ALL = [
21
+ 'Polygon',
22
+ 'Circle',
23
+ 'LineString',
24
+ 'Image',
25
+ 'Text',
26
+ 'Default',
27
+ ];
28
+
29
+ /**
30
+ * @const
31
+ * @type {Array<import("../canvas.js").BuilderType>}
32
+ */
33
+ export const DECLUTTER = ['Image', 'Text'];
34
+
35
+ /**
36
+ * @const
37
+ * @type {Array<import("../canvas.js").BuilderType>}
38
+ */
39
+ export const NON_DECLUTTER = ALL.filter(
40
+ (builderType) => !DECLUTTER.includes(builderType),
41
+ );
21
42
 
22
43
  class ExecutorGroup {
23
44
  /**
@@ -31,6 +52,7 @@ class ExecutorGroup {
31
52
  * @param {!Object<string, !Object<import("../canvas.js").BuilderType, import("../canvas.js").SerializableInstructions>>} allInstructions
32
53
  * The serializable instructions.
33
54
  * @param {number} [renderBuffer] Optional rendering buffer.
55
+ * @param {boolean} [deferredRendering] Enable deferred rendering with renderDeferred().
34
56
  */
35
57
  constructor(
36
58
  maxExtent,
@@ -39,6 +61,7 @@ class ExecutorGroup {
39
61
  overlaps,
40
62
  allInstructions,
41
63
  renderBuffer,
64
+ deferredRendering,
42
65
  ) {
43
66
  /**
44
67
  * @private
@@ -72,7 +95,7 @@ class ExecutorGroup {
72
95
 
73
96
  /**
74
97
  * @private
75
- * @type {!Object<string, !Object<import("../canvas.js").BuilderType, import("./Executor").default>>}
98
+ * @type {!Object<string, !Object<string, import("./Executor").default>>}
76
99
  */
77
100
  this.executorsByZIndex_ = {};
78
101
 
@@ -88,7 +111,18 @@ class ExecutorGroup {
88
111
  */
89
112
  this.hitDetectionTransform_ = createTransform();
90
113
 
91
- this.createExecutors_(allInstructions);
114
+ /**
115
+ * @private
116
+ * @type {CanvasRenderingContext2D}
117
+ */
118
+ this.renderedContext_ = null;
119
+
120
+ /**
121
+ * @type {Array<Array<import("./ZIndexContext.js").default>>}
122
+ */
123
+ this.deferredZIndexContexts_ = [];
124
+
125
+ this.createExecutors_(allInstructions, deferredRendering);
92
126
  }
93
127
 
94
128
  /**
@@ -108,9 +142,10 @@ class ExecutorGroup {
108
142
  /**
109
143
  * Create executors and populate them using the provided instructions.
110
144
  * @private
111
- * @param {!Object<string, !Object<import("../canvas.js").BuilderType, import("../canvas.js").SerializableInstructions>>} allInstructions The serializable instructions
145
+ * @param {!Object<string, !Object<string, import("../canvas.js").SerializableInstructions>>} allInstructions The serializable instructions
146
+ * @param {boolean} deferredRendering Enable deferred rendering.
112
147
  */
113
- createExecutors_(allInstructions) {
148
+ createExecutors_(allInstructions, deferredRendering) {
114
149
  for (const zIndex in allInstructions) {
115
150
  let executors = this.executorsByZIndex_[zIndex];
116
151
  if (executors === undefined) {
@@ -125,6 +160,7 @@ class ExecutorGroup {
125
160
  this.pixelRatio_,
126
161
  this.overlaps_,
127
162
  instructions,
163
+ deferredRendering,
128
164
  );
129
165
  }
130
166
  }
@@ -258,8 +294,8 @@ class ExecutorGroup {
258
294
  for (i = zs.length - 1; i >= 0; --i) {
259
295
  const zIndexKey = zs[i].toString();
260
296
  executors = this.executorsByZIndex_[zIndexKey];
261
- for (j = ORDER.length - 1; j >= 0; --j) {
262
- builderType = ORDER[j];
297
+ for (j = ALL.length - 1; j >= 0; --j) {
298
+ builderType = ALL[j];
263
299
  executor = executors[builderType];
264
300
  if (executor !== undefined) {
265
301
  result = executor.executeHitDetection(
@@ -304,18 +340,19 @@ class ExecutorGroup {
304
340
  }
305
341
 
306
342
  /**
307
- * @param {CanvasRenderingContext2D} context Context.
308
- * @param {number} contextScale Scale of the context.
343
+ * @param {CanvasRenderingContext2D} targetContext Context.
344
+ * @param {import('../../size.js').Size} scaledCanvasSize Scale of the context.
309
345
  * @param {import("../../transform.js").Transform} transform Transform.
310
346
  * @param {number} viewRotation View rotation.
311
347
  * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.
312
348
  * @param {Array<import("../canvas.js").BuilderType>} [builderTypes] Ordered replay types to replay.
313
- * Default is {@link module:ol/render/replay~ORDER}
314
- * @param {import("rbush").default} [declutterTree] Declutter tree.
349
+ * Default is {@link module:ol/render/replay~ALL}
350
+ * @param {import("rbush").default|null} [declutterTree] Declutter tree.
351
+ * When set to null, no decluttering is done, even when the executor group has a `ZIndexContext`.
315
352
  */
316
353
  execute(
317
- context,
318
- contextScale,
354
+ targetContext,
355
+ scaledCanvasSize,
319
356
  transform,
320
357
  viewRotation,
321
358
  snapToPixel,
@@ -326,14 +363,7 @@ class ExecutorGroup {
326
363
  const zs = Object.keys(this.executorsByZIndex_).map(Number);
327
364
  zs.sort(ascending);
328
365
 
329
- // setup clipping so that the parts of over-simplified geometries are not
330
- // visible outside the current extent when panning
331
- if (this.maxExtent_) {
332
- context.save();
333
- this.clip(context, transform);
334
- }
335
-
336
- builderTypes = builderTypes ? builderTypes : ORDER;
366
+ builderTypes = builderTypes ? builderTypes : ALL;
337
367
  let i, ii, j, jj, replays, replay;
338
368
  if (declutterTree) {
339
369
  zs.reverse();
@@ -345,21 +375,62 @@ class ExecutorGroup {
345
375
  const builderType = builderTypes[j];
346
376
  replay = replays[builderType];
347
377
  if (replay !== undefined) {
378
+ const zIndexContext =
379
+ declutterTree === null ? undefined : replay.getZIndexContext();
380
+ const context = zIndexContext
381
+ ? zIndexContext.getContext()
382
+ : targetContext;
383
+ const requireClip =
384
+ this.maxExtent_ &&
385
+ builderType !== 'Image' &&
386
+ builderType !== 'Text';
387
+ if (requireClip) {
388
+ context.save();
389
+ // setup clipping so that the parts of over-simplified geometries are not
390
+ // visible outside the current extent when panning
391
+ this.clip(context, transform);
392
+ }
348
393
  replay.execute(
349
394
  context,
350
- contextScale,
395
+ scaledCanvasSize,
351
396
  transform,
352
397
  viewRotation,
353
398
  snapToPixel,
354
399
  declutterTree,
355
400
  );
401
+ if (requireClip) {
402
+ context.restore();
403
+ }
404
+ if (zIndexContext) {
405
+ zIndexContext.offset();
406
+ const z = zs[i];
407
+ if (!this.deferredZIndexContexts_[z]) {
408
+ this.deferredZIndexContexts_[z] = [];
409
+ }
410
+ this.deferredZIndexContexts_[z].push(zIndexContext);
411
+ }
356
412
  }
357
413
  }
358
414
  }
359
415
 
360
- if (this.maxExtent_) {
361
- context.restore();
362
- }
416
+ this.renderedContext_ = targetContext;
417
+ }
418
+
419
+ getDeferredZIndexContexts() {
420
+ return this.deferredZIndexContexts_;
421
+ }
422
+
423
+ getRenderedContext() {
424
+ return this.renderedContext_;
425
+ }
426
+
427
+ renderDeferred() {
428
+ this.deferredZIndexContexts_.forEach((zIndexContexts) => {
429
+ zIndexContexts.forEach((zIndexContext) => {
430
+ zIndexContext.draw(this.renderedContext_); // FIXME Pass clip to replay for temporarily enabling clip
431
+ zIndexContext.clear();
432
+ });
433
+ });
363
434
  }
364
435
  }
365
436
 
@@ -67,7 +67,7 @@ declare class CanvasImageBuilder extends CanvasBuilder {
67
67
  private width_;
68
68
  /**
69
69
  * @private
70
- * @type {"declutter"|"obstacle"|"none"|undefined}
70
+ * @type {import('../../style/Style.js').DeclutterMode}
71
71
  */
72
72
  private declutterMode_;
73
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ImageBuilder.d.ts","sourceRoot":"","sources":["ImageBuilder.js"],"names":[],"mappings":";AAMA;IAUI;;;OAGG;IACH,2BAA8B;IAE9B;;;OAGG;IACH,eAAkB;IAElB;;;OAGG;IACH,yBAAiC;IAEjC;;;OAGG;IACH,iBAAyB;IAEzB;;;OAGG;IACH,iBAAyB;IAEzB;;;OAGG;IACH,gBAAwB;IAExB;;;OAGG;IACH,iBAAyB;IAEzB;;;OAGG;IACH,iBAAyB;IAEzB;;;OAGG;IACH,iBAAyB;IAEzB;;;OAGG;IACH,wBAAgC;IAEhC;;;OAGG;IACH,kBAA0B;IAE1B;;;OAGG;IACH,eAAuB;IAEvB;;;OAGG;IACH,eAAuB;IAEvB;;;OAGG;IACH,uBAA+B;IAE/B;;;;OAIG;IACH,gCAAwC;IA2I1C;;;OAGG;IACH,0BAHW,OAAO,sBAAsB,EAAE,OAAO,0BAsBhD;CACF;0BAzQyB,cAAc"}
1
+ {"version":3,"file":"ImageBuilder.d.ts","sourceRoot":"","sources":["ImageBuilder.js"],"names":[],"mappings":";AAOA;IAUI;;;OAGG;IACH,2BAA8B;IAE9B;;;OAGG;IACH,eAAkB;IAElB;;;OAGG;IACH,yBAAiC;IAEjC;;;OAGG;IACH,iBAAyB;IAEzB;;;OAGG;IACH,iBAAyB;IAEzB;;;OAGG;IACH,gBAAwB;IAExB;;;OAGG;IACH,iBAAyB;IAEzB;;;OAGG;IACH,iBAAyB;IAEzB;;;OAGG;IACH,iBAAyB;IAEzB;;;OAGG;IACH,wBAAgC;IAEhC;;;OAGG;IACH,kBAA0B;IAE1B;;;OAGG;IACH,eAAuB;IAEvB;;;OAGG;IACH,eAAuB;IAEvB;;;OAGG;IACH,uBAA+B;IAE/B;;;;OAIG;IACH,gCAAwC;IAgK1C;;;OAGG;IACH,0BAHW,OAAO,sBAAsB,EAAE,OAAO,0BAsBhD;CACF;0BA/RyB,cAAc"}
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import CanvasBuilder from './Builder.js';
5
5
  import CanvasInstruction from './Instruction.js';
6
+ import {containsCoordinate} from '../../extent.js';
6
7
 
7
8
  class CanvasImageBuilder extends CanvasBuilder {
8
9
  /**
@@ -94,7 +95,7 @@ class CanvasImageBuilder extends CanvasBuilder {
94
95
 
95
96
  /**
96
97
  * @private
97
- * @type {"declutter"|"obstacle"|"none"|undefined}
98
+ * @type {import('../../style/Style.js').DeclutterMode}
98
99
  */
99
100
  this.declutterMode_ = undefined;
100
101
 
@@ -109,12 +110,17 @@ class CanvasImageBuilder extends CanvasBuilder {
109
110
  /**
110
111
  * @param {import("../../geom/Point.js").default|import("../Feature.js").default} pointGeometry Point geometry.
111
112
  * @param {import("../../Feature.js").FeatureLike} feature Feature.
113
+ * @param {number} [index] Render order index.
112
114
  */
113
- drawPoint(pointGeometry, feature) {
114
- if (!this.image_) {
115
+ drawPoint(pointGeometry, feature, index) {
116
+ if (
117
+ !this.image_ ||
118
+ (this.maxExtent &&
119
+ !containsCoordinate(this.maxExtent, pointGeometry.getFlatCoordinates()))
120
+ ) {
115
121
  return;
116
122
  }
117
- this.beginGeometry(pointGeometry, feature);
123
+ this.beginGeometry(pointGeometry, feature, index);
118
124
  const flatCoordinates = pointGeometry.getFlatCoordinates();
119
125
  const stride = pointGeometry.getStride();
120
126
  const myBegin = this.coordinates.length;
@@ -166,16 +172,32 @@ class CanvasImageBuilder extends CanvasBuilder {
166
172
  /**
167
173
  * @param {import("../../geom/MultiPoint.js").default|import("../Feature.js").default} multiPointGeometry MultiPoint geometry.
168
174
  * @param {import("../../Feature.js").FeatureLike} feature Feature.
175
+ * @param {number} [index] Render order index.
169
176
  */
170
- drawMultiPoint(multiPointGeometry, feature) {
177
+ drawMultiPoint(multiPointGeometry, feature, index) {
171
178
  if (!this.image_) {
172
179
  return;
173
180
  }
174
- this.beginGeometry(multiPointGeometry, feature);
181
+ this.beginGeometry(multiPointGeometry, feature, index);
175
182
  const flatCoordinates = multiPointGeometry.getFlatCoordinates();
176
- const stride = multiPointGeometry.getStride();
183
+ const filteredFlatCoordinates = [];
184
+ for (
185
+ let i = 0, ii = flatCoordinates.length;
186
+ i < ii;
187
+ i += multiPointGeometry.getStride()
188
+ ) {
189
+ if (
190
+ !this.maxExtent ||
191
+ containsCoordinate(this.maxExtent, flatCoordinates.slice(i, i + 2))
192
+ ) {
193
+ filteredFlatCoordinates.push(
194
+ flatCoordinates[i],
195
+ flatCoordinates[i + 1],
196
+ );
197
+ }
198
+ }
177
199
  const myBegin = this.coordinates.length;
178
- const myEnd = this.appendFlatPointCoordinates(flatCoordinates, stride);
200
+ const myEnd = this.appendFlatPointCoordinates(filteredFlatCoordinates, 2);
179
201
  this.instructions.push([
180
202
  CanvasInstruction.DRAW_IMAGE,
181
203
  myBegin,
@@ -249,6 +249,17 @@ declare class CanvasImmediateRenderer extends VectorContext {
249
249
  * @api
250
250
  */
251
251
  drawGeometry(geometry: import("../../geom/Geometry.js").default | import("../Feature.js").default): void;
252
+ /**
253
+ * Render a feature into the canvas. Note that any `zIndex` on the provided
254
+ * style will be ignored - features are rendered immediately in the order that
255
+ * this method is called. If you need `zIndex` support, you should be using an
256
+ * {@link module:ol/layer/Vector~VectorLayer} instead.
257
+ *
258
+ * @param {import("../../Feature.js").default} feature Feature.
259
+ * @param {import("../../style/Style.js").default} style Style.
260
+ * @api
261
+ */
262
+ drawFeature(feature: import("../../Feature.js").default, style: import("../../style/Style.js").default): void;
252
263
  /**
253
264
  * Render a GeometryCollection to the canvas. Rendering is immediate and
254
265
  * uses the current styles appropriate for each geometry in the collection.
@@ -1 +1 @@
1
- {"version":3,"file":"Immediate.d.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":";AAUA;IAWE;;;;;;;OAOG;IACH,6BAkBC;CAiHF;0BA7JyB,cAAc"}
1
+ {"version":3,"file":"LineStringBuilder.d.ts","sourceRoot":"","sources":["LineStringBuilder.js"],"names":[],"mappings":";AAUA;IAWE;;;;;;;OAOG;IACH,6BAkBC;CAmHF;0BA/JyB,cAAc"}
@@ -50,8 +50,9 @@ class CanvasLineStringBuilder extends CanvasBuilder {
50
50
  /**
51
51
  * @param {import("../../geom/LineString.js").default|import("../Feature.js").default} lineStringGeometry Line string geometry.
52
52
  * @param {import("../../Feature.js").FeatureLike} feature Feature.
53
+ * @param {number} [index] Render order index.
53
54
  */
54
- drawLineString(lineStringGeometry, feature) {
55
+ drawLineString(lineStringGeometry, feature, index) {
55
56
  const state = this.state;
56
57
  const strokeStyle = state.strokeStyle;
57
58
  const lineWidth = state.lineWidth;
@@ -59,7 +60,7 @@ class CanvasLineStringBuilder extends CanvasBuilder {
59
60
  return;
60
61
  }
61
62
  this.updateStrokeStyle(state, this.applyStroke);
62
- this.beginGeometry(lineStringGeometry, feature);
63
+ this.beginGeometry(lineStringGeometry, feature, index);
63
64
  this.hitDetectionInstructions.push(
64
65
  [
65
66
  CanvasInstruction.SET_STROKE_STYLE,
@@ -88,8 +89,9 @@ class CanvasLineStringBuilder extends CanvasBuilder {
88
89
  /**
89
90
  * @param {import("../../geom/MultiLineString.js").default|import("../Feature.js").default} multiLineStringGeometry MultiLineString geometry.
90
91
  * @param {import("../../Feature.js").FeatureLike} feature Feature.
92
+ * @param {number} [index] Render order index.
91
93
  */
92
- drawMultiLineString(multiLineStringGeometry, feature) {
94
+ drawMultiLineString(multiLineStringGeometry, feature, index) {
93
95
  const state = this.state;
94
96
  const strokeStyle = state.strokeStyle;
95
97
  const lineWidth = state.lineWidth;
@@ -97,7 +99,7 @@ class CanvasLineStringBuilder extends CanvasBuilder {
97
99
  return;
98
100
  }
99
101
  this.updateStrokeStyle(state, this.applyStroke);
100
- this.beginGeometry(multiLineStringGeometry, feature);
102
+ this.beginGeometry(multiLineStringGeometry, feature, index);
101
103
  this.hitDetectionInstructions.push(
102
104
  [
103
105
  CanvasInstruction.SET_STROKE_STYLE,
@@ -1 +1 @@
1
- {"version":3,"file":"PolygonBuilder.d.ts","sourceRoot":"","sources":["PolygonBuilder.js"],"names":[],"mappings":";AAiBA;IAWE;;;;;;;OAOG;IACH,8BA0CC;IAuKD;;OAEG;IACH,6BASC;CACF;0BA/PyB,cAAc"}
1
+ {"version":3,"file":"PolygonBuilder.d.ts","sourceRoot":"","sources":["PolygonBuilder.js"],"names":[],"mappings":";AAiBA;IAWE;;;;;;;OAOG;IACH,8BA0CC;IA0KD;;OAEG;IACH,6BASC;CACF;0BAlQyB,cAAc"}
@@ -81,8 +81,9 @@ class CanvasPolygonBuilder extends CanvasBuilder {
81
81
  /**
82
82
  * @param {import("../../geom/Circle.js").default} circleGeometry Circle geometry.
83
83
  * @param {import("../../Feature.js").default} feature Feature.
84
+ * @param {number} [index] Render order index.
84
85
  */
85
- drawCircle(circleGeometry, feature) {
86
+ drawCircle(circleGeometry, feature, index) {
86
87
  const state = this.state;
87
88
  const fillStyle = state.fillStyle;
88
89
  const strokeStyle = state.strokeStyle;
@@ -90,7 +91,7 @@ class CanvasPolygonBuilder extends CanvasBuilder {
90
91
  return;
91
92
  }
92
93
  this.setFillStrokeStyles_();
93
- this.beginGeometry(circleGeometry, feature);
94
+ this.beginGeometry(circleGeometry, feature, index);
94
95
  if (state.fillStyle !== undefined) {
95
96
  this.hitDetectionInstructions.push([
96
97
  CanvasInstruction.SET_FILL_STYLE,
@@ -137,8 +138,9 @@ class CanvasPolygonBuilder extends CanvasBuilder {
137
138
  /**
138
139
  * @param {import("../../geom/Polygon.js").default|import("../Feature.js").default} polygonGeometry Polygon geometry.
139
140
  * @param {import("../../Feature.js").FeatureLike} feature Feature.
141
+ * @param {number} [index] Render order index.
140
142
  */
141
- drawPolygon(polygonGeometry, feature) {
143
+ drawPolygon(polygonGeometry, feature, index) {
142
144
  const state = this.state;
143
145
  const fillStyle = state.fillStyle;
144
146
  const strokeStyle = state.strokeStyle;
@@ -146,7 +148,7 @@ class CanvasPolygonBuilder extends CanvasBuilder {
146
148
  return;
147
149
  }
148
150
  this.setFillStrokeStyles_();
149
- this.beginGeometry(polygonGeometry, feature);
151
+ this.beginGeometry(polygonGeometry, feature, index);
150
152
  if (state.fillStyle !== undefined) {
151
153
  this.hitDetectionInstructions.push([
152
154
  CanvasInstruction.SET_FILL_STYLE,
@@ -180,8 +182,9 @@ class CanvasPolygonBuilder extends CanvasBuilder {
180
182
  /**
181
183
  * @param {import("../../geom/MultiPolygon.js").default} multiPolygonGeometry MultiPolygon geometry.
182
184
  * @param {import("../../Feature.js").FeatureLike} feature Feature.
185
+ * @param {number} [index] Render order index.
183
186
  */
184
- drawMultiPolygon(multiPolygonGeometry, feature) {
187
+ drawMultiPolygon(multiPolygonGeometry, feature, index) {
185
188
  const state = this.state;
186
189
  const fillStyle = state.fillStyle;
187
190
  const strokeStyle = state.strokeStyle;
@@ -189,7 +192,7 @@ class CanvasPolygonBuilder extends CanvasBuilder {
189
192
  return;
190
193
  }
191
194
  this.setFillStrokeStyles_();
192
- this.beginGeometry(multiPolygonGeometry, feature);
195
+ this.beginGeometry(multiPolygonGeometry, feature, index);
193
196
  if (state.fillStyle !== undefined) {
194
197
  this.hitDetectionInstructions.push([
195
198
  CanvasInstruction.SET_FILL_STYLE,
@@ -93,6 +93,10 @@ declare class CanvasTextBuilder extends CanvasBuilder {
93
93
  * @type {string}
94
94
  */
95
95
  private strokeKey_;
96
+ /**
97
+ * @type {import('../../style/Style.js').DeclutterMode}
98
+ */
99
+ declutterMode_: import('../../style/Style.js').DeclutterMode;
96
100
  /**
97
101
  * Data shared with an image builder for combined decluttering.
98
102
  * @private
@@ -1 +1 @@
1
- {"version":3,"file":"TextBuilder.d.ts","sourceRoot":"","sources":["TextBuilder.js"],"names":[],"mappings":"AAyBA;;;GAGG;AACH,yBAFU;IAAC,IAAI,EAAE,C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,OAAO,EAAE,GAAG,CAAC;IAAC,UAAU,EAAE,GAAG,CAAC;IAAC,WAAW,EAAE,GAAG,CAAC;IAAC,MAAM,EAAE,CAAC,CAAA;CAAC,CAYzH;;AAEF;IAUI;;;OAGG;IACH,gBAAmB;IAEnB;;;OAGG;IACH,cAAe;IAEf;;;OAGG;IACH,qBAAqB;IAErB;;;OAGG;IACH,qBAAqB;IAErB;;;OAGG;IACH,4BAAoC;IAEpC;;;OAGG;IACH,sBAAsB;IAEtB;;;OAGG;IACH,uBAA0B;IAE1B;;OAEG;IACH;YAFkB,MAAM,GAAE,OAAO,cAAc,EAAE,SAAS;MAEtC;IAGpB;;;OAGG;IACH,yBAA4B;IAE5B;;OAEG;IACH;YAFkB,MAAM,GAAE,OAAO,cAAc,EAAE,WAAW;MAEtC;IAEtB;;;OAGG;IACH,mBAAsE;IAEtE;;OAEG;IACH;YAFkB,MAAM,GAAE,OAAO,cAAc,EAAE,SAAS;MAEtC;IAEpB;;;OAGG;IACH,iBAAkB;IAElB;;;OAGG;IACH,iBAAkB;IAElB;;;OAGG;IACH,mBAAoB;IAEpB;;OAEG;IACH,gBAFU,OAAO,sBAAsB,EAAE,aAAa,CAEvB;IAE/B;;;;OAIG;IACH,gCAAwC;IAmT1C;;OAEG;IACH,wBAqCC;IAED;;;;OAIG;IACH,mBAoDC;IAED;;;OAGG;IACH,wBAHW,OAAO,qBAAqB,EAAE,OAAO,0BA8G/C;CACF;0BA1pByB,cAAc"}
@@ -137,6 +137,11 @@ class CanvasTextBuilder extends CanvasBuilder {
137
137
  */
138
138
  this.strokeKey_ = '';
139
139
 
140
+ /**
141
+ * @type {import('../../style/Style.js').DeclutterMode}
142
+ */
143
+ this.declutterMode_ = undefined;
144
+
140
145
  /**
141
146
  * Data shared with an image builder for combined decluttering.
142
147
  * @private
@@ -159,8 +164,9 @@ class CanvasTextBuilder extends CanvasBuilder {
159
164
  /**
160
165
  * @param {import("../../geom/SimpleGeometry.js").default|import("../Feature.js").default} geometry Geometry.
161
166
  * @param {import("../../Feature.js").FeatureLike} feature Feature.
167
+ * @param {number} [index] Render order index.
162
168
  */
163
- drawText(geometry, feature) {
169
+ drawText(geometry, feature, index) {
164
170
  const fillState = this.textFillState_;
165
171
  const strokeState = this.textStrokeState_;
166
172
  const textState = this.textState_;
@@ -182,7 +188,7 @@ class CanvasTextBuilder extends CanvasBuilder {
182
188
  geometryType == 'Polygon' ||
183
189
  geometryType == 'MultiPolygon')
184
190
  ) {
185
- if (!intersects(this.getBufferedMaxExtent(), geometry.getExtent())) {
191
+ if (!intersects(this.maxExtent, geometry.getExtent())) {
186
192
  return;
187
193
  }
188
194
  let ends;
@@ -207,7 +213,7 @@ class CanvasTextBuilder extends CanvasBuilder {
207
213
  ends.push(endss[i][0]);
208
214
  }
209
215
  }
210
- this.beginGeometry(geometry, feature);
216
+ this.beginGeometry(geometry, feature, index);
211
217
  const repeat = textState.repeat;
212
218
  const textAlign = repeat ? undefined : textState.textAlign;
213
219
  // No `justify` support for line placement.
@@ -344,7 +350,7 @@ class CanvasTextBuilder extends CanvasBuilder {
344
350
  }
345
351
  }
346
352
 
347
- this.beginGeometry(geometry, feature);
353
+ this.beginGeometry(geometry, feature, index);
348
354
 
349
355
  // adjust padding for negative scale
350
356
  let padding = textState.padding;
@@ -386,7 +392,7 @@ class CanvasTextBuilder extends CanvasBuilder {
386
392
  this.textRotation_,
387
393
  [1, 1],
388
394
  NaN,
389
- undefined,
395
+ this.declutterMode_,
390
396
  this.declutterImageWithText_,
391
397
  padding == defaultPadding
392
398
  ? defaultPadding
@@ -425,7 +431,7 @@ class CanvasTextBuilder extends CanvasBuilder {
425
431
  this.textRotation_,
426
432
  [scale, scale],
427
433
  NaN,
428
- undefined,
434
+ this.declutterMode_,
429
435
  this.declutterImageWithText_,
430
436
  padding,
431
437
  !!textState.backgroundFill,
@@ -528,6 +534,7 @@ class CanvasTextBuilder extends CanvasBuilder {
528
534
  text,
529
535
  textKey,
530
536
  1,
537
+ this.declutterMode_,
531
538
  ]);
532
539
  this.hitDetectionInstructions.push([
533
540
  CanvasInstruction.DRAW_CHARS,
@@ -544,6 +551,7 @@ class CanvasTextBuilder extends CanvasBuilder {
544
551
  text,
545
552
  textKey,
546
553
  1 / pixelRatio,
554
+ this.declutterMode_,
547
555
  ]);
548
556
  }
549
557
 
@@ -656,6 +664,7 @@ class CanvasTextBuilder extends CanvasBuilder {
656
664
  : '|' + getUid(fillState.fillStyle)
657
665
  : '';
658
666
  }
667
+ this.declutterMode_ = textStyle.getDeclutterMode();
659
668
  this.declutterImageWithText_ = sharedData;
660
669
  }
661
670
  }
@@ -0,0 +1,56 @@
1
+ export default ZIndexContext;
2
+ export type ZIndexContextProxy = CanvasRenderingContext2D & {
3
+ globalAlpha: any;
4
+ };
5
+ /**
6
+ * @module ol/render/canvas/ZIndexContext
7
+ */
8
+ /** @typedef {CanvasRenderingContext2D & {globalAlpha: any}} ZIndexContextProxy */
9
+ /**
10
+ * @extends {CanvasRenderingContext2D}
11
+ */
12
+ declare class ZIndexContext {
13
+ /**
14
+ * @private
15
+ * @type {Array<Array<*>>}
16
+ */
17
+ private instructions_;
18
+ /**
19
+ * @type {number}
20
+ */
21
+ zIndex: number;
22
+ /**
23
+ * @private
24
+ * @type {number}
25
+ */
26
+ private offset_;
27
+ /**
28
+ * @type {ZIndexContextProxy}
29
+ */
30
+ context_: ZIndexContextProxy;
31
+ /**
32
+ * @private
33
+ * @param {...*} args Args.
34
+ * @return {ZIndexContext} This.
35
+ */
36
+ private pushMethodArgs_;
37
+ /**
38
+ * Get a proxy for CanvasRenderingContext2D which does not support getting state
39
+ * (e.g. `context.globalAlpha`, which will return `undefined`). To set state, if it relies on a
40
+ * previous state (e.g. `context.globalAlpha = context.globalAlpha / 2`), set a function,
41
+ * e.g. `context.globalAlpha = (context) => context.globalAlpha / 2`.
42
+ * @return {ZIndexContextProxy} Context.
43
+ */
44
+ getContext(): ZIndexContextProxy;
45
+ /**
46
+ * @param {CanvasRenderingContext2D} context Context.
47
+ */
48
+ draw(context: CanvasRenderingContext2D): void;
49
+ clear(): void;
50
+ /**
51
+ * Offsets the zIndex by the highest current zIndex. Useful for rendering multiple worlds or tiles, to
52
+ * avoid conflicting context.clip() or context.save()/restore() calls.
53
+ */
54
+ offset(): void;
55
+ }
56
+ //# sourceMappingURL=ZIndexContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZIndexContext.d.ts","sourceRoot":"","sources":["ZIndexContext.js"],"names":[],"mappings":";iCAIc,wBAAwB,GAAG;IAAC,WAAW,EAAE,GAAG,CAAA;CAAC;AAJ3D;;GAEG;AAEH,kFAAkF;AAElF;;GAEG;AACH;IAEI;;;OAGG;IACH,sBAAuB;IACvB;;OAEG;IACH,QAFU,MAAM,CAED;IACf;;;OAGG;IACH,gBAAgB;IAEhB;;OAEG;IACH,UAFU,kBAAkB,CAuB3B;IAGH;;;;OAIG;IACH,wBAGE;IAEF;;;;;;OAMG;IACH,cAFY,kBAAkB,CAI7B;IAED;;OAEG;IACH,cAFW,wBAAwB,QAkBlC;IAED,cAIC;IAED;;;OAGG;IACH,eAGC;CACF"}