Remove PluggableMap

This commit is contained in:
Tim Schaub
2022-07-31 09:39:59 -06:00
parent b534368394
commit 85ef563ba8
57 changed files with 1959 additions and 1993 deletions
+2 -2
View File
@@ -23,10 +23,10 @@ import Layer from './Layer.js';
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {import("../PluggableMap.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
* use {@link import("../PluggableMap.js").default#addLayer map.addLayer()}.
* use {@link import("../Map.js").default#addLayer map.addLayer()}.
* @property {ImageSourceType} [source] Source for this layer.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
+2 -2
View File
@@ -37,10 +37,10 @@ import TileProperty from './TileProperty.js';
* @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading.
* @property {TileSourceType} [source] Source for this layer.
* @property {import("../PluggableMap.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
* use {@link import("../PluggableMap.js").default#addLayer map.addLayer()}.
* use {@link import("../Map.js").default#addLayer map.addLayer()}.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
+5 -5
View File
@@ -36,10 +36,10 @@ import {toStyle} from '../style/flat.js';
* renderer when getting features from the vector source for the rendering or hit-detection.
* Recommended value: the size of the largest symbol, line width or label.
* @property {VectorSourceType} [source] Source.
* @property {import("../PluggableMap.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
* use {@link import("../PluggableMap.js").default#addLayer map.addLayer()}.
* use [map.addLayer()]{@link import("../Map.js").default#addLayer}.
* @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all
* image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority
* is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.
@@ -161,8 +161,8 @@ class BaseVectorLayer extends Layer {
* when a hit was detected, or it will be empty.
*
* The hit detection algorithm used for this method is optimized for performance, but is less
* accurate than the one used in {@link import("../PluggableMap.js").default#getFeaturesAtPixel}: Text
* is not considered, and icons are only represented by their bounding box instead of the exact
* accurate than the one used in [map.getFeaturesAtPixel()]{@link import("../Map.js").default#getFeaturesAtPixel}.
* Text is not considered, and icons are only represented by their bounding box instead of the exact
* image.
*
* @param {import("../pixel.js").Pixel} pixel Pixel.
@@ -227,7 +227,7 @@ class BaseVectorLayer extends Layer {
/**
* Render declutter items for this layer
* @param {import("../PluggableMap.js").FrameState} frameState Frame state.
* @param {import("../Map.js").FrameState} frameState Frame state.
*/
renderDeclutter(frameState) {
if (!frameState.declutterTree) {
+9 -9
View File
@@ -9,7 +9,7 @@ import {assert} from '../asserts.js';
import {listen, unlistenByKey} from '../events.js';
/**
* @typedef {function(import("../PluggableMap.js").FrameState):HTMLElement} RenderFunction
* @typedef {function(import("../Map.js").FrameState):HTMLElement} RenderFunction
*/
/***
@@ -45,7 +45,7 @@ import {listen, unlistenByKey} from '../events.js';
* @property {SourceType} [source] Source for this layer. If not provided to the constructor,
* the source can be set by calling {@link module:ol/layer/Layer~Layer#setSource layer.setSource(source)} after
* construction.
* @property {import("../PluggableMap.js").default|null} [map] Map.
* @property {import("../Map.js").default|null} [map] Map.
* @property {RenderFunction} [render] Render function. Takes the frame state as input and is expected to return an
* HTML element. Will overwrite the default rendering for the layer.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
@@ -75,10 +75,10 @@ import {listen, unlistenByKey} from '../events.js';
* Layers group together those properties that pertain to how the data is to be
* displayed, irrespective of the source of that data.
*
* Layers are usually added to a map with {@link import("../PluggableMap.js").default#addLayer map.addLayer()}. Components
* like {@link module:ol/interaction/Draw~Draw} use unmanaged layers
* Layers are usually added to a map with [map.addLayer()]{@link import("../Map.js").default#addLayer}.
* Components like {@link module:ol/interaction/Draw~Draw} use unmanaged layers
* internally. These unmanaged layers are associated with the map using
* {@link module:ol/layer/Layer~Layer#setMap} instead.
* [layer.setMap()]{@link module:ol/layer/Layer~Layer#setMap} instead.
*
* A generic `change` event is fired when the state of the source changes.
*
@@ -262,7 +262,7 @@ class Layer extends BaseLayer {
/**
* In charge to manage the rendering of the layer. One layer type is
* bounded with one layer renderer.
* @param {?import("../PluggableMap.js").FrameState} frameState Frame state.
* @param {?import("../Map.js").FrameState} frameState Frame state.
* @param {HTMLElement} target Target which the renderer may (but need not) use
* for rendering its content.
* @return {HTMLElement} The rendered element.
@@ -285,7 +285,7 @@ class Layer extends BaseLayer {
/**
* For use inside the library only.
* @param {import("../PluggableMap.js").default|null} map Map.
* @param {import("../Map.js").default|null} map Map.
*/
setMapInternal(map) {
if (!map) {
@@ -296,7 +296,7 @@ class Layer extends BaseLayer {
/**
* For use inside the library only.
* @return {import("../PluggableMap.js").default|null} Map.
* @return {import("../Map.js").default|null} Map.
*/
getMapInternal() {
return this.get(LayerProperty.MAP);
@@ -310,7 +310,7 @@ class Layer extends BaseLayer {
*
* To add the layer to a map and have it managed by the map, use
* {@link module:ol/Map~Map#addLayer} instead.
* @param {import("../PluggableMap.js").default|null} map Map.
* @param {import("../Map.js").default|null} map Map.
* @api
*/
setMap(map) {
+2 -2
View File
@@ -88,10 +88,10 @@ class ErrorEvent extends BaseEvent {
* * `'vector'`: Everything is rendered as vectors. Use this mode for improved performance on vector
* tile layers with only a few rendered features (e.g. for highlighting a subset of features of
* another layer with the same source).
* @property {import("../PluggableMap.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
* use {@link import("../PluggableMap.js").default#addLayer map.addLayer()}.
* use [map.addLayer()]{@link import("../Map.js").default#addLayer}.
* @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be
* recreated during animations. This means that no vectors will be shown clipped, but the setting
* will have a performance impact for large amounts of vector data. When set to `false`, batches
+2 -2
View File
@@ -31,10 +31,10 @@ import CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.
* renderer when getting features from the vector source for the rendering or hit-detection.
* Recommended value: the size of the largest symbol, line width or label.
* @property {VectorSourceType} [source] Source.
* @property {import("../PluggableMap.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
* use {@link import("../PluggableMap.js").default#addLayer map.addLayer()}.
* use [map.addLayer()]{@link import("../Map.js").default#addLayer}.
* @property {boolean} [declutter=false] Declutter images and text on this layer. The priority is defined
* by the `zIndex` of the style and the render order of features. Higher z-index means higher priority.
* Within the same z-index, a feature rendered before another has higher priority.
+4 -4
View File
@@ -55,10 +55,10 @@ import {assert} from '../asserts.js';
* tile layers with only a few rendered features (e.g. for highlighting a subset of features of
* another layer with the same source).
* @property {import("../source/VectorTile.js").default} [source] Source.
* @property {import("../PluggableMap.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
* use {@link import("../PluggableMap.js").default#addLayer map.addLayer()}.
* use [map.addLayer()]{@link import("../Map.js").default#addLayer}.
* @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all
* image and text styles of all Vector and VectorTile layers that have set this to `true`. The priority
* is defined by the z-index of the layer, the `zIndex` of the style and the render order of features.
@@ -171,8 +171,8 @@ class VectorTileLayer extends BaseVectorLayer {
* when a hit was detected, or it will be empty.
*
* The hit detection algorithm used for this method is optimized for performance, but is less
* accurate than the one used in {@link import("../PluggableMap.js").default#getFeaturesAtPixel map.getFeaturesAtPixel()}: Text
* is not considered, and icons are only represented by their bounding box instead of the exact
* accurate than the one used in [map.getFeaturesAtPixel()]{@link import("../Map.js").default#getFeaturesAtPixel}.
* Text is not considered, and icons are only represented by their bounding box instead of the exact
* image.
*
* @param {import("../pixel.js").Pixel} pixel Pixel.
+3 -3
View File
@@ -68,7 +68,7 @@ import {
* expects an extent and a resolution (in view projection units per pixel) and returns an array of sources. See
* {@link module:ol/source.sourcesFromTileGrid} for a helper function to generate sources that are organized in a
* pyramid following the same pattern as a tile grid. **Note:** All sources must have the same band count and content.
* @property {import("../PluggableMap.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* @property {import("../Map.js").default} [map] Sets the layer as overlay on a map. The map will not manage
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
* use {@link module:ol/Map~Map#addLayer}.
@@ -422,7 +422,7 @@ class WebGLTileLayer extends BaseTileLayer {
}
/**
* @param {import("../PluggableMap").FrameState} frameState Frame state.
* @param {import("../Map").FrameState} frameState Frame state.
* @param {Array<SourceType>} sources Sources.
* @return {HTMLElement} Canvas.
*/
@@ -439,7 +439,7 @@ class WebGLTileLayer extends BaseTileLayer {
}
/**
* @param {?import("../PluggableMap.js").FrameState} frameState Frame state.
* @param {?import("../Map.js").FrameState} frameState Frame state.
* @param {HTMLElement} target Target which the renderer may (but need not) use
* for rendering its content.
* @return {HTMLElement} The rendered element.