ol 7.0.0-dev.1659255011672 → 7.0.0-dev.1659294315609

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 (135) hide show
  1. package/Map.d.ts +789 -3
  2. package/Map.d.ts.map +1 -1
  3. package/Map.js +1753 -13
  4. package/MapBrowserEvent.d.ts +4 -4
  5. package/MapBrowserEvent.d.ts.map +1 -1
  6. package/MapBrowserEvent.js +3 -3
  7. package/MapBrowserEventHandler.d.ts +3 -3
  8. package/MapBrowserEventHandler.d.ts.map +1 -1
  9. package/MapBrowserEventHandler.js +2 -2
  10. package/MapEvent.d.ts +8 -8
  11. package/MapEvent.d.ts.map +1 -1
  12. package/MapEvent.js +5 -5
  13. package/Overlay.d.ts +4 -4
  14. package/Overlay.d.ts.map +1 -1
  15. package/Overlay.js +3 -3
  16. package/TileQueue.d.ts +2 -2
  17. package/TileQueue.d.ts.map +1 -1
  18. package/TileQueue.js +1 -1
  19. package/control/Attribution.d.ts +2 -2
  20. package/control/Attribution.js +2 -2
  21. package/control/Control.d.ts +5 -5
  22. package/control/Control.d.ts.map +1 -1
  23. package/control/Control.js +3 -3
  24. package/control/FullScreen.js +1 -1
  25. package/control/MousePosition.js +1 -1
  26. package/control/OverviewMap.d.ts +5 -4
  27. package/control/OverviewMap.d.ts.map +1 -1
  28. package/control/OverviewMap.js +12 -15
  29. package/control/ZoomSlider.js +1 -1
  30. package/index.d.ts +0 -1
  31. package/index.js +0 -1
  32. package/interaction/DragAndDrop.d.ts +2 -2
  33. package/interaction/DragAndDrop.d.ts.map +1 -1
  34. package/interaction/DragAndDrop.js +1 -1
  35. package/interaction/Draw.d.ts +2 -2
  36. package/interaction/Draw.d.ts.map +1 -1
  37. package/interaction/Draw.js +1 -1
  38. package/interaction/Extent.d.ts +3 -3
  39. package/interaction/Extent.d.ts.map +1 -1
  40. package/interaction/Extent.js +2 -2
  41. package/interaction/Interaction.d.ts +5 -5
  42. package/interaction/Interaction.d.ts.map +1 -1
  43. package/interaction/Interaction.js +3 -3
  44. package/interaction/Link.d.ts +2 -2
  45. package/interaction/Link.js +3 -3
  46. package/interaction/Modify.d.ts +3 -3
  47. package/interaction/Modify.d.ts.map +1 -1
  48. package/interaction/Modify.js +2 -2
  49. package/interaction/MouseWheelZoom.d.ts +1 -1
  50. package/interaction/MouseWheelZoom.js +1 -1
  51. package/interaction/Select.js +1 -1
  52. package/interaction/Snap.d.ts +4 -4
  53. package/interaction/Snap.d.ts.map +1 -1
  54. package/interaction/Snap.js +2 -2
  55. package/interaction/Translate.d.ts +4 -4
  56. package/interaction/Translate.d.ts.map +1 -1
  57. package/interaction/Translate.js +3 -3
  58. package/layer/BaseImage.d.ts +4 -4
  59. package/layer/BaseImage.js +2 -2
  60. package/layer/BaseTile.d.ts +4 -4
  61. package/layer/BaseTile.js +2 -2
  62. package/layer/BaseVector.d.ts +4 -4
  63. package/layer/BaseVector.d.ts.map +1 -1
  64. package/layer/BaseVector.js +5 -5
  65. package/layer/Layer.d.ts +15 -15
  66. package/layer/Layer.d.ts.map +1 -1
  67. package/layer/Layer.js +9 -9
  68. package/layer/MapboxVector.d.ts +4 -4
  69. package/layer/MapboxVector.js +2 -2
  70. package/layer/VectorImage.d.ts +4 -4
  71. package/layer/VectorImage.js +2 -2
  72. package/layer/VectorTile.d.ts +4 -4
  73. package/layer/VectorTile.js +4 -4
  74. package/layer/WebGLTile.d.ts +3 -3
  75. package/layer/WebGLTile.d.ts.map +1 -1
  76. package/layer/WebGLTile.js +3 -3
  77. package/package.json +1 -1
  78. package/render/Box.d.ts +3 -3
  79. package/render/Box.d.ts.map +1 -1
  80. package/render/Box.js +2 -2
  81. package/render/Event.d.ts +4 -4
  82. package/render/Event.d.ts.map +1 -1
  83. package/render/Event.js +2 -2
  84. package/render/webgl/BatchRenderer.d.ts +4 -4
  85. package/render/webgl/BatchRenderer.d.ts.map +1 -1
  86. package/render/webgl/BatchRenderer.js +2 -2
  87. package/renderer/Composite.js +3 -3
  88. package/renderer/Layer.d.ts +6 -6
  89. package/renderer/Layer.d.ts.map +1 -1
  90. package/renderer/Layer.js +3 -3
  91. package/renderer/Map.d.ts +17 -17
  92. package/renderer/Map.d.ts.map +1 -1
  93. package/renderer/Map.js +11 -11
  94. package/renderer/canvas/ImageLayer.js +2 -2
  95. package/renderer/canvas/Layer.d.ts +11 -11
  96. package/renderer/canvas/Layer.d.ts.map +1 -1
  97. package/renderer/canvas/Layer.js +6 -6
  98. package/renderer/canvas/TileLayer.d.ts +8 -8
  99. package/renderer/canvas/TileLayer.d.ts.map +1 -1
  100. package/renderer/canvas/TileLayer.js +9 -9
  101. package/renderer/canvas/VectorImageLayer.d.ts.map +1 -1
  102. package/renderer/canvas/VectorImageLayer.js +16 -17
  103. package/renderer/canvas/VectorLayer.d.ts +4 -4
  104. package/renderer/canvas/VectorLayer.d.ts.map +1 -1
  105. package/renderer/canvas/VectorLayer.js +5 -5
  106. package/renderer/canvas/VectorTileLayer.d.ts +3 -3
  107. package/renderer/canvas/VectorTileLayer.d.ts.map +1 -1
  108. package/renderer/canvas/VectorTileLayer.js +6 -6
  109. package/renderer/webgl/Layer.d.ts +11 -11
  110. package/renderer/webgl/Layer.d.ts.map +1 -1
  111. package/renderer/webgl/Layer.js +7 -7
  112. package/renderer/webgl/PointsLayer.d.ts +5 -5
  113. package/renderer/webgl/PointsLayer.d.ts.map +1 -1
  114. package/renderer/webgl/PointsLayer.js +5 -5
  115. package/renderer/webgl/TileLayer.d.ts +5 -5
  116. package/renderer/webgl/TileLayer.d.ts.map +1 -1
  117. package/renderer/webgl/TileLayer.js +7 -7
  118. package/renderer/webgl/VectorLayer.d.ts +2 -2
  119. package/renderer/webgl/VectorLayer.d.ts.map +1 -1
  120. package/renderer/webgl/VectorLayer.js +3 -3
  121. package/source/Raster.d.ts +6 -6
  122. package/source/Raster.d.ts.map +1 -1
  123. package/source/Raster.js +7 -7
  124. package/source/Source.d.ts +4 -4
  125. package/source/Source.d.ts.map +1 -1
  126. package/source/Source.js +2 -2
  127. package/webgl/Helper.d.ts +17 -17
  128. package/webgl/Helper.d.ts.map +1 -1
  129. package/webgl/Helper.js +10 -10
  130. package/webgl/PostProcessingPass.d.ts +7 -7
  131. package/webgl/PostProcessingPass.d.ts.map +1 -1
  132. package/webgl/PostProcessingPass.js +5 -5
  133. package/PluggableMap.d.ts +0 -800
  134. package/PluggableMap.d.ts.map +0 -1
  135. package/PluggableMap.js +0 -1773
package/Map.d.ts CHANGED
@@ -1,4 +1,216 @@
1
1
  export default Map;
2
+ /**
3
+ * State of the current frame. Only `pixelRatio`, `time` and `viewState` should
4
+ * be used in applications.
5
+ */
6
+ export type FrameState = {
7
+ /**
8
+ * The pixel ratio of the frame.
9
+ */
10
+ pixelRatio: number;
11
+ /**
12
+ * The time when rendering of the frame was requested.
13
+ */
14
+ time: number;
15
+ /**
16
+ * The state of the current view.
17
+ */
18
+ viewState: import("./View.js").State;
19
+ /**
20
+ * Animate.
21
+ */
22
+ animate: boolean;
23
+ /**
24
+ * CoordinateToPixelTransform.
25
+ */
26
+ coordinateToPixelTransform: import("./transform.js").Transform;
27
+ /**
28
+ * DeclutterTree.
29
+ */
30
+ declutterTree: any;
31
+ /**
32
+ * Extent.
33
+ */
34
+ extent: null | import("./extent.js").Extent;
35
+ /**
36
+ * Next extent during an animation series.
37
+ */
38
+ nextExtent?: import("./extent.js").Extent | undefined;
39
+ /**
40
+ * Index.
41
+ */
42
+ index: number;
43
+ /**
44
+ * LayerStatesArray.
45
+ */
46
+ layerStatesArray: Array<import("./layer/Layer.js").State>;
47
+ /**
48
+ * LayerIndex.
49
+ */
50
+ layerIndex: number;
51
+ /**
52
+ * PixelToCoordinateTransform.
53
+ */
54
+ pixelToCoordinateTransform: import("./transform.js").Transform;
55
+ /**
56
+ * PostRenderFunctions.
57
+ */
58
+ postRenderFunctions: Array<PostRenderFunction>;
59
+ /**
60
+ * Size.
61
+ */
62
+ size: import("./size.js").Size;
63
+ /**
64
+ * TileQueue.
65
+ */
66
+ tileQueue: TileQueue;
67
+ /**
68
+ * UsedTiles.
69
+ */
70
+ usedTiles: {
71
+ [x: string]: {
72
+ [x: string]: boolean;
73
+ };
74
+ };
75
+ /**
76
+ * ViewHints.
77
+ */
78
+ viewHints: Array<number>;
79
+ /**
80
+ * WantedTiles.
81
+ */
82
+ wantedTiles: {
83
+ [x: string]: {
84
+ [x: string]: boolean;
85
+ };
86
+ };
87
+ /**
88
+ * The id of the map.
89
+ */
90
+ mapId: string;
91
+ /**
92
+ * Identifiers of previously rendered elements.
93
+ */
94
+ renderTargets: {
95
+ [x: string]: boolean;
96
+ };
97
+ };
98
+ export type PostRenderFunction = (arg0: Map, arg1: FrameState | null) => any;
99
+ export type AtPixelOptions = {
100
+ /**
101
+ * Layer filter
102
+ * function. The filter function will receive one argument, the
103
+ * {@link module :ol/layer/Layer~Layer layer-candidate} and it should return a boolean value.
104
+ * Only layers which are visible and for which this function returns `true`
105
+ * will be tested for features. By default, all visible layers will be tested.
106
+ */
107
+ layerFilter?: undefined | ((arg0: import("./layer/Layer.js").default<import("./source/Source").default>) => boolean);
108
+ /**
109
+ * Hit-detection tolerance in css pixels. Pixels
110
+ * inside the radius around the given position will be checked for features.
111
+ */
112
+ hitTolerance?: number | undefined;
113
+ /**
114
+ * Check-Wrapped Will check for for wrapped geometries inside the range of
115
+ * +/- 1 world width. Works only if a projection is used that can be wrapped.
116
+ */
117
+ checkWrapped?: boolean | undefined;
118
+ };
119
+ export type MapOptionsInternal = {
120
+ /**
121
+ * Controls.
122
+ */
123
+ controls?: Collection<import("./control/Control.js").default> | undefined;
124
+ /**
125
+ * Interactions.
126
+ */
127
+ interactions?: Collection<import("./interaction/Interaction.js").default> | undefined;
128
+ /**
129
+ * KeyboardEventTarget.
130
+ */
131
+ keyboardEventTarget: HTMLElement | Document;
132
+ /**
133
+ * Overlays.
134
+ */
135
+ overlays: Collection<import("./Overlay.js").default>;
136
+ /**
137
+ * Values.
138
+ */
139
+ values: {
140
+ [x: string]: any;
141
+ };
142
+ };
143
+ export type MapObjectEventTypes = import("./ObjectEventType").Types | 'change:layergroup' | 'change:size' | 'change:target' | 'change:view';
144
+ /**
145
+ * *
146
+ */
147
+ export type MapEventHandler<Return> = import("./Observable").OnSignature<import("./Observable").EventTypes, import("./events/Event.js").default, Return> & import("./Observable").OnSignature<MapObjectEventTypes, import("./Object").ObjectEvent, Return> & import("./Observable").OnSignature<import("./MapBrowserEventType").Types, MapBrowserEvent<any>, Return> & import("./Observable").OnSignature<import("./MapEventType").Types, import("./MapEvent").default, Return> & import("./Observable").OnSignature<import("./render/EventType").MapRenderEventTypes, import("./render/Event").default, Return> & import("./Observable").CombinedOnSignature<import("./Observable").EventTypes | MapObjectEventTypes | import("./MapBrowserEventType").Types | import("./MapEventType").Types | import("./render/EventType").MapRenderEventTypes, Return>;
148
+ /**
149
+ * Object literal with config options for the map.
150
+ */
151
+ export type MapOptions = {
152
+ /**
153
+ * Controls initially added to the map. If not specified,
154
+ * {@link module :ol/control.defaults} is used.
155
+ */
156
+ controls?: Collection<import("./control/Control.js").default> | import("./control/Control.js").default[] | undefined;
157
+ /**
158
+ * The ratio between
159
+ * physical pixels and device-independent pixels (dips) on the device.
160
+ */
161
+ pixelRatio?: number | undefined;
162
+ /**
163
+ * Interactions that are initially added to the map. If not specified,
164
+ * {@link module :ol/interaction.defaults} is used.
165
+ */
166
+ interactions?: Collection<import("./interaction/Interaction.js").default> | import("./interaction/Interaction.js").default[] | undefined;
167
+ /**
168
+ * The element to
169
+ * listen to keyboard events on. This determines when the `KeyboardPan` and
170
+ * `KeyboardZoom` interactions trigger. For example, if this option is set to
171
+ * `document` the keyboard interactions will always trigger. If this option is
172
+ * not specified, the element the library listens to keyboard events on is the
173
+ * map target (i.e. the user-provided div for the map). If this is not
174
+ * `document`, the target element needs to be focused for key events to be
175
+ * emitted, requiring that the target element has a `tabindex` attribute.
176
+ */
177
+ keyboardEventTarget?: string | Document | HTMLElement | undefined;
178
+ /**
179
+ * Layers. If this is not defined, a map with no layers will be rendered. Note
180
+ * that layers are rendered in the order supplied, so if you want, for example,
181
+ * a vector layer to appear on top of a tile layer, it must come after the tile
182
+ * layer.
183
+ */
184
+ layers?: import("./layer/Base.js").default[] | Collection<import("./layer/Base.js").default> | LayerGroup | undefined;
185
+ /**
186
+ * Maximum number tiles to load
187
+ * simultaneously.
188
+ */
189
+ maxTilesLoading?: number | undefined;
190
+ /**
191
+ * The minimum distance in pixels the
192
+ * cursor must move to be detected as a map move event instead of a click.
193
+ * Increasing this value can make it easier to click on the map.
194
+ */
195
+ moveTolerance?: number | undefined;
196
+ /**
197
+ * Overlays initially added to the map. By default, no overlays are added.
198
+ */
199
+ overlays?: Collection<import("./Overlay.js").default> | import("./Overlay.js").default[] | undefined;
200
+ /**
201
+ * The container for the map, either the
202
+ * element itself or the `id` of the element. If not specified at construction
203
+ * time, {@link module :ol/Map~Map#setTarget} must be called for the map to be
204
+ * rendered. If passed by element, the container can be in a secondary document.
205
+ */
206
+ target?: string | HTMLElement | undefined;
207
+ /**
208
+ * The map's view. No layer sources will be
209
+ * fetched unless this is specified at construction time or through
210
+ * {@link module :ol/Map~Map#setView}.
211
+ */
212
+ view?: Promise<import("./View.js").ViewOptions> | View | undefined;
213
+ };
2
214
  /**
3
215
  * @classdesc
4
216
  * The map is the core component of OpenLayers. For a map to render, a view,
@@ -44,10 +256,584 @@ export default Map;
44
256
  * options or added with `addLayer` can be groups, which can contain further
45
257
  * groups, and so on.
46
258
  *
259
+ * @fires import("./MapBrowserEvent.js").MapBrowserEvent
260
+ * @fires import("./MapEvent.js").MapEvent
261
+ * @fires import("./render/Event.js").default#precompose
262
+ * @fires import("./render/Event.js").default#postcompose
263
+ * @fires import("./render/Event.js").default#rendercomplete
47
264
  * @api
48
265
  */
49
- declare class Map extends PluggableMap {
50
- createRenderer(): any;
266
+ declare class Map extends BaseObject {
267
+ /**
268
+ * @param {MapOptions} [opt_options] Map options.
269
+ */
270
+ constructor(opt_options?: MapOptions | undefined);
271
+ /***
272
+ * @type {MapEventHandler<import("./events").EventsKey>}
273
+ */
274
+ on: MapEventHandler<import("./events").EventsKey>;
275
+ /***
276
+ * @type {MapEventHandler<import("./events").EventsKey>}
277
+ */
278
+ once: MapEventHandler<import("./events").EventsKey>;
279
+ /***
280
+ * @type {MapEventHandler<void>}
281
+ */
282
+ un: MapEventHandler<void>;
283
+ /**
284
+ * @private
285
+ * @type {boolean|undefined}
286
+ */
287
+ private renderComplete_;
288
+ /**
289
+ * @private
290
+ * @type {boolean}
291
+ */
292
+ private loaded_;
293
+ /** @private */
294
+ private boundHandleBrowserEvent_;
295
+ /**
296
+ * @type {number}
297
+ * @private
298
+ */
299
+ private maxTilesLoading_;
300
+ /**
301
+ * @private
302
+ * @type {number}
303
+ */
304
+ private pixelRatio_;
305
+ /**
306
+ * @private
307
+ * @type {*}
308
+ */
309
+ private postRenderTimeoutHandle_;
310
+ /**
311
+ * @private
312
+ * @type {number|undefined}
313
+ */
314
+ private animationDelayKey_;
315
+ /**
316
+ * @private
317
+ */
318
+ private animationDelay_;
319
+ /**
320
+ * @private
321
+ * @type {import("./transform.js").Transform}
322
+ */
323
+ private coordinateToPixelTransform_;
324
+ /**
325
+ * @private
326
+ * @type {import("./transform.js").Transform}
327
+ */
328
+ private pixelToCoordinateTransform_;
329
+ /**
330
+ * @private
331
+ * @type {number}
332
+ */
333
+ private frameIndex_;
334
+ /**
335
+ * @private
336
+ * @type {?FrameState}
337
+ */
338
+ private frameState_;
339
+ /**
340
+ * The extent at the previous 'moveend' event.
341
+ * @private
342
+ * @type {import("./extent.js").Extent}
343
+ */
344
+ private previousExtent_;
345
+ /**
346
+ * @private
347
+ * @type {?import("./events.js").EventsKey}
348
+ */
349
+ private viewPropertyListenerKey_;
350
+ /**
351
+ * @private
352
+ * @type {?import("./events.js").EventsKey}
353
+ */
354
+ private viewChangeListenerKey_;
355
+ /**
356
+ * @private
357
+ * @type {?Array<import("./events.js").EventsKey>}
358
+ */
359
+ private layerGroupPropertyListenerKeys_;
360
+ /**
361
+ * @private
362
+ * @type {!HTMLElement}
363
+ */
364
+ private viewport_;
365
+ /**
366
+ * @private
367
+ * @type {!HTMLElement}
368
+ */
369
+ private overlayContainer_;
370
+ /**
371
+ * @private
372
+ * @type {!HTMLElement}
373
+ */
374
+ private overlayContainerStopEvent_;
375
+ /**
376
+ * @private
377
+ * @type {MapBrowserEventHandler}
378
+ */
379
+ private mapBrowserEventHandler_;
380
+ /**
381
+ * @private
382
+ * @type {number}
383
+ */
384
+ private moveTolerance_;
385
+ /**
386
+ * @private
387
+ * @type {HTMLElement|Document}
388
+ */
389
+ private keyboardEventTarget_;
390
+ /**
391
+ * @private
392
+ * @type {?Array<import("./events.js").EventsKey>}
393
+ */
394
+ private targetChangeHandlerKeys_;
395
+ /**
396
+ * @type {Collection<import("./control/Control.js").default>}
397
+ * @protected
398
+ */
399
+ protected controls: Collection<import("./control/Control.js").default>;
400
+ /**
401
+ * @type {Collection<import("./interaction/Interaction.js").default>}
402
+ * @protected
403
+ */
404
+ protected interactions: Collection<import("./interaction/Interaction.js").default>;
405
+ /**
406
+ * @type {Collection<import("./Overlay.js").default>}
407
+ * @private
408
+ */
409
+ private overlays_;
410
+ /**
411
+ * A lookup of overlays by id.
412
+ * @private
413
+ * @type {Object<string, import("./Overlay.js").default>}
414
+ */
415
+ private overlayIdIndex_;
416
+ /**
417
+ * @type {import("./renderer/Map.js").default|null}
418
+ * @private
419
+ */
420
+ private renderer_;
421
+ /**
422
+ * @private
423
+ * @type {!Array<PostRenderFunction>}
424
+ */
425
+ private postRenderFunctions_;
426
+ /**
427
+ * @private
428
+ * @type {TileQueue}
429
+ */
430
+ private tileQueue_;
431
+ /**
432
+ * Add the given control to the map.
433
+ * @param {import("./control/Control.js").default} control Control.
434
+ * @api
435
+ */
436
+ addControl(control: import("./control/Control.js").default): void;
437
+ /**
438
+ * Add the given interaction to the map. If you want to add an interaction
439
+ * at another point of the collection use `getInteractions()` and the methods
440
+ * available on {@link module:ol/Collection~Collection}. This can be used to
441
+ * stop the event propagation from the handleEvent function. The interactions
442
+ * get to handle the events in the reverse order of this collection.
443
+ * @param {import("./interaction/Interaction.js").default} interaction Interaction to add.
444
+ * @api
445
+ */
446
+ addInteraction(interaction: import("./interaction/Interaction.js").default): void;
447
+ /**
448
+ * Adds the given layer to the top of this map. If you want to add a layer
449
+ * elsewhere in the stack, use `getLayers()` and the methods available on
450
+ * {@link module:ol/Collection~Collection}.
451
+ * @param {import("./layer/Base.js").default} layer Layer.
452
+ * @api
453
+ */
454
+ addLayer(layer: import("./layer/Base.js").default): void;
455
+ /**
456
+ * @param {import("./layer/Group.js").GroupEvent} event The layer add event.
457
+ * @private
458
+ */
459
+ private handleLayerAdd_;
460
+ /**
461
+ * Add the given overlay to the map.
462
+ * @param {import("./Overlay.js").default} overlay Overlay.
463
+ * @api
464
+ */
465
+ addOverlay(overlay: import("./Overlay.js").default): void;
466
+ /**
467
+ * This deals with map's overlay collection changes.
468
+ * @param {import("./Overlay.js").default} overlay Overlay.
469
+ * @private
470
+ */
471
+ private addOverlayInternal_;
472
+ /**
473
+ * Detect features that intersect a pixel on the viewport, and execute a
474
+ * callback with each intersecting feature. Layers included in the detection can
475
+ * be configured through the `layerFilter` option in `opt_options`.
476
+ * @param {import("./pixel.js").Pixel} pixel Pixel.
477
+ * @param {function(import("./Feature.js").FeatureLike, import("./layer/Layer.js").default<import("./source/Source").default>, import("./geom/SimpleGeometry.js").default): T} callback Feature callback. The callback will be
478
+ * called with two arguments. The first argument is one
479
+ * {@link module:ol/Feature~Feature feature} or
480
+ * {@link module:ol/render/Feature~RenderFeature render feature} at the pixel, the second is
481
+ * the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for
482
+ * unmanaged layers. To stop detection, callback functions can return a
483
+ * truthy value.
484
+ * @param {AtPixelOptions} [opt_options] Optional options.
485
+ * @return {T|undefined} Callback result, i.e. the return value of last
486
+ * callback execution, or the first truthy callback return value.
487
+ * @template T
488
+ * @api
489
+ */
490
+ forEachFeatureAtPixel<T>(pixel: import("./pixel.js").Pixel, callback: (arg0: import("./Feature.js").FeatureLike, arg1: import("./layer/Layer.js").default<import("./source/Source").default>, arg2: import("./geom/SimpleGeometry.js").default) => T, opt_options?: AtPixelOptions | undefined): T | undefined;
491
+ /**
492
+ * Get all features that intersect a pixel on the viewport.
493
+ * @param {import("./pixel.js").Pixel} pixel Pixel.
494
+ * @param {AtPixelOptions} [opt_options] Optional options.
495
+ * @return {Array<import("./Feature.js").FeatureLike>} The detected features or
496
+ * an empty array if none were found.
497
+ * @api
498
+ */
499
+ getFeaturesAtPixel(pixel: import("./pixel.js").Pixel, opt_options?: AtPixelOptions | undefined): Array<import("./Feature.js").FeatureLike>;
500
+ /**
501
+ * Get all layers from all layer groups.
502
+ * @return {Array<import("./layer/Layer.js").default>} Layers.
503
+ * @api
504
+ */
505
+ getAllLayers(): Array<import("./layer/Layer.js").default>;
506
+ /**
507
+ * Detect if features intersect a pixel on the viewport. Layers included in the
508
+ * detection can be configured through `opt_layerFilter`.
509
+ * @param {import("./pixel.js").Pixel} pixel Pixel.
510
+ * @param {AtPixelOptions} [opt_options] Optional options.
511
+ * @return {boolean} Is there a feature at the given pixel?
512
+ * @api
513
+ */
514
+ hasFeatureAtPixel(pixel: import("./pixel.js").Pixel, opt_options?: AtPixelOptions | undefined): boolean;
515
+ /**
516
+ * Returns the coordinate in user projection for a browser event.
517
+ * @param {MouseEvent} event Event.
518
+ * @return {import("./coordinate.js").Coordinate} Coordinate.
519
+ * @api
520
+ */
521
+ getEventCoordinate(event: MouseEvent): import("./coordinate.js").Coordinate;
522
+ /**
523
+ * Returns the coordinate in view projection for a browser event.
524
+ * @param {MouseEvent} event Event.
525
+ * @return {import("./coordinate.js").Coordinate} Coordinate.
526
+ */
527
+ getEventCoordinateInternal(event: MouseEvent): import("./coordinate.js").Coordinate;
528
+ /**
529
+ * Returns the map pixel position for a browser event relative to the viewport.
530
+ * @param {UIEvent} event Event.
531
+ * @return {import("./pixel.js").Pixel} Pixel.
532
+ * @api
533
+ */
534
+ getEventPixel(event: UIEvent): import("./pixel.js").Pixel;
535
+ /**
536
+ * Get the target in which this map is rendered.
537
+ * Note that this returns what is entered as an option or in setTarget:
538
+ * if that was an element, it returns an element; if a string, it returns that.
539
+ * @return {HTMLElement|string|undefined} The Element or id of the Element that the
540
+ * map is rendered in.
541
+ * @observable
542
+ * @api
543
+ */
544
+ getTarget(): HTMLElement | string | undefined;
545
+ /**
546
+ * Get the DOM element into which this map is rendered. In contrast to
547
+ * `getTarget` this method always return an `Element`, or `null` if the
548
+ * map has no target.
549
+ * @return {HTMLElement} The element that the map is rendered in.
550
+ * @api
551
+ */
552
+ getTargetElement(): HTMLElement;
553
+ /**
554
+ * Get the coordinate for a given pixel. This returns a coordinate in the
555
+ * user projection.
556
+ * @param {import("./pixel.js").Pixel} pixel Pixel position in the map viewport.
557
+ * @return {import("./coordinate.js").Coordinate} The coordinate for the pixel position.
558
+ * @api
559
+ */
560
+ getCoordinateFromPixel(pixel: import("./pixel.js").Pixel): import("./coordinate.js").Coordinate;
561
+ /**
562
+ * Get the coordinate for a given pixel. This returns a coordinate in the
563
+ * map view projection.
564
+ * @param {import("./pixel.js").Pixel} pixel Pixel position in the map viewport.
565
+ * @return {import("./coordinate.js").Coordinate} The coordinate for the pixel position.
566
+ */
567
+ getCoordinateFromPixelInternal(pixel: import("./pixel.js").Pixel): import("./coordinate.js").Coordinate;
568
+ /**
569
+ * Get the map controls. Modifying this collection changes the controls
570
+ * associated with the map.
571
+ * @return {Collection<import("./control/Control.js").default>} Controls.
572
+ * @api
573
+ */
574
+ getControls(): Collection<import("./control/Control.js").default>;
575
+ /**
576
+ * Get the map overlays. Modifying this collection changes the overlays
577
+ * associated with the map.
578
+ * @return {Collection<import("./Overlay.js").default>} Overlays.
579
+ * @api
580
+ */
581
+ getOverlays(): Collection<import("./Overlay.js").default>;
582
+ /**
583
+ * Get an overlay by its identifier (the value returned by overlay.getId()).
584
+ * Note that the index treats string and numeric identifiers as the same. So
585
+ * `map.getOverlayById(2)` will return an overlay with id `'2'` or `2`.
586
+ * @param {string|number} id Overlay identifier.
587
+ * @return {import("./Overlay.js").default} Overlay.
588
+ * @api
589
+ */
590
+ getOverlayById(id: string | number): import("./Overlay.js").default;
591
+ /**
592
+ * Get the map interactions. Modifying this collection changes the interactions
593
+ * associated with the map.
594
+ *
595
+ * Interactions are used for e.g. pan, zoom and rotate.
596
+ * @return {Collection<import("./interaction/Interaction.js").default>} Interactions.
597
+ * @api
598
+ */
599
+ getInteractions(): Collection<import("./interaction/Interaction.js").default>;
600
+ /**
601
+ * Get the layergroup associated with this map.
602
+ * @return {LayerGroup} A layer group containing the layers in this map.
603
+ * @observable
604
+ * @api
605
+ */
606
+ getLayerGroup(): LayerGroup;
607
+ /**
608
+ * Clear any existing layers and add layers to the map.
609
+ * @param {Array<import("./layer/Base.js").default>|Collection<import("./layer/Base.js").default>} layers The layers to be added to the map.
610
+ * @api
611
+ */
612
+ setLayers(layers: Array<import("./layer/Base.js").default> | Collection<import("./layer/Base.js").default>): void;
613
+ /**
614
+ * Get the collection of layers associated with this map.
615
+ * @return {!Collection<import("./layer/Base.js").default>} Layers.
616
+ * @api
617
+ */
618
+ getLayers(): Collection<import("./layer/Base.js").default>;
619
+ /**
620
+ * @return {boolean} Layers have sources that are still loading.
621
+ */
622
+ getLoadingOrNotReady(): boolean;
623
+ /**
624
+ * Get the pixel for a coordinate. This takes a coordinate in the user
625
+ * projection and returns the corresponding pixel.
626
+ * @param {import("./coordinate.js").Coordinate} coordinate A map coordinate.
627
+ * @return {import("./pixel.js").Pixel} A pixel position in the map viewport.
628
+ * @api
629
+ */
630
+ getPixelFromCoordinate(coordinate: import("./coordinate.js").Coordinate): import("./pixel.js").Pixel;
631
+ /**
632
+ * Get the pixel for a coordinate. This takes a coordinate in the map view
633
+ * projection and returns the corresponding pixel.
634
+ * @param {import("./coordinate.js").Coordinate} coordinate A map coordinate.
635
+ * @return {import("./pixel.js").Pixel} A pixel position in the map viewport.
636
+ */
637
+ getPixelFromCoordinateInternal(coordinate: import("./coordinate.js").Coordinate): import("./pixel.js").Pixel;
638
+ /**
639
+ * Get the map renderer.
640
+ * @return {import("./renderer/Map.js").default|null} Renderer
641
+ */
642
+ getRenderer(): import("./renderer/Map.js").default | null;
643
+ /**
644
+ * Get the size of this map.
645
+ * @return {import("./size.js").Size|undefined} The size in pixels of the map in the DOM.
646
+ * @observable
647
+ * @api
648
+ */
649
+ getSize(): import("./size.js").Size | undefined;
650
+ /**
651
+ * Get the view associated with this map. A view manages properties such as
652
+ * center and resolution.
653
+ * @return {View} The view that controls this map.
654
+ * @observable
655
+ * @api
656
+ */
657
+ getView(): View;
658
+ /**
659
+ * Get the element that serves as the map viewport.
660
+ * @return {HTMLElement} Viewport.
661
+ * @api
662
+ */
663
+ getViewport(): HTMLElement;
664
+ /**
665
+ * Get the element that serves as the container for overlays. Elements added to
666
+ * this container will let mousedown and touchstart events through to the map,
667
+ * so clicks and gestures on an overlay will trigger {@link module:ol/MapBrowserEvent~MapBrowserEvent}
668
+ * events.
669
+ * @return {!HTMLElement} The map's overlay container.
670
+ */
671
+ getOverlayContainer(): HTMLElement;
672
+ /**
673
+ * Get the element that serves as a container for overlays that don't allow
674
+ * event propagation. Elements added to this container won't let mousedown and
675
+ * touchstart events through to the map, so clicks and gestures on an overlay
676
+ * don't trigger any {@link module:ol/MapBrowserEvent~MapBrowserEvent}.
677
+ * @return {!HTMLElement} The map's overlay container that stops events.
678
+ */
679
+ getOverlayContainerStopEvent(): HTMLElement;
680
+ /**
681
+ * @return {!Document} The document where the map is displayed.
682
+ */
683
+ getOwnerDocument(): Document;
684
+ /**
685
+ * @param {import("./Tile.js").default} tile Tile.
686
+ * @param {string} tileSourceKey Tile source key.
687
+ * @param {import("./coordinate.js").Coordinate} tileCenter Tile center.
688
+ * @param {number} tileResolution Tile resolution.
689
+ * @return {number} Tile priority.
690
+ */
691
+ getTilePriority(tile: import("./Tile.js").default, tileSourceKey: string, tileCenter: import("./coordinate.js").Coordinate, tileResolution: number): number;
692
+ /**
693
+ * @param {UIEvent} browserEvent Browser event.
694
+ * @param {string} [opt_type] Type.
695
+ */
696
+ handleBrowserEvent(browserEvent: UIEvent, opt_type?: string | undefined): void;
697
+ /**
698
+ * @param {MapBrowserEvent} mapBrowserEvent The event to handle.
699
+ */
700
+ handleMapBrowserEvent(mapBrowserEvent: MapBrowserEvent<any>): void;
701
+ /**
702
+ * @protected
703
+ */
704
+ protected handlePostRender(): void;
705
+ /**
706
+ * @private
707
+ */
708
+ private handleSizeChanged_;
709
+ /**
710
+ * @private
711
+ */
712
+ private handleTargetChanged_;
713
+ /**
714
+ * @private
715
+ */
716
+ private handleTileChange_;
717
+ /**
718
+ * @private
719
+ */
720
+ private handleViewPropertyChanged_;
721
+ /**
722
+ * @private
723
+ */
724
+ private handleViewChanged_;
725
+ /**
726
+ * @private
727
+ */
728
+ private handleLayerGroupChanged_;
729
+ /**
730
+ * @return {boolean} Is rendered.
731
+ */
732
+ isRendered(): boolean;
733
+ /**
734
+ * Requests an immediate render in a synchronous manner.
735
+ * @api
736
+ */
737
+ renderSync(): void;
738
+ /**
739
+ * Redraws all text after new fonts have loaded
740
+ */
741
+ redrawText(): void;
742
+ /**
743
+ * Request a map rendering (at the next animation frame).
744
+ * @api
745
+ */
746
+ render(): void;
747
+ /**
748
+ * Remove the given control from the map.
749
+ * @param {import("./control/Control.js").default} control Control.
750
+ * @return {import("./control/Control.js").default|undefined} The removed control (or undefined
751
+ * if the control was not found).
752
+ * @api
753
+ */
754
+ removeControl(control: import("./control/Control.js").default): import("./control/Control.js").default | undefined;
755
+ /**
756
+ * Remove the given interaction from the map.
757
+ * @param {import("./interaction/Interaction.js").default} interaction Interaction to remove.
758
+ * @return {import("./interaction/Interaction.js").default|undefined} The removed interaction (or
759
+ * undefined if the interaction was not found).
760
+ * @api
761
+ */
762
+ removeInteraction(interaction: import("./interaction/Interaction.js").default): import("./interaction/Interaction.js").default | undefined;
763
+ /**
764
+ * Removes the given layer from the map.
765
+ * @param {import("./layer/Base.js").default} layer Layer.
766
+ * @return {import("./layer/Base.js").default|undefined} The removed layer (or undefined if the
767
+ * layer was not found).
768
+ * @api
769
+ */
770
+ removeLayer(layer: import("./layer/Base.js").default): import("./layer/Base.js").default | undefined;
771
+ /**
772
+ * @param {import("./layer/Group.js").GroupEvent} event The layer remove event.
773
+ * @private
774
+ */
775
+ private handleLayerRemove_;
776
+ /**
777
+ * Remove the given overlay from the map.
778
+ * @param {import("./Overlay.js").default} overlay Overlay.
779
+ * @return {import("./Overlay.js").default|undefined} The removed overlay (or undefined
780
+ * if the overlay was not found).
781
+ * @api
782
+ */
783
+ removeOverlay(overlay: import("./Overlay.js").default): import("./Overlay.js").default | undefined;
784
+ /**
785
+ * @param {number} time Time.
786
+ * @private
787
+ */
788
+ private renderFrame_;
789
+ /**
790
+ * Sets the layergroup of this map.
791
+ * @param {LayerGroup} layerGroup A layer group containing the layers in this map.
792
+ * @observable
793
+ * @api
794
+ */
795
+ setLayerGroup(layerGroup: LayerGroup): void;
796
+ /**
797
+ * Set the size of this map.
798
+ * @param {import("./size.js").Size|undefined} size The size in pixels of the map in the DOM.
799
+ * @observable
800
+ * @api
801
+ */
802
+ setSize(size: import("./size.js").Size | undefined): void;
803
+ /**
804
+ * Set the target element to render this map into.
805
+ * @param {HTMLElement|string} [target] The Element or id of the Element
806
+ * that the map is rendered in.
807
+ * @observable
808
+ * @api
809
+ */
810
+ setTarget(target?: string | HTMLElement | undefined): void;
811
+ /**
812
+ * Set the view for this map.
813
+ * @param {View|Promise<import("./View.js").ViewOptions>} view The view that controls this map.
814
+ * It is also possible to pass a promise that resolves to options for constructing a view. This
815
+ * alternative allows view properties to be resolved by sources or other components that load
816
+ * view-related metadata.
817
+ * @observable
818
+ * @api
819
+ */
820
+ setView(view: View | Promise<import("./View.js").ViewOptions>): void;
821
+ /**
822
+ * Force a recalculation of the map viewport size. This should be called when
823
+ * third-party code changes the size of the map viewport.
824
+ * @api
825
+ */
826
+ updateSize(): void;
827
+ /**
828
+ * Recomputes the viewport size and save it on the view object (if any)
829
+ * @private
830
+ */
831
+ private updateViewportSize_;
51
832
  }
52
- import PluggableMap from "./PluggableMap.js";
833
+ import TileQueue from "./TileQueue.js";
834
+ import Collection from "./Collection.js";
835
+ import MapBrowserEvent from "./MapBrowserEvent.js";
836
+ import LayerGroup from "./layer/Group.js";
837
+ import View from "./View.js";
838
+ import BaseObject from "./Object.js";
53
839
  //# sourceMappingURL=Map.d.ts.map