planning
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s

This commit is contained in:
2024-10-14 09:15:30 +02:00
parent bcba00a730
commit 6e64e138e2
21059 changed files with 2317811 additions and 1 deletions

312
node_modules/ol/layer/Base.d.ts generated vendored Normal file
View File

@@ -0,0 +1,312 @@
export default BaseLayer;
/**
* A css color, or a function called with a view resolution returning a css color.
*/
export type BackgroundColor = string | ((arg0: number) => string);
export type BaseLayerObjectEventTypes = import("../ObjectEventType").Types | 'change:extent' | 'change:maxResolution' | 'change:maxZoom' | 'change:minResolution' | 'change:minZoom' | 'change:opacity' | 'change:visible' | 'change:zIndex';
/**
* *
*/
export type BaseLayerOnSignature<Return> = import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> & import("../Observable").OnSignature<BaseLayerObjectEventTypes, import("../Object").ObjectEvent, Return> & import("../Observable").CombinedOnSignature<import("../Observable").EventTypes | BaseLayerObjectEventTypes, Return>;
export type Options = {
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* Background color for the layer. If not specified, no background
* will be rendered.
*/
background?: BackgroundColor | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
/**
* A css color, or a function called with a view resolution returning a css color.
*
* @typedef {string|function(number):string} BackgroundColor
* @api
*/
/**
* @typedef {import("../ObjectEventType").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|
* 'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes
*/
/***
* @template Return
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
* import("../Observable").OnSignature<BaseLayerObjectEventTypes, import("../Object").ObjectEvent, Return> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|BaseLayerObjectEventTypes, Return>} BaseLayerOnSignature
*/
/**
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {BackgroundColor} [background] Background color for the layer. If not specified, no background
* will be rendered.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
* instantiated in apps.
* Note that with {@link module:ol/layer/Base~BaseLayer} and all its subclasses, any property set in
* the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so
* is observable, and has get/set accessors.
*
* @api
*/
declare class BaseLayer extends BaseObject {
/**
* @param {Options} options Layer options.
*/
constructor(options: Options);
/***
* @type {BaseLayerOnSignature<import("../events").EventsKey>}
*/
on: BaseLayerOnSignature<import("../events").EventsKey>;
/***
* @type {BaseLayerOnSignature<import("../events").EventsKey>}
*/
once: BaseLayerOnSignature<import("../events").EventsKey>;
/***
* @type {BaseLayerOnSignature<void>}
*/
un: BaseLayerOnSignature<void>;
/**
* @type {BackgroundColor|false}
* @private
*/
private background_;
/**
* @type {string}
* @private
*/
private className_;
/**
* @type {import("./Layer.js").State}
* @private
*/
private state_;
/**
* Get the background for this layer.
* @return {BackgroundColor|false} Layer background.
*/
getBackground(): BackgroundColor | false;
/**
* @return {string} CSS class name.
*/
getClassName(): string;
/**
* This method is not meant to be called by layers or layer renderers because the state
* is incorrect if the layer is included in a layer group.
*
* @param {boolean} [opt_managed] Layer is managed.
* @return {import("./Layer.js").State} Layer state.
*/
getLayerState(opt_managed?: boolean | undefined): import("./Layer.js").State;
/**
* @abstract
* @param {Array<import("./Layer.js").default>} [opt_array] Array of layers (to be
* modified in place).
* @return {Array<import("./Layer.js").default>} Array of layers.
*/
getLayersArray(opt_array?: import("./Layer.js").default<import("../source/Source.js").default, import("../renderer/Layer.js").default<any>>[] | undefined): Array<import("./Layer.js").default>;
/**
* @abstract
* @param {Array<import("./Layer.js").State>} [opt_states] Optional list of layer
* states (to be modified in place).
* @return {Array<import("./Layer.js").State>} List of layer states.
*/
getLayerStatesArray(opt_states?: import("./Layer.js").State[] | undefined): Array<import("./Layer.js").State>;
/**
* Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it
* will be visible regardless of extent.
* @return {import("../extent.js").Extent|undefined} The layer extent.
* @observable
* @api
*/
getExtent(): import("../extent.js").Extent | undefined;
/**
* Return the maximum resolution of the layer.
* @return {number} The maximum resolution of the layer.
* @observable
* @api
*/
getMaxResolution(): number;
/**
* Return the minimum resolution of the layer.
* @return {number} The minimum resolution of the layer.
* @observable
* @api
*/
getMinResolution(): number;
/**
* Return the minimum zoom level of the layer.
* @return {number} The minimum zoom level of the layer.
* @observable
* @api
*/
getMinZoom(): number;
/**
* Return the maximum zoom level of the layer.
* @return {number} The maximum zoom level of the layer.
* @observable
* @api
*/
getMaxZoom(): number;
/**
* Return the opacity of the layer (between 0 and 1).
* @return {number} The opacity of the layer.
* @observable
* @api
*/
getOpacity(): number;
/**
* @abstract
* @return {import("../source/Source.js").State} Source state.
*/
getSourceState(): import("../source/Source.js").State;
/**
* Return the visibility of the layer (`true` or `false`).
* @return {boolean} The visibility of the layer.
* @observable
* @api
*/
getVisible(): boolean;
/**
* Return the Z-index of the layer, which is used to order layers before
* rendering. The default Z-index is 0.
* @return {number} The Z-index of the layer.
* @observable
* @api
*/
getZIndex(): number;
/**
* Sets the background color.
* @param {BackgroundColor} [opt_background] Background color.
*/
setBackground(opt_background?: BackgroundColor | undefined): void;
/**
* Set the extent at which the layer is visible. If `undefined`, the layer
* will be visible at all extents.
* @param {import("../extent.js").Extent|undefined} extent The extent of the layer.
* @observable
* @api
*/
setExtent(extent: import("../extent.js").Extent | undefined): void;
/**
* Set the maximum resolution at which the layer is visible.
* @param {number} maxResolution The maximum resolution of the layer.
* @observable
* @api
*/
setMaxResolution(maxResolution: number): void;
/**
* Set the minimum resolution at which the layer is visible.
* @param {number} minResolution The minimum resolution of the layer.
* @observable
* @api
*/
setMinResolution(minResolution: number): void;
/**
* Set the maximum zoom (exclusive) at which the layer is visible.
* Note that the zoom levels for layer visibility are based on the
* view zoom level, which may be different from a tile source zoom level.
* @param {number} maxZoom The maximum zoom of the layer.
* @observable
* @api
*/
setMaxZoom(maxZoom: number): void;
/**
* Set the minimum zoom (inclusive) at which the layer is visible.
* Note that the zoom levels for layer visibility are based on the
* view zoom level, which may be different from a tile source zoom level.
* @param {number} minZoom The minimum zoom of the layer.
* @observable
* @api
*/
setMinZoom(minZoom: number): void;
/**
* Set the opacity of the layer, allowed values range from 0 to 1.
* @param {number} opacity The opacity of the layer.
* @observable
* @api
*/
setOpacity(opacity: number): void;
/**
* Set the visibility of the layer (`true` or `false`).
* @param {boolean} visible The visibility of the layer.
* @observable
* @api
*/
setVisible(visible: boolean): void;
/**
* Set Z-index of the layer, which is used to order layers before rendering.
* The default Z-index is 0.
* @param {number} zindex The z-index of the layer.
* @observable
* @api
*/
setZIndex(zindex: number): void;
}
import BaseObject from "../Object.js";
//# sourceMappingURL=Base.d.ts.map

1
node_modules/ol/layer/Base.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Base.d.ts","sourceRoot":"","sources":["../src/layer/Base.js"],"names":[],"mappings":";;;;8BAaa,MAAM,WAAU,MAAM,KAAE,MAAM,CAAA;wCAK9B,OAAO,oBAAoB,EAAE,KAAK,GAAC,eAAe,GAAC,sBAAsB,GAAC,gBAAgB,GACtG,sBAA2B,GAAC,gBAAgB,GAAC,gBAAgB,GAAC,gBAAgB,GAAC,eAAe;;;;2CAKlF,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,yBAAyB,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GAC3G,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,GAAC,yBAAyB,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAhBtH;;;;;GAKG;AAEH;;;GAGG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;GASG;AACH;IACE;;OAEG;IACH,qBAFW,OAAO,EAkEjB;IA7DC;;OAEG;IACH,IAFU,qBAAqB,OAAO,WAAW,EAAE,SAAS,CAAC,CAEtD;IAEP;;OAEG;IACH,MAFU,qBAAqB,OAAO,WAAW,EAAE,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JW,MAAM,QAMhB;CAYF"}

373
node_modules/ol/layer/Base.js generated vendored Normal file
View File

@@ -0,0 +1,373 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/Base
*/
import BaseObject from '../Object.js';
import LayerProperty from './Property.js';
import { abstract } from '../util.js';
import { assert } from '../asserts.js';
import { assign } from '../obj.js';
import { clamp } from '../math.js';
/**
* A css color, or a function called with a view resolution returning a css color.
*
* @typedef {string|function(number):string} BackgroundColor
* @api
*/
/**
* @typedef {import("../ObjectEventType").Types|'change:extent'|'change:maxResolution'|'change:maxZoom'|
* 'change:minResolution'|'change:minZoom'|'change:opacity'|'change:visible'|'change:zIndex'} BaseLayerObjectEventTypes
*/
/***
* @template Return
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
* import("../Observable").OnSignature<BaseLayerObjectEventTypes, import("../Object").ObjectEvent, Return> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|BaseLayerObjectEventTypes, Return>} BaseLayerOnSignature
*/
/**
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {BackgroundColor} [background] Background color for the layer. If not specified, no background
* will be rendered.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
* instantiated in apps.
* Note that with {@link module:ol/layer/Base~BaseLayer} and all its subclasses, any property set in
* the options is set as a {@link module:ol/Object~BaseObject} property on the layer object, so
* is observable, and has get/set accessors.
*
* @api
*/
var BaseLayer = /** @class */ (function (_super) {
__extends(BaseLayer, _super);
/**
* @param {Options} options Layer options.
*/
function BaseLayer(options) {
var _this = _super.call(this) || this;
/***
* @type {BaseLayerOnSignature<import("../events").EventsKey>}
*/
_this.on;
/***
* @type {BaseLayerOnSignature<import("../events").EventsKey>}
*/
_this.once;
/***
* @type {BaseLayerOnSignature<void>}
*/
_this.un;
/**
* @type {BackgroundColor|false}
* @private
*/
_this.background_ = options.background;
/**
* @type {Object<string, *>}
*/
var properties = assign({}, options);
if (typeof options.properties === 'object') {
delete properties.properties;
assign(properties, options.properties);
}
properties[LayerProperty.OPACITY] =
options.opacity !== undefined ? options.opacity : 1;
assert(typeof properties[LayerProperty.OPACITY] === 'number', 64); // Layer opacity must be a number
properties[LayerProperty.VISIBLE] =
options.visible !== undefined ? options.visible : true;
properties[LayerProperty.Z_INDEX] = options.zIndex;
properties[LayerProperty.MAX_RESOLUTION] =
options.maxResolution !== undefined ? options.maxResolution : Infinity;
properties[LayerProperty.MIN_RESOLUTION] =
options.minResolution !== undefined ? options.minResolution : 0;
properties[LayerProperty.MIN_ZOOM] =
options.minZoom !== undefined ? options.minZoom : -Infinity;
properties[LayerProperty.MAX_ZOOM] =
options.maxZoom !== undefined ? options.maxZoom : Infinity;
/**
* @type {string}
* @private
*/
_this.className_ =
properties.className !== undefined ? properties.className : 'ol-layer';
delete properties.className;
_this.setProperties(properties);
/**
* @type {import("./Layer.js").State}
* @private
*/
_this.state_ = null;
return _this;
}
/**
* Get the background for this layer.
* @return {BackgroundColor|false} Layer background.
*/
BaseLayer.prototype.getBackground = function () {
return this.background_;
};
/**
* @return {string} CSS class name.
*/
BaseLayer.prototype.getClassName = function () {
return this.className_;
};
/**
* This method is not meant to be called by layers or layer renderers because the state
* is incorrect if the layer is included in a layer group.
*
* @param {boolean} [opt_managed] Layer is managed.
* @return {import("./Layer.js").State} Layer state.
*/
BaseLayer.prototype.getLayerState = function (opt_managed) {
/** @type {import("./Layer.js").State} */
var state = this.state_ ||
/** @type {?} */ ({
layer: this,
managed: opt_managed === undefined ? true : opt_managed,
});
var zIndex = this.getZIndex();
state.opacity = clamp(Math.round(this.getOpacity() * 100) / 100, 0, 1);
state.visible = this.getVisible();
state.extent = this.getExtent();
state.zIndex = zIndex === undefined && !state.managed ? Infinity : zIndex;
state.maxResolution = this.getMaxResolution();
state.minResolution = Math.max(this.getMinResolution(), 0);
state.minZoom = this.getMinZoom();
state.maxZoom = this.getMaxZoom();
this.state_ = state;
return state;
};
/**
* @abstract
* @param {Array<import("./Layer.js").default>} [opt_array] Array of layers (to be
* modified in place).
* @return {Array<import("./Layer.js").default>} Array of layers.
*/
BaseLayer.prototype.getLayersArray = function (opt_array) {
return abstract();
};
/**
* @abstract
* @param {Array<import("./Layer.js").State>} [opt_states] Optional list of layer
* states (to be modified in place).
* @return {Array<import("./Layer.js").State>} List of layer states.
*/
BaseLayer.prototype.getLayerStatesArray = function (opt_states) {
return abstract();
};
/**
* Return the {@link module:ol/extent~Extent extent} of the layer or `undefined` if it
* will be visible regardless of extent.
* @return {import("../extent.js").Extent|undefined} The layer extent.
* @observable
* @api
*/
BaseLayer.prototype.getExtent = function () {
return /** @type {import("../extent.js").Extent|undefined} */ (this.get(LayerProperty.EXTENT));
};
/**
* Return the maximum resolution of the layer.
* @return {number} The maximum resolution of the layer.
* @observable
* @api
*/
BaseLayer.prototype.getMaxResolution = function () {
return /** @type {number} */ (this.get(LayerProperty.MAX_RESOLUTION));
};
/**
* Return the minimum resolution of the layer.
* @return {number} The minimum resolution of the layer.
* @observable
* @api
*/
BaseLayer.prototype.getMinResolution = function () {
return /** @type {number} */ (this.get(LayerProperty.MIN_RESOLUTION));
};
/**
* Return the minimum zoom level of the layer.
* @return {number} The minimum zoom level of the layer.
* @observable
* @api
*/
BaseLayer.prototype.getMinZoom = function () {
return /** @type {number} */ (this.get(LayerProperty.MIN_ZOOM));
};
/**
* Return the maximum zoom level of the layer.
* @return {number} The maximum zoom level of the layer.
* @observable
* @api
*/
BaseLayer.prototype.getMaxZoom = function () {
return /** @type {number} */ (this.get(LayerProperty.MAX_ZOOM));
};
/**
* Return the opacity of the layer (between 0 and 1).
* @return {number} The opacity of the layer.
* @observable
* @api
*/
BaseLayer.prototype.getOpacity = function () {
return /** @type {number} */ (this.get(LayerProperty.OPACITY));
};
/**
* @abstract
* @return {import("../source/Source.js").State} Source state.
*/
BaseLayer.prototype.getSourceState = function () {
return abstract();
};
/**
* Return the visibility of the layer (`true` or `false`).
* @return {boolean} The visibility of the layer.
* @observable
* @api
*/
BaseLayer.prototype.getVisible = function () {
return /** @type {boolean} */ (this.get(LayerProperty.VISIBLE));
};
/**
* Return the Z-index of the layer, which is used to order layers before
* rendering. The default Z-index is 0.
* @return {number} The Z-index of the layer.
* @observable
* @api
*/
BaseLayer.prototype.getZIndex = function () {
return /** @type {number} */ (this.get(LayerProperty.Z_INDEX));
};
/**
* Sets the background color.
* @param {BackgroundColor} [opt_background] Background color.
*/
BaseLayer.prototype.setBackground = function (opt_background) {
this.background_ = opt_background;
this.changed();
};
/**
* Set the extent at which the layer is visible. If `undefined`, the layer
* will be visible at all extents.
* @param {import("../extent.js").Extent|undefined} extent The extent of the layer.
* @observable
* @api
*/
BaseLayer.prototype.setExtent = function (extent) {
this.set(LayerProperty.EXTENT, extent);
};
/**
* Set the maximum resolution at which the layer is visible.
* @param {number} maxResolution The maximum resolution of the layer.
* @observable
* @api
*/
BaseLayer.prototype.setMaxResolution = function (maxResolution) {
this.set(LayerProperty.MAX_RESOLUTION, maxResolution);
};
/**
* Set the minimum resolution at which the layer is visible.
* @param {number} minResolution The minimum resolution of the layer.
* @observable
* @api
*/
BaseLayer.prototype.setMinResolution = function (minResolution) {
this.set(LayerProperty.MIN_RESOLUTION, minResolution);
};
/**
* Set the maximum zoom (exclusive) at which the layer is visible.
* Note that the zoom levels for layer visibility are based on the
* view zoom level, which may be different from a tile source zoom level.
* @param {number} maxZoom The maximum zoom of the layer.
* @observable
* @api
*/
BaseLayer.prototype.setMaxZoom = function (maxZoom) {
this.set(LayerProperty.MAX_ZOOM, maxZoom);
};
/**
* Set the minimum zoom (inclusive) at which the layer is visible.
* Note that the zoom levels for layer visibility are based on the
* view zoom level, which may be different from a tile source zoom level.
* @param {number} minZoom The minimum zoom of the layer.
* @observable
* @api
*/
BaseLayer.prototype.setMinZoom = function (minZoom) {
this.set(LayerProperty.MIN_ZOOM, minZoom);
};
/**
* Set the opacity of the layer, allowed values range from 0 to 1.
* @param {number} opacity The opacity of the layer.
* @observable
* @api
*/
BaseLayer.prototype.setOpacity = function (opacity) {
assert(typeof opacity === 'number', 64); // Layer opacity must be a number
this.set(LayerProperty.OPACITY, opacity);
};
/**
* Set the visibility of the layer (`true` or `false`).
* @param {boolean} visible The visibility of the layer.
* @observable
* @api
*/
BaseLayer.prototype.setVisible = function (visible) {
this.set(LayerProperty.VISIBLE, visible);
};
/**
* Set Z-index of the layer, which is used to order layers before rendering.
* The default Z-index is 0.
* @param {number} zindex The z-index of the layer.
* @observable
* @api
*/
BaseLayer.prototype.setZIndex = function (zindex) {
this.set(LayerProperty.Z_INDEX, zindex);
};
/**
* Clean up.
*/
BaseLayer.prototype.disposeInternal = function () {
if (this.state_) {
this.state_.layer = null;
this.state_ = null;
}
_super.prototype.disposeInternal.call(this);
};
return BaseLayer;
}(BaseObject));
export default BaseLayer;
//# sourceMappingURL=Base.js.map

1
node_modules/ol/layer/Base.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

112
node_modules/ol/layer/BaseImage.d.ts generated vendored Normal file
View File

@@ -0,0 +1,112 @@
export default BaseImageLayer;
export type Options<ImageSourceType extends import("../source/Image.js").default> = {
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* 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()}.
*/
map?: import("../PluggableMap.js").default | undefined;
/**
* Source for this layer.
*/
source?: ImageSourceType | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
/**
* @template {import("../source/Image.js").default} ImageSourceType
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* 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
* 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()}.
* @property {ImageSourceType} [source] Source for this layer.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Server-rendered images that are available for arbitrary extents and
* resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Image.js").default} ImageSourceType
* @template {import("../renderer/Layer.js").default} RendererType
* @extends {Layer<ImageSourceType, RendererType>}
* @api
*/
declare class BaseImageLayer<ImageSourceType extends import("../source/Image.js").default, RendererType extends import("../renderer/Layer.js").default<any>> extends Layer<ImageSourceType, RendererType> {
/**
* @param {Options<ImageSourceType>} [opt_options] Layer options.
*/
constructor(opt_options?: Options<ImageSourceType> | undefined);
}
import Layer from "./Layer.js";
//# sourceMappingURL=BaseImage.d.ts.map

1
node_modules/ol/layer/BaseImage.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"BaseImage.d.ts","sourceRoot":"","sources":["../src/layer/BaseImage.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;;;;;;;;;GAYG;AACH;IACE;;OAEG;IACH,gEAGC;CACF"}

72
node_modules/ol/layer/BaseImage.js generated vendored Normal file
View File

@@ -0,0 +1,72 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/BaseImage
*/
import Layer from './Layer.js';
/**
* @template {import("../source/Image.js").default} ImageSourceType
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* 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
* 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()}.
* @property {ImageSourceType} [source] Source for this layer.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Server-rendered images that are available for arbitrary extents and
* resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Image.js").default} ImageSourceType
* @template {import("../renderer/Layer.js").default} RendererType
* @extends {Layer<ImageSourceType, RendererType>}
* @api
*/
var BaseImageLayer = /** @class */ (function (_super) {
__extends(BaseImageLayer, _super);
/**
* @param {Options<ImageSourceType>} [opt_options] Layer options.
*/
function BaseImageLayer(opt_options) {
var options = opt_options ? opt_options : {};
return _super.call(this, options) || this;
}
return BaseImageLayer;
}(Layer));
export default BaseImageLayer;
//# sourceMappingURL=BaseImage.js.map

1
node_modules/ol/layer/BaseImage.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"BaseImage.js","sourceRoot":"","sources":["../src/layer/BaseImage.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;;;;;;;;;GAYG;AACH;IAA6B,kCAAK;IAChC;;OAEG;IACH,wBAAY,WAAW;QACrB,IAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;eAC/C,kBAAM,OAAO,CAAC;IAChB,CAAC;IACH,qBAAC;AAAD,CAAC,AARD,CAA6B,KAAK,GAQjC;AAED,eAAe,cAAc,CAAC"}

177
node_modules/ol/layer/BaseTile.d.ts generated vendored Normal file
View File

@@ -0,0 +1,177 @@
export default BaseTileLayer;
/**
* *
*/
export type BaseTileLayerOnSignature<Return> = import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> & import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes | 'change:source' | 'change:preload' | 'change:useInterimTilesOnError', import("../Object").ObjectEvent, Return> & import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> & import("../Observable").CombinedOnSignature<import("../Observable").EventTypes | import("./Base").BaseLayerObjectEventTypes | 'change:source' | 'change:preload' | 'change:useInterimTilesOnError' | import("../render/EventType").LayerRenderEventTypes, Return>;
export type Options<TileSourceType extends import("../source/Tile.js").default> = {
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading.
*/
preload?: number | undefined;
/**
* Source for this layer.
*/
source?: TileSourceType | undefined;
/**
* 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()}.
*/
map?: import("../PluggableMap.js").default | undefined;
/**
* Use interim tiles on error.
*/
useInterimTilesOnError?: boolean | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
/***
* @template Return
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
* import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes|
* 'change:source'|'change:preload'|'change:useInterimTilesOnError', import("../Object").ObjectEvent, Return> &
* import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("./Base").BaseLayerObjectEventTypes|
* 'change:source'|'change:preload'|'change:useInterimTilesOnError'|import("../render/EventType").LayerRenderEventTypes, Return>} BaseTileLayerOnSignature
*/
/**
* @template {import("../source/Tile.js").default} TileSourceType
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @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
* 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()}.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* For layer sources that provide pre-rendered, tiled images in grids that are
* organized by zoom levels for specific resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Tile.js").default} TileSourceType
* @template {import("../renderer/Layer.js").default} RendererType
* @extends {Layer<TileSourceType, RendererType>}
* @api
*/
declare class BaseTileLayer<TileSourceType extends import("../source/Tile.js").default, RendererType extends import("../renderer/Layer.js").default<any>> extends Layer<TileSourceType, RendererType> {
/**
* @param {Options<TileSourceType>} [opt_options] Tile layer options.
*/
constructor(opt_options?: Options<TileSourceType> | undefined);
/***
* @type {BaseTileLayerOnSignature<import("../events").EventsKey>}
*/
on: BaseTileLayerOnSignature<import("../events").EventsKey>;
/***
* @type {BaseTileLayerOnSignature<import("../events").EventsKey>}
*/
once: BaseTileLayerOnSignature<import("../events").EventsKey>;
/***
* @type {BaseTileLayerOnSignature<void>}
*/
un: BaseTileLayerOnSignature<void>;
/**
* Return the level as number to which we will preload tiles up to.
* @return {number} The level to preload tiles up to.
* @observable
* @api
*/
getPreload(): number;
/**
* Set the level as number to which we will preload tiles up to.
* @param {number} preload The level to preload tiles up to.
* @observable
* @api
*/
setPreload(preload: number): void;
/**
* Whether we use interim tiles on error.
* @return {boolean} Use interim tiles on error.
* @observable
* @api
*/
getUseInterimTilesOnError(): boolean;
/**
* Set whether we use interim tiles on error.
* @param {boolean} useInterimTilesOnError Use interim tiles on error.
* @observable
* @api
*/
setUseInterimTilesOnError(useInterimTilesOnError: boolean): void;
}
import Layer from "./Layer.js";
//# sourceMappingURL=BaseTile.d.ts.map

1
node_modules/ol/layer/BaseTile.d.ts.map generated vendored Normal file
View File

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BF"}

162
node_modules/ol/layer/BaseTile.js generated vendored Normal file
View File

@@ -0,0 +1,162 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/BaseTile
*/
import Layer from './Layer.js';
import TileProperty from './TileProperty.js';
import { assign } from '../obj.js';
/***
* @template Return
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
* import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes|
* 'change:source'|'change:preload'|'change:useInterimTilesOnError', import("../Object").ObjectEvent, Return> &
* import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("./Base").BaseLayerObjectEventTypes|
* 'change:source'|'change:preload'|'change:useInterimTilesOnError'|import("../render/EventType").LayerRenderEventTypes, Return>} BaseTileLayerOnSignature
*/
/**
* @template {import("../source/Tile.js").default} TileSourceType
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @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
* 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()}.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* For layer sources that provide pre-rendered, tiled images in grids that are
* organized by zoom levels for specific resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Tile.js").default} TileSourceType
* @template {import("../renderer/Layer.js").default} RendererType
* @extends {Layer<TileSourceType, RendererType>}
* @api
*/
var BaseTileLayer = /** @class */ (function (_super) {
__extends(BaseTileLayer, _super);
/**
* @param {Options<TileSourceType>} [opt_options] Tile layer options.
*/
function BaseTileLayer(opt_options) {
var _this = this;
var options = opt_options ? opt_options : {};
var baseOptions = assign({}, options);
delete baseOptions.preload;
delete baseOptions.useInterimTilesOnError;
_this = _super.call(this, baseOptions) || this;
/***
* @type {BaseTileLayerOnSignature<import("../events").EventsKey>}
*/
_this.on;
/***
* @type {BaseTileLayerOnSignature<import("../events").EventsKey>}
*/
_this.once;
/***
* @type {BaseTileLayerOnSignature<void>}
*/
_this.un;
_this.setPreload(options.preload !== undefined ? options.preload : 0);
_this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined
? options.useInterimTilesOnError
: true);
return _this;
}
/**
* Return the level as number to which we will preload tiles up to.
* @return {number} The level to preload tiles up to.
* @observable
* @api
*/
BaseTileLayer.prototype.getPreload = function () {
return /** @type {number} */ (this.get(TileProperty.PRELOAD));
};
/**
* Set the level as number to which we will preload tiles up to.
* @param {number} preload The level to preload tiles up to.
* @observable
* @api
*/
BaseTileLayer.prototype.setPreload = function (preload) {
this.set(TileProperty.PRELOAD, preload);
};
/**
* Whether we use interim tiles on error.
* @return {boolean} Use interim tiles on error.
* @observable
* @api
*/
BaseTileLayer.prototype.getUseInterimTilesOnError = function () {
return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));
};
/**
* Set whether we use interim tiles on error.
* @param {boolean} useInterimTilesOnError Use interim tiles on error.
* @observable
* @api
*/
BaseTileLayer.prototype.setUseInterimTilesOnError = function (useInterimTilesOnError) {
this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
};
/**
* Get data for a pixel location. The return type depends on the source data. For image tiles,
* a four element RGBA array will be returned. For data tiles, the array length will match the
* number of bands in the dataset. For requests outside the layer extent, `null` will be returned.
* Data for a image tiles can only be retrieved if the source's `crossOrigin` property is set.
*
* ```js
* // display layer data on every pointer move
* map.on('pointermove', (event) => {
* console.log(layer.getData(event.pixel));
* });
* ```
* @param {import("../pixel").Pixel} pixel Pixel.
* @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
* @api
*/
BaseTileLayer.prototype.getData = function (pixel) {
return _super.prototype.getData.call(this, pixel);
};
return BaseTileLayer;
}(Layer));
export default BaseTileLayer;
//# sourceMappingURL=BaseTile.js.map

1
node_modules/ol/layer/BaseTile.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"BaseTile.js","sourceRoot":"","sources":["../src/layer/BaseTile.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,YAAY,MAAM,mBAAmB,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GAAG,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAClD,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,iDAAyB,GAAzB,UAA0B,sBAAsB;QAC9C,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACH,+BAAO,GAAP,UAAQ,KAAK;QACX,OAAO,iBAAM,OAAO,YAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IACH,oBAAC;AAAD,CAAC,AAjGD,CAA4B,KAAK,GAiGhC;AAED,eAAe,aAAa,CAAC"}

221
node_modules/ol/layer/BaseVector.d.ts generated vendored Normal file
View File

@@ -0,0 +1,221 @@
export default BaseVectorLayer;
export type Options<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Geometry.js").default> | import("../source/VectorTile.js").default> = {
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
*/
renderOrder?: import("../render.js").OrderFunction | undefined;
/**
* The buffer in pixels around the viewport extent used by the
* 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.
*/
renderBuffer?: number | undefined;
/**
* Source.
*/
source?: VectorSourceType | undefined;
/**
* 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()}.
*/
map?: import("../PluggableMap.js").default | undefined;
/**
* 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.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
*/
declutter?: boolean | undefined;
/**
* Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module :ol/style/Style~Style} for the default style
* which will be used if this is not set.
*/
style?: import("../style/Style.js").StyleLike | null | undefined;
/**
* Background color for the layer. If not specified, no background
* will be rendered.
*/
background?: import("./Base.js").BackgroundColor | undefined;
/**
* 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 will be recreated when no animation is active.
*/
updateWhileAnimating?: boolean | undefined;
/**
* When set to `true`, feature batches will
* be recreated during interactions. See also `updateWhileAnimating`.
*/
updateWhileInteracting?: boolean | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
/**
* @classdesc
* Vector data that is rendered client-side.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Vector.js").default|import("../source/VectorTile.js").default} VectorSourceType
* @template {import("../renderer/canvas/VectorLayer.js").default|import("../renderer/canvas/VectorTileLayer.js").default|import("../renderer/canvas/VectorImageLayer.js").default|import("../renderer/webgl/PointsLayer.js").default} RendererType
* @extends {Layer<VectorSourceType, RendererType>}
* @api
*/
declare class BaseVectorLayer<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Geometry.js").default> | import("../source/VectorTile.js").default, RendererType extends import("../renderer/canvas/VectorLayer.js").default | import("../renderer/canvas/VectorTileLayer.js").default | import("../renderer/canvas/VectorImageLayer.js").default | import("../renderer/webgl/PointsLayer.js").default> extends Layer<VectorSourceType, RendererType> {
/**
* @param {Options<VectorSourceType>} [opt_options] Options.
*/
constructor(opt_options?: Options<VectorSourceType> | undefined);
/**
* @private
* @type {boolean}
*/
private declutter_;
/**
* @type {number}
* @private
*/
private renderBuffer_;
/**
* User provided style.
* @type {import("../style/Style.js").StyleLike}
* @private
*/
private style_;
/**
* Style function for use within the library.
* @type {import("../style/Style.js").StyleFunction|undefined}
* @private
*/
private styleFunction_;
/**
* @type {boolean}
* @private
*/
private updateWhileAnimating_;
/**
* @type {boolean}
* @private
*/
private updateWhileInteracting_;
/**
* @return {boolean} Declutter.
*/
getDeclutter(): boolean;
/**
* @return {number|undefined} Render buffer.
*/
getRenderBuffer(): number | undefined;
/**
* @return {function(import("../Feature.js").default, import("../Feature.js").default): number|null|undefined} Render
* order.
*/
getRenderOrder(): (arg0: import("../Feature.js").default, arg1: import("../Feature.js").default) => number | null | undefined;
/**
* Get the style for features. This returns whatever was passed to the `style`
* option at construction or to the `setStyle` method.
* @return {import("../style/Style.js").StyleLike|null|undefined} Layer style.
* @api
*/
getStyle(): import("../style/Style.js").StyleLike | null | undefined;
/**
* Get the style function.
* @return {import("../style/Style.js").StyleFunction|undefined} Layer style function.
* @api
*/
getStyleFunction(): import("../style/Style.js").StyleFunction | undefined;
/**
* @return {boolean} Whether the rendered layer should be updated while
* animating.
*/
getUpdateWhileAnimating(): boolean;
/**
* @return {boolean} Whether the rendered layer should be updated while
* interacting.
*/
getUpdateWhileInteracting(): boolean;
/**
* Render declutter items for this layer
* @param {import("../PluggableMap.js").FrameState} frameState Frame state.
*/
renderDeclutter(frameState: import("../PluggableMap.js").FrameState): void;
/**
* @param {import("../render.js").OrderFunction|null|undefined} renderOrder
* Render order.
*/
setRenderOrder(renderOrder: import("../render.js").OrderFunction | null | undefined): void;
/**
* Set the style for features. This can be a single style object, an array
* of styles, or a function that takes a feature and resolution and returns
* an array of styles. If set to `null`, the layer has no style (a `null` style),
* so only features that have their own styles will be rendered in the layer. Call
* `setStyle()` without arguments to reset to the default style. See
* {@link module:ol/style/Style~Style} for information on the default style.
* @param {import("../style/Style.js").StyleLike|null} [opt_style] Layer style.
* @api
*/
setStyle(opt_style?: import("../style/Style.js").StyleLike | null | undefined): void;
}
import Layer from "./Layer.js";
//# sourceMappingURL=BaseVector.d.ts.map

1
node_modules/ol/layer/BaseVector.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"BaseVector.d.ts","sourceRoot":"","sources":["../src/layer/BaseVector.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0EA;;;;;;;;;;;GAWG;AACH;IACE;;OAEG;IACH,iEA0DC;IA/CC;;;OAGG;IACH,mBAC6D;IAE7D;;;OAGG;IACH,sBACiE;IAEjE;;;;OAIG;IACH,eAAkB;IAElB;;;;OAIG;IACH,uBAA+B;IAI/B;;;OAGG;IACH,8BAGW;IAEX;;;OAGG;IACH,gCAGW;IAGb;;OAEG;IACH,gBAFY,OAAO,CAIlB;IAoBD;;OAEG;IACH,mBAFY,MAAM,GAAC,SAAS,CAI3B;IAED;;;OAGG;IACH,yBAHqB,OAAO,eAAe,EAAE,OAAO,QAAE,OAAO,eAAe,EAAE,OAAO,KAAG,MAAM,GAAC,IAAI,GAAC,SAAS,CAO5G;IAED;;;;;OAKG;IACH,YAHY,OAAO,mBAAmB,EAAE,SAAS,GAAC,IAAI,GAAC,SAAS,CAK/D;IAED;;;;OAIG;IACH,oBAHY,OAAO,mBAAmB,EAAE,aAAa,GAAC,SAAS,CAK9D;IAED;;;OAGG;IACH,2BAHY,OAAO,CAKlB;IAED;;;OAGG;IACH,6BAHY,OAAO,CAKlB;IAED;;;OAGG;IACH,4BAFW,OAAO,oBAAoB,EAAE,UAAU,QAOjD;IAED;;;OAGG;IACH,4BAHW,OAAO,cAAc,EAAE,aAAa,GAAC,IAAI,GAAC,SAAS,QAK7D;IAED;;;;;;;;;OASG;IACH,qFAKC;CACF"}

256
node_modules/ol/layer/BaseVector.js generated vendored Normal file
View File

@@ -0,0 +1,256 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/BaseVector
*/
import Layer from './Layer.js';
import RBush from 'rbush';
import { assign } from '../obj.js';
import { createDefaultStyle, toFunction as toStyleFunction, } from '../style/Style.js';
/**
* @template {import("../source/Vector.js").default|import("../source/VectorTile.js").default} VectorSourceType
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {import("../render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
* @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the
* 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
* 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()}.
* @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.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("../style/Style.js").StyleLike|null} [style] Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
* which will be used if this is not set.
* @property {import("./Base.js").BackgroundColor} [background] Background color for the layer. If not specified, no background
* will be rendered.
* @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 will be recreated when no animation is active.
* @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will
* be recreated during interactions. See also `updateWhileAnimating`.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @enum {string}
* @private
*/
var Property = {
RENDER_ORDER: 'renderOrder',
};
/**
* @classdesc
* Vector data that is rendered client-side.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Vector.js").default|import("../source/VectorTile.js").default} VectorSourceType
* @template {import("../renderer/canvas/VectorLayer.js").default|import("../renderer/canvas/VectorTileLayer.js").default|import("../renderer/canvas/VectorImageLayer.js").default|import("../renderer/webgl/PointsLayer.js").default} RendererType
* @extends {Layer<VectorSourceType, RendererType>}
* @api
*/
var BaseVectorLayer = /** @class */ (function (_super) {
__extends(BaseVectorLayer, _super);
/**
* @param {Options<VectorSourceType>} [opt_options] Options.
*/
function BaseVectorLayer(opt_options) {
var _this = this;
var options = opt_options ? opt_options : {};
var baseOptions = assign({}, options);
delete baseOptions.style;
delete baseOptions.renderBuffer;
delete baseOptions.updateWhileAnimating;
delete baseOptions.updateWhileInteracting;
_this = _super.call(this, baseOptions) || this;
/**
* @private
* @type {boolean}
*/
_this.declutter_ =
options.declutter !== undefined ? options.declutter : false;
/**
* @type {number}
* @private
*/
_this.renderBuffer_ =
options.renderBuffer !== undefined ? options.renderBuffer : 100;
/**
* User provided style.
* @type {import("../style/Style.js").StyleLike}
* @private
*/
_this.style_ = null;
/**
* Style function for use within the library.
* @type {import("../style/Style.js").StyleFunction|undefined}
* @private
*/
_this.styleFunction_ = undefined;
_this.setStyle(options.style);
/**
* @type {boolean}
* @private
*/
_this.updateWhileAnimating_ =
options.updateWhileAnimating !== undefined
? options.updateWhileAnimating
: false;
/**
* @type {boolean}
* @private
*/
_this.updateWhileInteracting_ =
options.updateWhileInteracting !== undefined
? options.updateWhileInteracting
: false;
return _this;
}
/**
* @return {boolean} Declutter.
*/
BaseVectorLayer.prototype.getDeclutter = function () {
return this.declutter_;
};
/**
* Get the topmost feature that intersects the given pixel on the viewport. Returns a promise
* that resolves with an array of features. The array will either contain the topmost feature
* 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
* image.
*
* @param {import("../pixel.js").Pixel} pixel Pixel.
* @return {Promise<Array<import("../Feature").default>>} Promise that resolves with an array of features.
* @api
*/
BaseVectorLayer.prototype.getFeatures = function (pixel) {
return _super.prototype.getFeatures.call(this, pixel);
};
/**
* @return {number|undefined} Render buffer.
*/
BaseVectorLayer.prototype.getRenderBuffer = function () {
return this.renderBuffer_;
};
/**
* @return {function(import("../Feature.js").default, import("../Feature.js").default): number|null|undefined} Render
* order.
*/
BaseVectorLayer.prototype.getRenderOrder = function () {
return /** @type {import("../render.js").OrderFunction|null|undefined} */ (this.get(Property.RENDER_ORDER));
};
/**
* Get the style for features. This returns whatever was passed to the `style`
* option at construction or to the `setStyle` method.
* @return {import("../style/Style.js").StyleLike|null|undefined} Layer style.
* @api
*/
BaseVectorLayer.prototype.getStyle = function () {
return this.style_;
};
/**
* Get the style function.
* @return {import("../style/Style.js").StyleFunction|undefined} Layer style function.
* @api
*/
BaseVectorLayer.prototype.getStyleFunction = function () {
return this.styleFunction_;
};
/**
* @return {boolean} Whether the rendered layer should be updated while
* animating.
*/
BaseVectorLayer.prototype.getUpdateWhileAnimating = function () {
return this.updateWhileAnimating_;
};
/**
* @return {boolean} Whether the rendered layer should be updated while
* interacting.
*/
BaseVectorLayer.prototype.getUpdateWhileInteracting = function () {
return this.updateWhileInteracting_;
};
/**
* Render declutter items for this layer
* @param {import("../PluggableMap.js").FrameState} frameState Frame state.
*/
BaseVectorLayer.prototype.renderDeclutter = function (frameState) {
if (!frameState.declutterTree) {
frameState.declutterTree = new RBush(9);
}
/** @type {*} */ (this.getRenderer()).renderDeclutter(frameState);
};
/**
* @param {import("../render.js").OrderFunction|null|undefined} renderOrder
* Render order.
*/
BaseVectorLayer.prototype.setRenderOrder = function (renderOrder) {
this.set(Property.RENDER_ORDER, renderOrder);
};
/**
* Set the style for features. This can be a single style object, an array
* of styles, or a function that takes a feature and resolution and returns
* an array of styles. If set to `null`, the layer has no style (a `null` style),
* so only features that have their own styles will be rendered in the layer. Call
* `setStyle()` without arguments to reset to the default style. See
* {@link module:ol/style/Style~Style} for information on the default style.
* @param {import("../style/Style.js").StyleLike|null} [opt_style] Layer style.
* @api
*/
BaseVectorLayer.prototype.setStyle = function (opt_style) {
this.style_ = opt_style !== undefined ? opt_style : createDefaultStyle;
this.styleFunction_ =
opt_style === null ? undefined : toStyleFunction(this.style_);
this.changed();
};
return BaseVectorLayer;
}(Layer));
export default BaseVectorLayer;
//# sourceMappingURL=BaseVector.js.map

1
node_modules/ol/layer/BaseVector.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"BaseVector.js","sourceRoot":"","sources":["../src/layer/BaseVector.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,UAAU,IAAI,eAAe,GAC9B,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH;;;GAGG;AACH,IAAM,QAAQ,GAAG;IACf,YAAY,EAAE,aAAa;CAC5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH;IAA8B,mCAAK;IACjC;;OAEG;IACH,yBAAY,WAAW;QAAvB,iBA0DC;QAzDC,IAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAA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AChE,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IACH,sBAAC;AAAD,CAAC,AAhLD,CAA8B,KAAK,GAgLlC;AAED,eAAe,eAAe,CAAC"}

592
node_modules/ol/layer/Graticule.d.ts generated vendored Normal file
View File

@@ -0,0 +1,592 @@
export default Graticule;
export type GraticuleLabelDataType = {
/**
* Geometry.
*/
geom: Point;
/**
* Text.
*/
text: string;
};
export type Options = {
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* The maximum number of meridians and
* parallels from the center of the map. The default value of 100 means that at
* most 200 meridians and 200 parallels will be displayed. The default value is
* appropriate for conformal projections like Spherical Mercator. If you
* increase the value, more lines will be drawn and the drawing performance will
* decrease.
*/
maxLines?: number | undefined;
/**
* The
* stroke style to use for drawing the graticule. If not provided, the following stroke will be used:
* ```js
* new Stroke({
* color: 'rgba(0, 0, 0, 0.2)' // a not fully opaque black
* });
* ```
*/
strokeStyle?: Stroke | undefined;
/**
* The target size of the graticule cells,
* in pixels.
*/
targetSize?: number | undefined;
/**
* Render a label with the respective
* latitude/longitude for each graticule line.
*/
showLabels?: boolean | undefined;
/**
* Label formatter for
* longitudes. This function is called with the longitude as argument, and
* should return a formatted string representing the longitude. By default,
* labels are formatted as degrees, minutes, seconds and hemisphere.
*/
lonLabelFormatter?: ((arg0: number) => string) | undefined;
/**
* Label formatter for
* latitudes. This function is called with the latitude as argument, and
* should return a formatted string representing the latitude. By default,
* labels are formatted as degrees, minutes, seconds and hemisphere.
*/
latLabelFormatter?: ((arg0: number) => string) | undefined;
/**
* Longitude label position in fractions
* (0..1) of view extent. 0 means at the bottom of the viewport, 1 means at the
* top.
*/
lonLabelPosition?: number | undefined;
/**
* Latitude label position in fractions
* (0..1) of view extent. 0 means at the left of the viewport, 1 means at the
* right.
*/
latLabelPosition?: number | undefined;
/**
* Longitude label text
* style. If not provided, the following style will be used:
* ```js
* new Text({
* font: '12px Calibri,sans-serif',
* textBaseline: 'bottom',
* fill: new Fill({
* color: 'rgba(0,0,0,1)'
* }),
* stroke: new Stroke({
* color: 'rgba(255,255,255,1)',
* width: 3
* })
* });
* ```
* Note that the default's `textBaseline` configuration will not work well for
* `lonLabelPosition` configurations that position labels close to the top of
* the viewport.
*/
lonLabelStyle?: Text | undefined;
/**
* Latitude label text style.
* If not provided, the following style will be used:
* ```js
* new Text({
* font: '12px Calibri,sans-serif',
* textAlign: 'end',
* fill: new Fill({
* color: 'rgba(0,0,0,1)'
* }),
* stroke: Stroke({
* color: 'rgba(255,255,255,1)',
* width: 3
* })
* });
* ```
* Note that the default's `textAlign` configuration will not work well for
* `latLabelPosition` configurations that position labels close to the left of
* the viewport.
*/
latLabelStyle?: Text | undefined;
/**
* Intervals (in degrees) for the graticule. Example to limit graticules to 30 and 10 degrees intervals:
* ```js
* [30, 10]
* ```
*/
intervals?: number[] | undefined;
/**
* Whether to repeat the graticule horizontally.
*/
wrapX?: boolean | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
/**
* @typedef {Object} GraticuleLabelDataType
* @property {Point} geom Geometry.
* @property {string} text Text.
*/
/**
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {number} [maxLines=100] The maximum number of meridians and
* parallels from the center of the map. The default value of 100 means that at
* most 200 meridians and 200 parallels will be displayed. The default value is
* appropriate for conformal projections like Spherical Mercator. If you
* increase the value, more lines will be drawn and the drawing performance will
* decrease.
* @property {Stroke} [strokeStyle] The
* stroke style to use for drawing the graticule. If not provided, the following stroke will be used:
* ```js
* new Stroke({
* color: 'rgba(0, 0, 0, 0.2)' // a not fully opaque black
* });
* ```
* @property {number} [targetSize=100] The target size of the graticule cells,
* in pixels.
* @property {boolean} [showLabels=false] Render a label with the respective
* latitude/longitude for each graticule line.
* @property {function(number):string} [lonLabelFormatter] Label formatter for
* longitudes. This function is called with the longitude as argument, and
* should return a formatted string representing the longitude. By default,
* labels are formatted as degrees, minutes, seconds and hemisphere.
* @property {function(number):string} [latLabelFormatter] Label formatter for
* latitudes. This function is called with the latitude as argument, and
* should return a formatted string representing the latitude. By default,
* labels are formatted as degrees, minutes, seconds and hemisphere.
* @property {number} [lonLabelPosition=0] Longitude label position in fractions
* (0..1) of view extent. 0 means at the bottom of the viewport, 1 means at the
* top.
* @property {number} [latLabelPosition=1] Latitude label position in fractions
* (0..1) of view extent. 0 means at the left of the viewport, 1 means at the
* right.
* @property {Text} [lonLabelStyle] Longitude label text
* style. If not provided, the following style will be used:
* ```js
* new Text({
* font: '12px Calibri,sans-serif',
* textBaseline: 'bottom',
* fill: new Fill({
* color: 'rgba(0,0,0,1)'
* }),
* stroke: new Stroke({
* color: 'rgba(255,255,255,1)',
* width: 3
* })
* });
* ```
* Note that the default's `textBaseline` configuration will not work well for
* `lonLabelPosition` configurations that position labels close to the top of
* the viewport.
* @property {Text} [latLabelStyle] Latitude label text style.
* If not provided, the following style will be used:
* ```js
* new Text({
* font: '12px Calibri,sans-serif',
* textAlign: 'end',
* fill: new Fill({
* color: 'rgba(0,0,0,1)'
* }),
* stroke: Stroke({
* color: 'rgba(255,255,255,1)',
* width: 3
* })
* });
* ```
* Note that the default's `textAlign` configuration will not work well for
* `latLabelPosition` configurations that position labels close to the left of
* the viewport.
* @property {Array<number>} [intervals=[90, 45, 30, 20, 10, 5, 2, 1, 0.5, 0.2, 0.1, 0.05, 0.01, 0.005, 0.002, 0.001]]
* Intervals (in degrees) for the graticule. Example to limit graticules to 30 and 10 degrees intervals:
* ```js
* [30, 10]
* ```
* @property {boolean} [wrapX=true] Whether to repeat the graticule horizontally.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Layer that renders a grid for a coordinate system (currently only EPSG:4326 is supported).
* Note that the view projection must define both extent and worldExtent.
*
* @fires import("../render/Event.js").RenderEvent
* @extends {VectorLayer<import("../source/Vector.js").default>}
* @api
*/
declare class Graticule extends VectorLayer<VectorSource<import("../geom/Geometry.js").default>> {
/**
* @param {Options} [opt_options] Options.
*/
constructor(opt_options?: Options | undefined);
/**
* @type {import("../proj/Projection.js").default}
*/
projection_: import("../proj/Projection.js").default;
/**
* @type {number}
* @private
*/
private maxLat_;
/**
* @type {number}
* @private
*/
private maxLon_;
/**
* @type {number}
* @private
*/
private minLat_;
/**
* @type {number}
* @private
*/
private minLon_;
/**
* @type {number}
* @private
*/
private maxX_;
/**
* @type {number}
* @private
*/
private maxY_;
/**
* @type {number}
* @private
*/
private minX_;
/**
* @type {number}
* @private
*/
private minY_;
/**
* @type {number}
* @private
*/
private targetSize_;
/**
* @type {number}
* @private
*/
private maxLines_;
/**
* @type {Array<LineString>}
* @private
*/
private meridians_;
/**
* @type {Array<LineString>}
* @private
*/
private parallels_;
/**
* @type {Stroke}
* @private
*/
private strokeStyle_;
/**
* @type {import("../proj.js").TransformFunction|undefined}
* @private
*/
private fromLonLatTransform_;
/**
* @type {import("../proj.js").TransformFunction|undefined}
* @private
*/
private toLonLatTransform_;
/**
* @type {import("../coordinate.js").Coordinate}
* @private
*/
private projectionCenterLonLat_;
/**
* @type {import("../coordinate.js").Coordinate}
* @private
*/
private bottomLeft_;
/**
* @type {import("../coordinate.js").Coordinate}
* @private
*/
private bottomRight_;
/**
* @type {import("../coordinate.js").Coordinate}
* @private
*/
private topLeft_;
/**
* @type {import("../coordinate.js").Coordinate}
* @private
*/
private topRight_;
/**
* @type {Array<GraticuleLabelDataType>}
* @private
*/
private meridiansLabels_;
/**
* @type {Array<GraticuleLabelDataType>}
* @private
*/
private parallelsLabels_;
/**
* @type {null|function(number):string}
* @private
*/
private lonLabelFormatter_;
/**
* @type {function(number):string}
* @private
*/
private latLabelFormatter_;
/**
* Longitude label position in fractions (0..1) of view extent. 0 means
* bottom, 1 means top.
* @type {number}
* @private
*/
private lonLabelPosition_;
/**
* Latitude Label position in fractions (0..1) of view extent. 0 means left, 1
* means right.
* @type {number}
* @private
*/
private latLabelPosition_;
/**
* @type {Style}
* @private
*/
private lonLabelStyleBase_;
/**
* @private
* @param {import("../Feature").default} feature Feature
* @return {Style} style
*/
private lonLabelStyle_;
/**
* @type {Style}
* @private
*/
private latLabelStyleBase_;
/**
* @private
* @param {import("../Feature").default} feature Feature
* @return {Style} style
*/
private latLabelStyle_;
/**
* @type {Array<number>}
* @private
*/
private intervals_;
/**
* feature pool to use when updating graticule
* @type {Array<Feature>}
* @private
*/
private featurePool_;
/**
* @type {Style}
* @private
*/
private lineStyle_;
/**
* @type {?import("../extent.js").Extent}
* @private
*/
private loadedExtent_;
/**
* @type {?import("../extent.js").Extent}
* @private
*/
private renderedExtent_;
/**
* @type {?number}
* @private
*/
private renderedResolution_;
/**
* Strategy function for loading features based on the view's extent and
* resolution.
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} resolution Resolution.
* @return {Array<import("../extent.js").Extent>} Extents.
*/
strategyFunction(extent: import("../extent.js").Extent, resolution: number): Array<import("../extent.js").Extent>;
/**
* Update geometries in the source based on current view
* @param {import("../extent").Extent} extent Extent
* @param {number} resolution Resolution
* @param {import("../proj/Projection.js").default} projection Projection
*/
loaderFunction(extent: import("../extent").Extent, resolution: number, projection: import("../proj/Projection.js").default): void;
/**
* @param {number} lon Longitude.
* @param {number} minLat Minimal latitude.
* @param {number} maxLat Maximal latitude.
* @param {number} squaredTolerance Squared tolerance.
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} index Index.
* @return {number} Index.
* @private
*/
private addMeridian_;
/**
* @param {number} lat Latitude.
* @param {number} minLon Minimal longitude.
* @param {number} maxLon Maximal longitude.
* @param {number} squaredTolerance Squared tolerance.
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} index Index.
* @return {number} Index.
* @private
*/
private addParallel_;
/**
* @param {import("../render/Event.js").default} event Render event.
* @private
*/
private drawLabels_;
/**
* @param {import("../extent.js").Extent} extent Extent.
* @param {import("../coordinate.js").Coordinate} center Center.
* @param {number} resolution Resolution.
* @param {number} squaredTolerance Squared tolerance.
* @private
*/
private createGraticule_;
/**
* @param {number} resolution Resolution.
* @return {number} The interval in degrees.
* @private
*/
private getInterval_;
/**
* @param {number} lon Longitude.
* @param {number} minLat Minimal latitude.
* @param {number} maxLat Maximal latitude.
* @param {number} squaredTolerance Squared tolerance.
* @return {LineString} The meridian line string.
* @param {number} index Index.
* @private
*/
private getMeridian_;
/**
* @param {LineString} lineString Meridian
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} index Index.
* @return {Point} Meridian point.
* @private
*/
private getMeridianPoint_;
/**
* Get the list of meridians. Meridians are lines of equal longitude.
* @return {Array<LineString>} The meridians.
* @api
*/
getMeridians(): Array<LineString>;
/**
* @param {number} lat Latitude.
* @param {number} minLon Minimal longitude.
* @param {number} maxLon Maximal longitude.
* @param {number} squaredTolerance Squared tolerance.
* @return {LineString} The parallel line string.
* @param {number} index Index.
* @private
*/
private getParallel_;
/**
* @param {LineString} lineString Parallels.
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} index Index.
* @return {Point} Parallel point.
* @private
*/
private getParallelPoint_;
/**
* Get the list of parallels. Parallels are lines of equal latitude.
* @return {Array<LineString>} The parallels.
* @api
*/
getParallels(): Array<LineString>;
/**
* @param {import("../proj/Projection.js").default} projection Projection.
* @private
*/
private updateProjectionInfo_;
}
import Point from "../geom/Point.js";
import Stroke from "../style/Stroke.js";
import Text from "../style/Text.js";
import VectorSource from "../source/Vector.js";
import VectorLayer from "./Vector.js";
import LineString from "../geom/LineString.js";
//# sourceMappingURL=Graticule.d.ts.map

1
node_modules/ol/layer/Graticule.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Graticule.d.ts","sourceRoot":"","sources":["../src/layer/Graticule.js"],"names":[],"mappings":";;;;;UA0Dc,KAAK;;;;UACL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAuCG,MAAM,KAAE,MAAM;;;;;;;gCAId,MAAM,KAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA9CrC;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AAEH;;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AoB/C;IAED;;;;;OAKG;IACH,uBAJW,OAAO,WAAW,EAAE,MAAM,cAC1B,MAAM,cACN,OAAO,uBAAuB,EAAE,OAAO,QA4EjD;IAED;;;;;;;;;OASG;IACH,qBAuBC;IAED;;;;;;;;;OASG;IACH,qBAuBC;IAED;;;OAGG;IACH,oBAiFC;IAED;;;;;;OAMG;IACH,yBAsNC;IAED;;;;OAIG;IACH,qBA0BC;IAED;;;;;;;;OAQG;IACH,qBAiBC;IAED;;;;;;OAMG;IACH,0BAwBC;IAED;;;;OAIG;IACH,gBAHY,MAAM,UAAU,CAAC,CAK5B;IAED;;;;;;;;OAQG;IACH,qBAgBC;IAED;;;;;;OAMG;IACH,0BAwBC;IAED;;;;OAIG;IACH,gBAHY,MAAM,UAAU,CAAC,CAK5B;IAED;;;OAGG;IACH,8BA8EC;CACF"}

1029
node_modules/ol/layer/Graticule.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

1
node_modules/ol/layer/Graticule.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

169
node_modules/ol/layer/Group.d.ts generated vendored Normal file
View File

@@ -0,0 +1,169 @@
/**
* @typedef {'addlayer'|'removelayer'} EventType
*/
/**
* @classdesc
* A layer group triggers 'addlayer' and 'removelayer' events when layers are added to or removed from
* the group or one of its child groups. When a layer group is added to or removed from another layer group,
* a single event will be triggered (instead of one per layer in the group added or removed).
*/
export class GroupEvent extends Event {
/**
* @param {EventType} type The event type.
* @param {BaseLayer} layer The layer.
*/
constructor(type: EventType, layer: BaseLayer);
/**
* The added or removed layer.
* @type {BaseLayer}
* @api
*/
layer: BaseLayer;
}
export default LayerGroup;
export type EventType = 'addlayer' | 'removelayer';
/**
* *
*/
export type GroupOnSignature<Return> = import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> & import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes | 'change:layers', import("../Object").ObjectEvent, Return> & import("../Observable").CombinedOnSignature<import("../Observable").EventTypes | import("./Base").BaseLayerObjectEventTypes | 'change:layers', Return>;
export type Options = {
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* Child layers.
*/
layers?: BaseLayer[] | Collection<BaseLayer> | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
import Event from "../events/Event.js";
import BaseLayer from "./Base.js";
import EventType from "../events/EventType.js";
/**
* @classdesc
* A {@link module:ol/Collection~Collection} of layers that are handled together.
*
* A generic `change` event is triggered when the group/Collection changes.
*
* @api
*/
declare class LayerGroup extends BaseLayer {
/**
* @param {Options} [opt_options] Layer options.
*/
constructor(opt_options?: Options | undefined);
/***
* @type {GroupOnSignature<import("../events").EventsKey>}
*/
on: GroupOnSignature<import("../events").EventsKey>;
/***
* @type {GroupOnSignature<import("../events").EventsKey>}
*/
once: GroupOnSignature<import("../events").EventsKey>;
/***
* @type {GroupOnSignature<void>}
*/
un: GroupOnSignature<void>;
/**
* @private
* @type {Array<import("../events.js").EventsKey>}
*/
private layersListenerKeys_;
/**
* @private
* @type {Object<string, Array<import("../events.js").EventsKey>>}
*/
private listenerKeys_;
/**
* @private
*/
private handleLayerChange_;
/**
* @private
*/
private handleLayersChanged_;
/**
* @param {BaseLayer} layer The layer.
*/
registerLayerListeners_(layer: BaseLayer): void;
/**
* @param {GroupEvent} event The layer group event.
*/
handleLayerGroupAdd_(event: GroupEvent): void;
/**
* @param {GroupEvent} event The layer group event.
*/
handleLayerGroupRemove_(event: GroupEvent): void;
/**
* @param {import("../Collection.js").CollectionEvent} collectionEvent CollectionEvent.
* @private
*/
private handleLayersAdd_;
/**
* @param {import("../Collection.js").CollectionEvent} collectionEvent CollectionEvent.
* @private
*/
private handleLayersRemove_;
/**
* Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group.
* @return {!import("../Collection.js").default<import("./Base.js").default>} Collection of
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
* @observable
* @api
*/
getLayers(): import("../Collection.js").default<import("./Base.js").default>;
/**
* Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group.
* @param {!import("../Collection.js").default<import("./Base.js").default>} layers Collection of
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
* @observable
* @api
*/
setLayers(layers: import("../Collection.js").default<import("./Base.js").default>): void;
}
import Collection from "../Collection.js";
//# sourceMappingURL=Group.d.ts.map

1
node_modules/ol/layer/Group.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Group.d.ts","sourceRoot":"","sources":["../src/layer/Group.js"],"names":[],"mappings":"AAeA;;GAEG;AAEH;;;;;GAKG;AACH;IACE;;;OAGG;IACH,kBAHW,SAAS,SACT,SAAS,EAWnB;IANC;;;;OAIG;IACH,OAHU,SAAS,CAGD;CAErB;;wBAxBY,UAAU,GAAC,aAAa;;;;uCA4BxB,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,QAAQ,EAAE,yBAAyB,GAClF,eAAqB,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GAC/D,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,GAAC,OAAO,QAAQ,EAAE,yBAAyB,GAAC,eAAe,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCvJ;;;;;;;GAOG;AACH;IACE;;OAEG;IACH,+CAiDC;IAxCC;;OAEG;IACH,IAFU,iBAAiB,OAAO,WAAW,EAAE,SAAS,CAAC,CAElD;IAEP;;OAEG;IACH,MAFU,iBAAiB,OAAO,WAAW,EAAE,SAAS,CAAC,CAEhD;IAET;;OAEG;IACH,IAFU,iBAAiB,IAAI,CAAC,CAEzB;IAEP;;;OAGG;IACH,4BAA6B;IAE7B;;;OAGG;IACH,sBAAuB;IAiBzB;;OAEG;IACH,2BAEC;IAED;;OAEG;IACH,6BAsBC;IAED;;OAEG;IACH,+BAFW,SAAS,QAqBnB;IAED;;OAEG;IACH,4BAFW,UAAU,QAIpB;IAED;;OAEG;IACH,+BAFW,UAAU,QAIpB;IAED;;;OAGG;IACH,yBAOC;IAED;;;OAGG;IACH,4BASC;IAED;;;;;;;OAOG;IACH,aALa,OAAO,kBAAkB,EAAE,OAAO,CAAC,OAAO,WAAW,EAAE,OAAO,CAAC,CAS3E;IAED;;;;;;;OAOG;IACH,kBALY,OAAO,kBAAkB,EAAE,OAAO,CAAC,OAAO,WAAW,EAAE,OAAO,CAAC,QAe1E;CA0EF"}

314
node_modules/ol/layer/Group.js generated vendored Normal file
View File

@@ -0,0 +1,314 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/Group
*/
import BaseLayer from './Base.js';
import Collection from '../Collection.js';
import CollectionEventType from '../CollectionEventType.js';
import Event from '../events/Event.js';
import EventType from '../events/EventType.js';
import ObjectEventType from '../ObjectEventType.js';
import { assert } from '../asserts.js';
import { assign, clear } from '../obj.js';
import { getIntersection } from '../extent.js';
import { getUid } from '../util.js';
import { listen, unlistenByKey } from '../events.js';
/**
* @typedef {'addlayer'|'removelayer'} EventType
*/
/**
* @classdesc
* A layer group triggers 'addlayer' and 'removelayer' events when layers are added to or removed from
* the group or one of its child groups. When a layer group is added to or removed from another layer group,
* a single event will be triggered (instead of one per layer in the group added or removed).
*/
var GroupEvent = /** @class */ (function (_super) {
__extends(GroupEvent, _super);
/**
* @param {EventType} type The event type.
* @param {BaseLayer} layer The layer.
*/
function GroupEvent(type, layer) {
var _this = _super.call(this, type) || this;
/**
* The added or removed layer.
* @type {BaseLayer}
* @api
*/
_this.layer = layer;
return _this;
}
return GroupEvent;
}(Event));
export { GroupEvent };
/***
* @template Return
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
* import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes|
* 'change:layers', import("../Object").ObjectEvent, Return> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("./Base").BaseLayerObjectEventTypes|'change:layers', Return>} GroupOnSignature
*/
/**
* @typedef {Object} Options
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {Array<import("./Base.js").default>|import("../Collection.js").default<import("./Base.js").default>} [layers] Child layers.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @enum {string}
* @private
*/
var Property = {
LAYERS: 'layers',
};
/**
* @classdesc
* A {@link module:ol/Collection~Collection} of layers that are handled together.
*
* A generic `change` event is triggered when the group/Collection changes.
*
* @api
*/
var LayerGroup = /** @class */ (function (_super) {
__extends(LayerGroup, _super);
/**
* @param {Options} [opt_options] Layer options.
*/
function LayerGroup(opt_options) {
var _this = this;
var options = opt_options || {};
var baseOptions = /** @type {Options} */ (assign({}, options));
delete baseOptions.layers;
var layers = options.layers;
_this = _super.call(this, baseOptions) || this;
/***
* @type {GroupOnSignature<import("../events").EventsKey>}
*/
_this.on;
/***
* @type {GroupOnSignature<import("../events").EventsKey>}
*/
_this.once;
/***
* @type {GroupOnSignature<void>}
*/
_this.un;
/**
* @private
* @type {Array<import("../events.js").EventsKey>}
*/
_this.layersListenerKeys_ = [];
/**
* @private
* @type {Object<string, Array<import("../events.js").EventsKey>>}
*/
_this.listenerKeys_ = {};
_this.addChangeListener(Property.LAYERS, _this.handleLayersChanged_);
if (layers) {
if (Array.isArray(layers)) {
layers = new Collection(layers.slice(), { unique: true });
}
else {
assert(typeof ( /** @type {?} */(layers).getArray) === 'function', 43); // Expected `layers` to be an array or a `Collection`
}
}
else {
layers = new Collection(undefined, { unique: true });
}
_this.setLayers(layers);
return _this;
}
/**
* @private
*/
LayerGroup.prototype.handleLayerChange_ = function () {
this.changed();
};
/**
* @private
*/
LayerGroup.prototype.handleLayersChanged_ = function () {
this.layersListenerKeys_.forEach(unlistenByKey);
this.layersListenerKeys_.length = 0;
var layers = this.getLayers();
this.layersListenerKeys_.push(listen(layers, CollectionEventType.ADD, this.handleLayersAdd_, this), listen(layers, CollectionEventType.REMOVE, this.handleLayersRemove_, this));
for (var id in this.listenerKeys_) {
this.listenerKeys_[id].forEach(unlistenByKey);
}
clear(this.listenerKeys_);
var layersArray = layers.getArray();
for (var i = 0, ii = layersArray.length; i < ii; i++) {
var layer = layersArray[i];
this.registerLayerListeners_(layer);
this.dispatchEvent(new GroupEvent('addlayer', layer));
}
this.changed();
};
/**
* @param {BaseLayer} layer The layer.
*/
LayerGroup.prototype.registerLayerListeners_ = function (layer) {
var listenerKeys = [
listen(layer, ObjectEventType.PROPERTYCHANGE, this.handleLayerChange_, this),
listen(layer, EventType.CHANGE, this.handleLayerChange_, this),
];
if (layer instanceof LayerGroup) {
listenerKeys.push(listen(layer, 'addlayer', this.handleLayerGroupAdd_, this), listen(layer, 'removelayer', this.handleLayerGroupRemove_, this));
}
this.listenerKeys_[getUid(layer)] = listenerKeys;
};
/**
* @param {GroupEvent} event The layer group event.
*/
LayerGroup.prototype.handleLayerGroupAdd_ = function (event) {
this.dispatchEvent(new GroupEvent('addlayer', event.layer));
};
/**
* @param {GroupEvent} event The layer group event.
*/
LayerGroup.prototype.handleLayerGroupRemove_ = function (event) {
this.dispatchEvent(new GroupEvent('removelayer', event.layer));
};
/**
* @param {import("../Collection.js").CollectionEvent} collectionEvent CollectionEvent.
* @private
*/
LayerGroup.prototype.handleLayersAdd_ = function (collectionEvent) {
var layer = /** @type {import("./Base.js").default} */ (collectionEvent.element);
this.registerLayerListeners_(layer);
this.dispatchEvent(new GroupEvent('addlayer', layer));
this.changed();
};
/**
* @param {import("../Collection.js").CollectionEvent} collectionEvent CollectionEvent.
* @private
*/
LayerGroup.prototype.handleLayersRemove_ = function (collectionEvent) {
var layer = /** @type {import("./Base.js").default} */ (collectionEvent.element);
var key = getUid(layer);
this.listenerKeys_[key].forEach(unlistenByKey);
delete this.listenerKeys_[key];
this.dispatchEvent(new GroupEvent('removelayer', layer));
this.changed();
};
/**
* Returns the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group.
* @return {!import("../Collection.js").default<import("./Base.js").default>} Collection of
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
* @observable
* @api
*/
LayerGroup.prototype.getLayers = function () {
return /** @type {!import("../Collection.js").default<import("./Base.js").default>} */ (this.get(Property.LAYERS));
};
/**
* Set the {@link module:ol/Collection~Collection collection} of {@link module:ol/layer/Layer~Layer layers}
* in this group.
* @param {!import("../Collection.js").default<import("./Base.js").default>} layers Collection of
* {@link module:ol/layer/Base~BaseLayer layers} that are part of this group.
* @observable
* @api
*/
LayerGroup.prototype.setLayers = function (layers) {
var collection = this.getLayers();
if (collection) {
var currentLayers = collection.getArray();
for (var i = 0, ii = currentLayers.length; i < ii; ++i) {
this.dispatchEvent(new GroupEvent('removelayer', currentLayers[i]));
}
}
this.set(Property.LAYERS, layers);
};
/**
* @param {Array<import("./Layer.js").default>} [opt_array] Array of layers (to be modified in place).
* @return {Array<import("./Layer.js").default>} Array of layers.
*/
LayerGroup.prototype.getLayersArray = function (opt_array) {
var array = opt_array !== undefined ? opt_array : [];
this.getLayers().forEach(function (layer) {
layer.getLayersArray(array);
});
return array;
};
/**
* Get the layer states list and use this groups z-index as the default
* for all layers in this and nested groups, if it is unset at this point.
* If opt_states is not provided and this group's z-index is undefined
* 0 is used a the default z-index.
* @param {Array<import("./Layer.js").State>} [opt_states] Optional list
* of layer states (to be modified in place).
* @return {Array<import("./Layer.js").State>} List of layer states.
*/
LayerGroup.prototype.getLayerStatesArray = function (opt_states) {
var states = opt_states !== undefined ? opt_states : [];
var pos = states.length;
this.getLayers().forEach(function (layer) {
layer.getLayerStatesArray(states);
});
var ownLayerState = this.getLayerState();
var defaultZIndex = ownLayerState.zIndex;
if (!opt_states && ownLayerState.zIndex === undefined) {
defaultZIndex = 0;
}
for (var i = pos, ii = states.length; i < ii; i++) {
var layerState = states[i];
layerState.opacity *= ownLayerState.opacity;
layerState.visible = layerState.visible && ownLayerState.visible;
layerState.maxResolution = Math.min(layerState.maxResolution, ownLayerState.maxResolution);
layerState.minResolution = Math.max(layerState.minResolution, ownLayerState.minResolution);
layerState.minZoom = Math.max(layerState.minZoom, ownLayerState.minZoom);
layerState.maxZoom = Math.min(layerState.maxZoom, ownLayerState.maxZoom);
if (ownLayerState.extent !== undefined) {
if (layerState.extent !== undefined) {
layerState.extent = getIntersection(layerState.extent, ownLayerState.extent);
}
else {
layerState.extent = ownLayerState.extent;
}
}
if (layerState.zIndex === undefined) {
layerState.zIndex = defaultZIndex;
}
}
return states;
};
/**
* @return {import("../source/Source.js").State} Source state.
*/
LayerGroup.prototype.getSourceState = function () {
return 'ready';
};
return LayerGroup;
}(BaseLayer));
export default LayerGroup;
//# sourceMappingURL=Group.js.map

1
node_modules/ol/layer/Group.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

150
node_modules/ol/layer/Heatmap.d.ts generated vendored Normal file
View File

@@ -0,0 +1,150 @@
export default Heatmap;
export type Options = {
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* The color gradient
* of the heatmap, specified as an array of CSS color strings.
*/
gradient?: string[] | undefined;
/**
* Radius size in pixels.
*/
radius?: number | undefined;
/**
* Blur size in pixels.
*/
blur?: number | undefined;
/**
* The feature
* attribute to use for the weight or a function that returns a weight from a feature. Weight values
* should range from 0 to 1 (and values outside will be clamped to that range).
*/
weight?: string | ((arg0: import("../Feature.js").default) => number) | undefined;
/**
* Point source.
*/
source?: import("../source/Vector.js").default<import("../geom/Point.js").default> | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
/**
* @classdesc
* Layer for rendering vector data as a heatmap.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @fires import("../render/Event.js").RenderEvent
* @extends {BaseVector<import("../source/Vector.js").default, WebGLPointsLayerRenderer>}
* @api
*/
declare class Heatmap extends BaseVector<import("../source/Vector.js").default<import("../geom/Geometry.js").default>, WebGLPointsLayerRenderer> {
/**
* @param {Options} [opt_options] Options.
*/
constructor(opt_options?: Options | undefined);
/**
* @private
* @type {HTMLCanvasElement}
*/
private gradient_;
weightFunction_: (feature: any) => any;
/**
* Return the blur size in pixels.
* @return {number} Blur size in pixels.
* @api
* @observable
*/
getBlur(): number;
/**
* Return the gradient colors as array of strings.
* @return {Array<string>} Colors.
* @api
* @observable
*/
getGradient(): Array<string>;
/**
* Return the size of the radius in pixels.
* @return {number} Radius size in pixel.
* @api
* @observable
*/
getRadius(): number;
/**
* @private
*/
private handleGradientChanged_;
/**
* Set the blur size in pixels.
* @param {number} blur Blur size in pixels.
* @api
* @observable
*/
setBlur(blur: number): void;
/**
* Set the gradient colors as array of strings.
* @param {Array<string>} colors Gradient.
* @api
* @observable
*/
setGradient(colors: Array<string>): void;
/**
* Set the size of the radius in pixels.
* @param {number} radius Radius size in pixel.
* @api
* @observable
*/
setRadius(radius: number): void;
createRenderer(): any;
renderDeclutter(): void;
}
import WebGLPointsLayerRenderer from "../renderer/webgl/PointsLayer.js";
import BaseVector from "./BaseVector.js";
//# sourceMappingURL=Heatmap.d.ts.map

1
node_modules/ol/layer/Heatmap.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Heatmap.d.ts","sourceRoot":"","sources":["../src/layer/Heatmap.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAgC8B,OAAO,eAAe,EAAE,OAAO,KAAE,MAAM;;;;;;;;;;;;AAuBrE;;;;;;;;;;GAUG;AACH;IACE;;OAEG;IACH,+CAqCC;IA1BC;;;OAGG;IACH,kBAAqB;IAYnB,uCAEC;IAUL;;;;;OAKG;IACH,WAJY,MAAM,CAMjB;IAED;;;;;OAKG;IACH,eAJY,MAAM,MAAM,CAAC,CAMxB;IAED;;;;;OAKG;IACH,aAJY,MAAM,CAMjB;IAED;;OAEG;IACH,+BAEC;IAED;;;;;OAKG;IACH,cAJW,MAAM,QAMhB;IAED;;;;;OAKG;IACH,oBAJW,MAAM,MAAM,CAAC,QAMvB;IAED;;;;;OAKG;IACH,kBAJW,MAAM,QAMhB;IAED,sBAoIC;IAED,wBAAoB;CACrB"}

235
node_modules/ol/layer/Heatmap.js generated vendored Normal file
View File

@@ -0,0 +1,235 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/Heatmap
*/
import BaseVector from './BaseVector.js';
import WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';
import { assign } from '../obj.js';
import { clamp } from '../math.js';
import { createCanvasContext2D } from '../dom.js';
/**
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {Array<string>} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient
* of the heatmap, specified as an array of CSS color strings.
* @property {number} [radius=8] Radius size in pixels.
* @property {number} [blur=15] Blur size in pixels.
* @property {string|function(import("../Feature.js").default):number} [weight='weight'] The feature
* attribute to use for the weight or a function that returns a weight from a feature. Weight values
* should range from 0 to 1 (and values outside will be clamped to that range).
* @property {import("../source/Vector.js").default<import("../geom/Point.js").default>} [source] Point source.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @enum {string}
* @private
*/
var Property = {
BLUR: 'blur',
GRADIENT: 'gradient',
RADIUS: 'radius',
};
/**
* @const
* @type {Array<string>}
*/
var DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
/**
* @classdesc
* Layer for rendering vector data as a heatmap.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @fires import("../render/Event.js").RenderEvent
* @extends {BaseVector<import("../source/Vector.js").default, WebGLPointsLayerRenderer>}
* @api
*/
var Heatmap = /** @class */ (function (_super) {
__extends(Heatmap, _super);
/**
* @param {Options} [opt_options] Options.
*/
function Heatmap(opt_options) {
var _this = this;
var options = opt_options ? opt_options : {};
var baseOptions = assign({}, options);
delete baseOptions.gradient;
delete baseOptions.radius;
delete baseOptions.blur;
delete baseOptions.weight;
_this = _super.call(this, baseOptions) || this;
/**
* @private
* @type {HTMLCanvasElement}
*/
_this.gradient_ = null;
_this.addChangeListener(Property.GRADIENT, _this.handleGradientChanged_);
_this.setGradient(options.gradient ? options.gradient : DEFAULT_GRADIENT);
_this.setBlur(options.blur !== undefined ? options.blur : 15);
_this.setRadius(options.radius !== undefined ? options.radius : 8);
var weight = options.weight ? options.weight : 'weight';
if (typeof weight === 'string') {
_this.weightFunction_ = function (feature) {
return feature.get(weight);
};
}
else {
_this.weightFunction_ = weight;
}
// For performance reasons, don't sort the features before rendering.
// The render order is not relevant for a heatmap representation.
_this.setRenderOrder(null);
return _this;
}
/**
* Return the blur size in pixels.
* @return {number} Blur size in pixels.
* @api
* @observable
*/
Heatmap.prototype.getBlur = function () {
return /** @type {number} */ (this.get(Property.BLUR));
};
/**
* Return the gradient colors as array of strings.
* @return {Array<string>} Colors.
* @api
* @observable
*/
Heatmap.prototype.getGradient = function () {
return /** @type {Array<string>} */ (this.get(Property.GRADIENT));
};
/**
* Return the size of the radius in pixels.
* @return {number} Radius size in pixel.
* @api
* @observable
*/
Heatmap.prototype.getRadius = function () {
return /** @type {number} */ (this.get(Property.RADIUS));
};
/**
* @private
*/
Heatmap.prototype.handleGradientChanged_ = function () {
this.gradient_ = createGradient(this.getGradient());
};
/**
* Set the blur size in pixels.
* @param {number} blur Blur size in pixels.
* @api
* @observable
*/
Heatmap.prototype.setBlur = function (blur) {
this.set(Property.BLUR, blur);
};
/**
* Set the gradient colors as array of strings.
* @param {Array<string>} colors Gradient.
* @api
* @observable
*/
Heatmap.prototype.setGradient = function (colors) {
this.set(Property.GRADIENT, colors);
};
/**
* Set the size of the radius in pixels.
* @param {number} radius Radius size in pixel.
* @api
* @observable
*/
Heatmap.prototype.setRadius = function (radius) {
this.set(Property.RADIUS, radius);
};
Heatmap.prototype.createRenderer = function () {
return new WebGLPointsLayerRenderer(this, {
className: this.getClassName(),
attributes: [
{
name: 'weight',
callback: function (feature) {
var weight = this.weightFunction_(feature);
return weight !== undefined ? clamp(weight, 0, 1) : 1;
}.bind(this),
},
],
vertexShader: "\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_weight = a_weight;\n }",
fragmentShader: "\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n gl_FragColor = vec4(alpha, alpha, alpha, alpha);\n }",
hitVertexShader: "\n precision mediump float;\n uniform mat4 u_projectionMatrix;\n uniform mat4 u_offsetScaleMatrix;\n uniform float u_size;\n attribute vec2 a_position;\n attribute float a_index;\n attribute float a_weight;\n attribute vec4 a_hitColor;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n mat4 offsetMatrix = u_offsetScaleMatrix;\n float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;\n float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;\n vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);\n gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;\n float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;\n float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;\n v_texCoord = vec2(u, v);\n v_hitColor = a_hitColor;\n v_weight = a_weight;\n }",
hitFragmentShader: "\n precision mediump float;\n uniform float u_blurSlope;\n\n varying vec2 v_texCoord;\n varying float v_weight;\n varying vec4 v_hitColor;\n\n void main(void) {\n vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);\n float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;\n float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;\n float alpha = smoothstep(0.0, 1.0, value) * v_weight;\n if (alpha < 0.05) {\n discard;\n }\n\n gl_FragColor = v_hitColor;\n }",
uniforms: {
u_size: function () {
return (this.get(Property.RADIUS) + this.get(Property.BLUR)) * 2;
}.bind(this),
u_blurSlope: function () {
return (this.get(Property.RADIUS) / Math.max(1, this.get(Property.BLUR)));
}.bind(this),
},
postProcesses: [
{
fragmentShader: "\n precision mediump float;\n\n uniform sampler2D u_image;\n uniform sampler2D u_gradientTexture;\n uniform float u_opacity;\n\n varying vec2 v_texCoord;\n\n void main() {\n vec4 color = texture2D(u_image, v_texCoord);\n gl_FragColor.a = color.a * u_opacity;\n gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;\n gl_FragColor.rgb *= gl_FragColor.a;\n }",
uniforms: {
u_gradientTexture: function () {
return this.gradient_;
}.bind(this),
u_opacity: function () {
return this.getOpacity();
}.bind(this),
},
},
],
});
};
Heatmap.prototype.renderDeclutter = function () { };
return Heatmap;
}(BaseVector));
/**
* @param {Array<string>} colors A list of colored.
* @return {HTMLCanvasElement} canvas with gradient texture.
*/
function createGradient(colors) {
var width = 1;
var height = 256;
var context = createCanvasContext2D(width, height);
var gradient = context.createLinearGradient(0, 0, width, height);
var step = 1 / (colors.length - 1);
for (var i = 0, ii = colors.length; i < ii; ++i) {
gradient.addColorStop(i * step, colors[i]);
}
context.fillStyle = gradient;
context.fillRect(0, 0, width, height);
return context.canvas;
}
export default Heatmap;
//# sourceMappingURL=Heatmap.js.map

1
node_modules/ol/layer/Heatmap.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Heatmap.js","sourceRoot":"","sources":["../src/layer/Heatmap.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,wBAAwB,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AACjC,OAAO,EAAC,KAAK,EAAC,MAAM,YAAY,CAAC;AACjC,OAAO,EAAC,qBAAqB,EAAC,MAAM,WAAW,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH;;;GAGG;AACH,IAAM,QAAQ,GAAG;IACf,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF;;;GAGG;AACH,IAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAElE;;;;;;;;;;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AAsB,UAAU,GAqP/B;AAED;;;GAGG;AACH,SAAS,cAAc,CAAC,MAAM;IAC5B,IAAM,KAAK,GAAG,CAAC,CAAC;IAChB,IAAM,MAAM,GAAG,GAAG,CAAC;IACnB,IAAM,OAAO,GAAG,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAErD,IAAM,QAAQ,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACnE,IAAM,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;QAC/C,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;KAC5C;IAED,OAAO,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC7B,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IAEtC,OAAO,OAAO,CAAC,MAAM,CAAC;AACxB,CAAC;AAED,eAAe,OAAO,CAAC"}

23
node_modules/ol/layer/Image.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
export default ImageLayer;
/**
* @classdesc
* Server-rendered images that are available for arbitrary extents and
* resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Image.js").default} ImageSourceType
* @extends {BaseImageLayer<ImageSourceType, CanvasImageLayerRenderer>}
* @api
*/
declare class ImageLayer<ImageSourceType extends import("../source/Image.js").default> extends BaseImageLayer<ImageSourceType, CanvasImageLayerRenderer> {
/**
* @param {import("./BaseImage.js").Options<ImageSourceType>} [opt_options] Layer options.
*/
constructor(opt_options?: import("./BaseImage.js").Options<ImageSourceType> | undefined);
createRenderer(): any;
}
import CanvasImageLayerRenderer from "../renderer/canvas/ImageLayer.js";
import BaseImageLayer from "./BaseImage.js";
//# sourceMappingURL=Image.d.ts.map

1
node_modules/ol/layer/Image.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../src/layer/Image.js"],"names":[],"mappings":";AAMA;;;;;;;;;;;GAWG;AACH;IACE;;OAEG;IACH,yFAEC;IAED,sBAEC;CAoBF"}

65
node_modules/ol/layer/Image.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/Image
*/
import BaseImageLayer from './BaseImage.js';
import CanvasImageLayerRenderer from '../renderer/canvas/ImageLayer.js';
/**
* @classdesc
* Server-rendered images that are available for arbitrary extents and
* resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Image.js").default} ImageSourceType
* @extends {BaseImageLayer<ImageSourceType, CanvasImageLayerRenderer>}
* @api
*/
var ImageLayer = /** @class */ (function (_super) {
__extends(ImageLayer, _super);
/**
* @param {import("./BaseImage.js").Options<ImageSourceType>} [opt_options] Layer options.
*/
function ImageLayer(opt_options) {
return _super.call(this, opt_options) || this;
}
ImageLayer.prototype.createRenderer = function () {
return new CanvasImageLayerRenderer(this);
};
/**
* Get data for a pixel location. A four element RGBA array will be returned. For requests outside the
* layer extent, `null` will be returned. Data for an image can only be retrieved if the
* source's `crossOrigin` property is set.
*
* ```js
* // display layer data on every pointer move
* map.on('pointermove', (event) => {
* console.log(layer.getData(event.pixel));
* });
* ```
* @param {import("../pixel").Pixel} pixel Pixel.
* @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
* @api
*/
ImageLayer.prototype.getData = function (pixel) {
return _super.prototype.getData.call(this, pixel);
};
return ImageLayer;
}(BaseImageLayer));
export default ImageLayer;
//# sourceMappingURL=Image.js.map

1
node_modules/ol/layer/Image.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Image.js","sourceRoot":"","sources":["../src/layer/Image.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,cAAc,MAAM,gBAAgB,CAAC;AAC5C,OAAO,wBAAwB,MAAM,kCAAkC,CAAC;AAExE;;;;;;;;;;;GAWG;AACH;IAAyB,8BAAc;IACrC;;OAEG;IACH,oBAAY,WAAW;eACrB,kBAAM,WAAW,CAAC;IACpB,CAAC;IAED,mCAAc,GAAd;QACE,OAAO,IAAI,wBAAwB,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,4BAAO,GAAP,UAAQ,KAAK;QACX,OAAO,iBAAM,OAAO,YAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IACH,iBAAC;AAAD,CAAC,AA9BD,CAAyB,cAAc,GA8BtC;AAED,eAAe,UAAU,CAAC"}

338
node_modules/ol/layer/Layer.d.ts generated vendored Normal file
View File

@@ -0,0 +1,338 @@
/**
* Return `true` if the layer is visible and if the provided view state
* has resolution and zoom levels that are in range of the layer's min/max.
* @param {State} layerState Layer state.
* @param {import("../View.js").State} viewState View state.
* @return {boolean} The layer is visible at the given view state.
*/
export function inView(layerState: State, viewState: import("../View.js").State): boolean;
export default Layer;
export type RenderFunction = (arg0: import("../PluggableMap.js").FrameState) => HTMLElement;
/**
* *
*/
export type LayerOnSignature<Return> = import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> & import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes | 'change:source', import("../Object").ObjectEvent, Return> & import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> & import("../Observable").CombinedOnSignature<import("../Observable").EventTypes | import("./Base").BaseLayerObjectEventTypes | 'change:source' | import("../render/EventType").LayerRenderEventTypes, Return>;
export type Options<SourceType extends import("../source/Source.js").default = import("../source/Source.js").default> = {
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* 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.
*/
source?: SourceType | undefined;
/**
* Map.
*/
map?: import("../PluggableMap.js").default | null | undefined;
/**
* Render function. Takes the frame state as input and is expected to return an
* HTML element. Will overwrite the default rendering for the layer.
*/
render?: RenderFunction | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
export type State = {
/**
* Layer.
*/
layer: import("./Layer.js").default;
/**
* Opacity, the value is rounded to two digits to appear after the decimal point.
*/
opacity: number;
/**
* Visible.
*/
visible: boolean;
/**
* Managed.
*/
managed: boolean;
/**
* Extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* ZIndex.
*/
zIndex: number;
/**
* Maximum resolution.
*/
maxResolution: number;
/**
* Minimum resolution.
*/
minResolution: number;
/**
* Minimum zoom.
*/
minZoom: number;
/**
* Maximum zoom.
*/
maxZoom: number;
};
/**
* @typedef {function(import("../PluggableMap.js").FrameState):HTMLElement} RenderFunction
*/
/***
* @template Return
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
* import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes|
* 'change:source', import("../Object").ObjectEvent, Return> &
* import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("./Base").BaseLayerObjectEventTypes|'change:source'|
* import("../render/EventType").LayerRenderEventTypes, Return>} LayerOnSignature
*/
/**
* @template {import("../source/Source.js").default} [SourceType=import("../source/Source.js").default]
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @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 {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()`.
*/
/**
* @typedef {Object} State
* @property {import("./Layer.js").default} layer Layer.
* @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.
* @property {boolean} visible Visible.
* @property {boolean} managed Managed.
* @property {import("../extent.js").Extent} [extent] Extent.
* @property {number} zIndex ZIndex.
* @property {number} maxResolution Maximum resolution.
* @property {number} minResolution Minimum resolution.
* @property {number} minZoom Minimum zoom.
* @property {number} maxZoom Maximum zoom.
*/
/**
* @classdesc
* Base class from which all layer types are derived. This should only be instantiated
* in the case where a custom layer is added to the map with a custom `render` function.
* Such a function can be specified in the `options` object, and is expected to return an HTML element.
*
* A visual representation of raster or vector map data.
* 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
* internally. These unmanaged layers are associated with the map using
* {@link module:ol/layer/Layer~Layer#setMap} instead.
*
* A generic `change` event is fired when the state of the source changes.
*
* Please note that for performance reasons several layers might get rendered to
* the same HTML element, which will cause {@link import("../PluggableMap.js").default#forEachLayerAtPixel map.forEachLayerAtPixel()} to
* give false positives. To avoid this, apply different `className` properties to the
* layers at creation time.
*
* @fires import("../render/Event.js").RenderEvent#prerender
* @fires import("../render/Event.js").RenderEvent#postrender
*
* @template {import("../source/Source.js").default} [SourceType=import("../source/Source.js").default]
* @template {import("../renderer/Layer.js").default} [RendererType=import("../renderer/Layer.js").default]
* @api
*/
declare class Layer<SourceType extends import("../source/Source.js").default = import("../source/Source.js").default, RendererType extends import("../renderer/Layer.js").default<any> = import("../renderer/Layer.js").default<any>> extends BaseLayer {
/**
* @param {Options<SourceType>} options Layer options.
*/
constructor(options: Options<SourceType>);
/***
* @type {LayerOnSignature<import("../events").EventsKey>}
*/
on: LayerOnSignature<import("../events").EventsKey>;
/***
* @type {LayerOnSignature<import("../events").EventsKey>}
*/
once: LayerOnSignature<import("../events").EventsKey>;
/***
* @type {LayerOnSignature<void>}
*/
un: LayerOnSignature<void>;
/**
* @private
* @type {?import("../events.js").EventsKey}
*/
private mapPrecomposeKey_;
/**
* @private
* @type {?import("../events.js").EventsKey}
*/
private mapRenderKey_;
/**
* @private
* @type {?import("../events.js").EventsKey}
*/
private sourceChangeKey_;
/**
* @private
* @type {RendererType}
*/
private renderer_;
/**
* @protected
* @type {boolean}
*/
protected rendered: boolean;
/**
* 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 {HTMLElement} target Target which the renderer may (but need not) use
* for rendering its content.
* @return {HTMLElement} The rendered element.
*/
render(frameState: import("../PluggableMap.js").FrameState | null, target: HTMLElement): HTMLElement;
/**
* Get the layer source.
* @return {SourceType|null} The layer source (or `null` if not yet set).
* @observable
* @api
*/
getSource(): SourceType | null;
/**
* @return {SourceType|null} The source being rendered.
*/
getRenderSource(): SourceType | null;
/**
* @private
*/
private handleSourceChange_;
/**
* @private
*/
private handleSourcePropertyChange_;
/**
* @param {import("../pixel").Pixel} pixel Pixel.
* @return {Promise<Array<import("../Feature").default>>} Promise that resolves with
* an array of features.
*/
getFeatures(pixel: import("../pixel").Pixel): Promise<Array<import("../Feature").default>>;
/**
* @param {import("../pixel").Pixel} pixel Pixel.
* @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
*/
getData(pixel: import("../pixel").Pixel): Uint8ClampedArray | Uint8Array | Float32Array | DataView | null;
/**
* Called when a layer is not visible during a map render.
*/
unrender(): void;
/**
* For use inside the library only.
* @param {import("../PluggableMap.js").default|null} map Map.
*/
setMapInternal(map: import("../PluggableMap.js").default | null): void;
/**
* For use inside the library only.
* @return {import("../PluggableMap.js").default|null} Map.
*/
getMapInternal(): import("../PluggableMap.js").default | null;
/**
* Sets the layer to be rendered on top of other layers on a map. The map will
* not manage this layer in its layers collection, and the callback in
* {@link module:ol/Map~Map#forEachLayerAtPixel} will receive `null` as layer. This
* is useful for temporary layers. To remove an unmanaged layer from the map,
* use `#setMap(null)`.
*
* 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.
* @api
*/
setMap(map: import("../PluggableMap.js").default | null): void;
/**
* Set the layer source.
* @param {SourceType|null} source The layer source.
* @observable
* @api
*/
setSource(source: SourceType | null): void;
/**
* Get the renderer for this layer.
* @return {RendererType|null} The layer renderer.
*/
getRenderer(): RendererType | null;
/**
* @return {boolean} The layer has a renderer.
*/
hasRenderer(): boolean;
/**
* Create a renderer for this layer.
* @return {RendererType} A layer renderer.
* @protected
*/
protected createRenderer(): RendererType;
}
import BaseLayer from "./Base.js";
//# sourceMappingURL=Layer.d.ts.map

1
node_modules/ol/layer/Layer.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Layer.d.ts","sourceRoot":"","sources":["../src/layer/Layer.js"],"names":[],"mappings":"AA0ZA;;;;;;GAMG;AACH,mCAJW,KAAK,aACL,OAAO,YAAY,EAAE,KAAK,GACzB,OAAO,CAelB;;oCAlaqB,OAAO,oBAAoB,EAAE,UAAU,KAAE,WAAW;;;;uCAK7D,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,QAAQ,EAAE,yBAAyB,GAClF,eAAqB,EAAE,OAAO,WAA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,GAAC,IAAI,CAM1B;IAED;;OAEG;IACH,mBAFY,UAAU,GAAC,IAAI,CAI1B;IAUD;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,oCAeC;IAED;;;;OAIG;IACH,mBAJW,OAAO,UAAU,EAAE,KAAK,GACvB,QAAQ,MAAM,OAAO,YAAY,EAAE,OAAO,CAAC,CAAC,CAQvD;IAED;;;OAGG;IACH,eAHW,OAAO,UAAU,EAAE,KAAK,GACvB,iBAAiB,GAAC,UAAU,GAAC,YAAY,GAAC,QAAQ,GAAC,IAAI,CAOlE;IAmBD;;OAEG;IACH,iBAEC;IAED;;;OAGG;IACH,oBAFW,OAAO,oBAAoB,EAAE,OAAO,GAAC,IAAI,QAOnD;IAED;;;OAGG;IACH,kBAFY,OAAO,oBAAoB,EAAE,OAAO,GAAC,IAAI,CAIpD;IAED;;;;;;;;;;;OAWG;IACH,YAHW,OAAO,oBAAoB,EAAE,OAAO,GAAC,IAAI,QAsCnD;IAED;;;;;OAKG;IACH,kBAJW,UAAU,GAAC,IAAI,QAMzB;IAED;;;OAGG;IACH,eAFY,YAAY,GAAC,IAAI,CAO5B;IAED;;OAEG;IACH,eAFY,OAAO,CAIlB;IAED;;;;OAIG;IACH,4BAHY,YAAY,CAKvB;CAcF"}

394
node_modules/ol/layer/Layer.js generated vendored Normal file
View File

@@ -0,0 +1,394 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/Layer
*/
import BaseLayer from './Base.js';
import EventType from '../events/EventType.js';
import LayerProperty from './Property.js';
import RenderEventType from '../render/EventType.js';
import { assert } from '../asserts.js';
import { assign } from '../obj.js';
import { listen, unlistenByKey } from '../events.js';
/**
* @typedef {function(import("../PluggableMap.js").FrameState):HTMLElement} RenderFunction
*/
/***
* @template Return
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
* import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes|
* 'change:source', import("../Object").ObjectEvent, Return> &
* import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("./Base").BaseLayerObjectEventTypes|'change:source'|
* import("../render/EventType").LayerRenderEventTypes, Return>} LayerOnSignature
*/
/**
* @template {import("../source/Source.js").default} [SourceType=import("../source/Source.js").default]
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @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 {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()`.
*/
/**
* @typedef {Object} State
* @property {import("./Layer.js").default} layer Layer.
* @property {number} opacity Opacity, the value is rounded to two digits to appear after the decimal point.
* @property {boolean} visible Visible.
* @property {boolean} managed Managed.
* @property {import("../extent.js").Extent} [extent] Extent.
* @property {number} zIndex ZIndex.
* @property {number} maxResolution Maximum resolution.
* @property {number} minResolution Minimum resolution.
* @property {number} minZoom Minimum zoom.
* @property {number} maxZoom Maximum zoom.
*/
/**
* @classdesc
* Base class from which all layer types are derived. This should only be instantiated
* in the case where a custom layer is added to the map with a custom `render` function.
* Such a function can be specified in the `options` object, and is expected to return an HTML element.
*
* A visual representation of raster or vector map data.
* 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
* internally. These unmanaged layers are associated with the map using
* {@link module:ol/layer/Layer~Layer#setMap} instead.
*
* A generic `change` event is fired when the state of the source changes.
*
* Please note that for performance reasons several layers might get rendered to
* the same HTML element, which will cause {@link import("../PluggableMap.js").default#forEachLayerAtPixel map.forEachLayerAtPixel()} to
* give false positives. To avoid this, apply different `className` properties to the
* layers at creation time.
*
* @fires import("../render/Event.js").RenderEvent#prerender
* @fires import("../render/Event.js").RenderEvent#postrender
*
* @template {import("../source/Source.js").default} [SourceType=import("../source/Source.js").default]
* @template {import("../renderer/Layer.js").default} [RendererType=import("../renderer/Layer.js").default]
* @api
*/
var Layer = /** @class */ (function (_super) {
__extends(Layer, _super);
/**
* @param {Options<SourceType>} options Layer options.
*/
function Layer(options) {
var _this = this;
var baseOptions = assign({}, options);
delete baseOptions.source;
_this = _super.call(this, baseOptions) || this;
/***
* @type {LayerOnSignature<import("../events").EventsKey>}
*/
_this.on;
/***
* @type {LayerOnSignature<import("../events").EventsKey>}
*/
_this.once;
/***
* @type {LayerOnSignature<void>}
*/
_this.un;
/**
* @private
* @type {?import("../events.js").EventsKey}
*/
_this.mapPrecomposeKey_ = null;
/**
* @private
* @type {?import("../events.js").EventsKey}
*/
_this.mapRenderKey_ = null;
/**
* @private
* @type {?import("../events.js").EventsKey}
*/
_this.sourceChangeKey_ = null;
/**
* @private
* @type {RendererType}
*/
_this.renderer_ = null;
/**
* @protected
* @type {boolean}
*/
_this.rendered = false;
// Overwrite default render method with a custom one
if (options.render) {
_this.render = options.render;
}
if (options.map) {
_this.setMap(options.map);
}
_this.addChangeListener(LayerProperty.SOURCE, _this.handleSourcePropertyChange_);
var source = options.source
? /** @type {SourceType} */ (options.source)
: null;
_this.setSource(source);
return _this;
}
/**
* @param {Array<import("./Layer.js").default>} [opt_array] Array of layers (to be modified in place).
* @return {Array<import("./Layer.js").default>} Array of layers.
*/
Layer.prototype.getLayersArray = function (opt_array) {
var array = opt_array ? opt_array : [];
array.push(this);
return array;
};
/**
* @param {Array<import("./Layer.js").State>} [opt_states] Optional list of layer states (to be modified in place).
* @return {Array<import("./Layer.js").State>} List of layer states.
*/
Layer.prototype.getLayerStatesArray = function (opt_states) {
var states = opt_states ? opt_states : [];
states.push(this.getLayerState());
return states;
};
/**
* Get the layer source.
* @return {SourceType|null} The layer source (or `null` if not yet set).
* @observable
* @api
*/
Layer.prototype.getSource = function () {
return /** @type {SourceType} */ (this.get(LayerProperty.SOURCE)) || null;
};
/**
* @return {SourceType|null} The source being rendered.
*/
Layer.prototype.getRenderSource = function () {
return this.getSource();
};
/**
* @return {import("../source/Source.js").State} Source state.
*/
Layer.prototype.getSourceState = function () {
var source = this.getSource();
return !source ? 'undefined' : source.getState();
};
/**
* @private
*/
Layer.prototype.handleSourceChange_ = function () {
this.changed();
};
/**
* @private
*/
Layer.prototype.handleSourcePropertyChange_ = function () {
if (this.sourceChangeKey_) {
unlistenByKey(this.sourceChangeKey_);
this.sourceChangeKey_ = null;
}
var source = this.getSource();
if (source) {
this.sourceChangeKey_ = listen(source, EventType.CHANGE, this.handleSourceChange_, this);
}
this.changed();
};
/**
* @param {import("../pixel").Pixel} pixel Pixel.
* @return {Promise<Array<import("../Feature").default>>} Promise that resolves with
* an array of features.
*/
Layer.prototype.getFeatures = function (pixel) {
if (!this.renderer_) {
return new Promise(function (resolve) { return resolve([]); });
}
return this.renderer_.getFeatures(pixel);
};
/**
* @param {import("../pixel").Pixel} pixel Pixel.
* @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.
*/
Layer.prototype.getData = function (pixel) {
if (!this.renderer_ || !this.rendered) {
return null;
}
return this.renderer_.getData(pixel);
};
/**
* 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 {HTMLElement} target Target which the renderer may (but need not) use
* for rendering its content.
* @return {HTMLElement} The rendered element.
*/
Layer.prototype.render = function (frameState, target) {
var layerRenderer = this.getRenderer();
if (layerRenderer.prepareFrame(frameState)) {
this.rendered = true;
return layerRenderer.renderFrame(frameState, target);
}
};
/**
* Called when a layer is not visible during a map render.
*/
Layer.prototype.unrender = function () {
this.rendered = false;
};
/**
* For use inside the library only.
* @param {import("../PluggableMap.js").default|null} map Map.
*/
Layer.prototype.setMapInternal = function (map) {
if (!map) {
this.unrender();
}
this.set(LayerProperty.MAP, map);
};
/**
* For use inside the library only.
* @return {import("../PluggableMap.js").default|null} Map.
*/
Layer.prototype.getMapInternal = function () {
return this.get(LayerProperty.MAP);
};
/**
* Sets the layer to be rendered on top of other layers on a map. The map will
* not manage this layer in its layers collection, and the callback in
* {@link module:ol/Map~Map#forEachLayerAtPixel} will receive `null` as layer. This
* is useful for temporary layers. To remove an unmanaged layer from the map,
* use `#setMap(null)`.
*
* 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.
* @api
*/
Layer.prototype.setMap = function (map) {
if (this.mapPrecomposeKey_) {
unlistenByKey(this.mapPrecomposeKey_);
this.mapPrecomposeKey_ = null;
}
if (!map) {
this.changed();
}
if (this.mapRenderKey_) {
unlistenByKey(this.mapRenderKey_);
this.mapRenderKey_ = null;
}
if (map) {
this.mapPrecomposeKey_ = listen(map, RenderEventType.PRECOMPOSE, function (evt) {
var renderEvent =
/** @type {import("../render/Event.js").default} */ (evt);
var layerStatesArray = renderEvent.frameState.layerStatesArray;
var layerState = this.getLayerState(false);
// A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both.
assert(!layerStatesArray.some(function (arrayLayerState) {
return arrayLayerState.layer === layerState.layer;
}), 67);
layerStatesArray.push(layerState);
}, this);
this.mapRenderKey_ = listen(this, EventType.CHANGE, map.render, map);
this.changed();
}
};
/**
* Set the layer source.
* @param {SourceType|null} source The layer source.
* @observable
* @api
*/
Layer.prototype.setSource = function (source) {
this.set(LayerProperty.SOURCE, source);
};
/**
* Get the renderer for this layer.
* @return {RendererType|null} The layer renderer.
*/
Layer.prototype.getRenderer = function () {
if (!this.renderer_) {
this.renderer_ = this.createRenderer();
}
return this.renderer_;
};
/**
* @return {boolean} The layer has a renderer.
*/
Layer.prototype.hasRenderer = function () {
return !!this.renderer_;
};
/**
* Create a renderer for this layer.
* @return {RendererType} A layer renderer.
* @protected
*/
Layer.prototype.createRenderer = function () {
return null;
};
/**
* Clean up.
*/
Layer.prototype.disposeInternal = function () {
if (this.renderer_) {
this.renderer_.dispose();
delete this.renderer_;
}
this.setSource(null);
_super.prototype.disposeInternal.call(this);
};
return Layer;
}(BaseLayer));
/**
* Return `true` if the layer is visible and if the provided view state
* has resolution and zoom levels that are in range of the layer's min/max.
* @param {State} layerState Layer state.
* @param {import("../View.js").State} viewState View state.
* @return {boolean} The layer is visible at the given view state.
*/
export function inView(layerState, viewState) {
if (!layerState.visible) {
return false;
}
var resolution = viewState.resolution;
if (resolution < layerState.minResolution ||
resolution >= layerState.maxResolution) {
return false;
}
var zoom = viewState.zoom;
return zoom > layerState.minZoom && zoom <= layerState.maxZoom;
}
export default Layer;
//# sourceMappingURL=Layer.js.map

1
node_modules/ol/layer/Layer.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

269
node_modules/ol/layer/MapboxVector.d.ts generated vendored Normal file
View File

@@ -0,0 +1,269 @@
export default MapboxVectorLayer;
export type Options = {
/**
* The URL of the Mapbox style object to use for this layer. For a
* style created with Mapbox Studio and hosted on Mapbox, this will look like
* 'mapbox://styles/you/your-style'.
*/
styleUrl: string;
/**
* The access token for your Mapbox style. This has to be provided
* for `mapbox://` style urls. For `https://` and other urls, any access key must be the last query
* parameter of the style url.
*/
accessToken?: string | undefined;
/**
* If your style uses more than one source, you need to use either the
* `source` property or the `layers` property to limit rendering to a single vector source. The
* `source` property corresponds to the id of a vector source in your Mapbox style.
*/
source?: string | undefined;
/**
* Limit rendering to the list of included layers. All layers
* must share the same vector source. If your style uses more than one source, you need to use
* either the `source` property or the `layers` property to limit rendering to a single vector
* source.
*/
layers?: string[] | undefined;
/**
* 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.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
*/
declutter?: boolean | undefined;
/**
* Background color for the layer.
* If not specified, the background from the Mapbox style object will be used. Set to `false` to prevent
* the Mapbox style's background from being used.
*/
background?: false | import("./Base.js").BackgroundColor | undefined;
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `maxResolution` will
* match the style source's `minzoom`.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will
* be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `minZoom` will match
* the style source's `minzoom`.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
*/
renderOrder?: import("../render.js").OrderFunction | undefined;
/**
* The buffer in pixels around the tile extent used by the
* renderer when getting features from the vector tile for the rendering or hit-detection.
* Recommended value: Vector tiles are usually generated with a buffer, so this value should match
* the largest possible buffer of the used tiles. It should be at least the size of the largest
* point symbol or line width.
*/
renderBuffer?: number | undefined;
/**
* Render mode for vector tiles:
* * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom
* animations. Point symbols and texts are accurately rendered as vectors and can stay upright on
* rotated views.
* * `'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).
*/
renderMode?: any | string;
/**
* 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()}.
*/
map?: import("../PluggableMap.js").default | undefined;
/**
* 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
* will be recreated when no animation is active.
*/
updateWhileAnimating?: boolean | undefined;
/**
* When set to `true`, feature batches will be
* recreated during interactions. See also `updateWhileAnimating`.
*/
updateWhileInteracting?: boolean | undefined;
/**
* Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading.
*/
preload?: number | undefined;
/**
* Use interim tiles on error.
*/
useInterimTilesOnError?: boolean | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
/**
* @typedef {Object} Options
* @property {string} styleUrl The URL of the Mapbox style object to use for this layer. For a
* style created with Mapbox Studio and hosted on Mapbox, this will look like
* 'mapbox://styles/you/your-style'.
* @property {string} [accessToken] The access token for your Mapbox style. This has to be provided
* for `mapbox://` style urls. For `https://` and other urls, any access key must be the last query
* parameter of the style url.
* @property {string} [source] If your style uses more than one source, you need to use either the
* `source` property or the `layers` property to limit rendering to a single vector source. The
* `source` property corresponds to the id of a vector source in your Mapbox style.
* @property {Array<string>} [layers] Limit rendering to the list of included layers. All layers
* must share the same vector source. If your style uses more than one source, you need to use
* either the `source` property or the `layers` property to limit rendering to a single vector
* source.
* @property {boolean} [declutter=true] 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.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("./Base.js").BackgroundColor|false} [background] Background color for the layer.
* If not specified, the background from the Mapbox style object will be used. Set to `false` to prevent
* the Mapbox style's background from being used.
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `maxResolution` will
* match the style source's `minzoom`.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will
* be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `minZoom` will match
* the style source's `minzoom`.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {import("../render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
* @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the
* renderer when getting features from the vector tile for the rendering or hit-detection.
* Recommended value: Vector tiles are usually generated with a buffer, so this value should match
* the largest possible buffer of the used tiles. It should be at least the size of the largest
* point symbol or line width.
* @property {import("./VectorTileRenderType.js").default|string} [renderMode='hybrid'] Render mode for vector tiles:
* * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom
* animations. Point symbols and texts are accurately rendered as vectors and can stay upright on
* rotated views.
* * `'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
* 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()}.
* @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
* will be recreated when no animation is active.
* @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be
* recreated during interactions. See also `updateWhileAnimating`.
* @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* A vector tile layer based on a Mapbox style that uses a single vector source. Configure
* the layer with the `styleUrl` and `accessToken` shown in Mapbox Studio's share panel.
* If the style uses more than one source, use the `source` property to choose a single
* vector source. If you want to render a subset of the layers in the style, use the `layers`
* property (all layers must share the same vector source). See the constructor options for
* more detail.
*
* var map = new Map({
* view: new View({
* center: [0, 0],
* zoom: 1
* }),
* layers: [
* new MapboxVectorLayer({
* styleUrl: 'mapbox://styles/mapbox/bright-v9',
* accessToken: 'your-mapbox-access-token-here'
* })
* ],
* target: 'map'
* });
*
* On configuration or loading error, the layer will trigger an `'error'` event. Listeners
* will receive an object with an `error` property that can be used to diagnose the problem.
*
* @param {Options} options Options.
* @extends {VectorTileLayer}
* @fires module:ol/events/Event~BaseEvent#event:error
* @api
*/
declare class MapboxVectorLayer extends VectorTileLayer {
/**
* @param {Options} options Layer options. At a minimum, `styleUrl` and `accessToken`
* must be provided.
*/
constructor(options: Options);
accessToken: string | undefined;
}
import VectorTileLayer from "../layer/VectorTile.js";
//# sourceMappingURL=MapboxVector.d.ts.map

1
node_modules/ol/layer/MapboxVector.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"MapboxVector.d.ts","sourceRoot":"","sources":["../src/layer/MapboxVector.js"],"names":[],"mappings":";;;;;;;cA8Bc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqDN,MAA4C,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAvDhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH;IACE;;;OAGG;IACH,qBAHW,OAAO,EAqDjB;IAnBG,gCAAsC;CAoB3C"}

212
node_modules/ol/layer/MapboxVector.js generated vendored Normal file
View File

@@ -0,0 +1,212 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/MapboxVector
*/
import BaseEvent from '../events/Event.js';
import EventType from '../events/EventType.js';
import MVT from '../format/MVT.js';
import VectorTileLayer from '../layer/VectorTile.js';
import VectorTileSource from '../source/VectorTile.js';
import { applyBackground, applyStyle } from 'ol-mapbox-style';
/**
* @classdesc
* Event emitted on configuration or loading error.
*/
var ErrorEvent = /** @class */ (function (_super) {
__extends(ErrorEvent, _super);
/**
* @param {Error} error error object.
*/
function ErrorEvent(error) {
var _this = _super.call(this, EventType.ERROR) || this;
/**
* @type {Error}
*/
_this.error = error;
return _this;
}
return ErrorEvent;
}(BaseEvent));
/**
* @typedef {Object} Options
* @property {string} styleUrl The URL of the Mapbox style object to use for this layer. For a
* style created with Mapbox Studio and hosted on Mapbox, this will look like
* 'mapbox://styles/you/your-style'.
* @property {string} [accessToken] The access token for your Mapbox style. This has to be provided
* for `mapbox://` style urls. For `https://` and other urls, any access key must be the last query
* parameter of the style url.
* @property {string} [source] If your style uses more than one source, you need to use either the
* `source` property or the `layers` property to limit rendering to a single vector source. The
* `source` property corresponds to the id of a vector source in your Mapbox style.
* @property {Array<string>} [layers] Limit rendering to the list of included layers. All layers
* must share the same vector source. If your style uses more than one source, you need to use
* either the `source` property or the `layers` property to limit rendering to a single vector
* source.
* @property {boolean} [declutter=true] 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.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("./Base.js").BackgroundColor|false} [background] Background color for the layer.
* If not specified, the background from the Mapbox style object will be used. Set to `false` to prevent
* the Mapbox style's background from being used.
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `maxResolution` will
* match the style source's `minzoom`.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will
* be visible. If neither `maxResolution` nor `minZoom` are defined, the layer's `minZoom` will match
* the style source's `minzoom`.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {import("../render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
* @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the
* renderer when getting features from the vector tile for the rendering or hit-detection.
* Recommended value: Vector tiles are usually generated with a buffer, so this value should match
* the largest possible buffer of the used tiles. It should be at least the size of the largest
* point symbol or line width.
* @property {import("./VectorTileRenderType.js").default|string} [renderMode='hybrid'] Render mode for vector tiles:
* * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom
* animations. Point symbols and texts are accurately rendered as vectors and can stay upright on
* rotated views.
* * `'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
* 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()}.
* @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
* will be recreated when no animation is active.
* @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be
* recreated during interactions. See also `updateWhileAnimating`.
* @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* A vector tile layer based on a Mapbox style that uses a single vector source. Configure
* the layer with the `styleUrl` and `accessToken` shown in Mapbox Studio's share panel.
* If the style uses more than one source, use the `source` property to choose a single
* vector source. If you want to render a subset of the layers in the style, use the `layers`
* property (all layers must share the same vector source). See the constructor options for
* more detail.
*
* var map = new Map({
* view: new View({
* center: [0, 0],
* zoom: 1
* }),
* layers: [
* new MapboxVectorLayer({
* styleUrl: 'mapbox://styles/mapbox/bright-v9',
* accessToken: 'your-mapbox-access-token-here'
* })
* ],
* target: 'map'
* });
*
* On configuration or loading error, the layer will trigger an `'error'` event. Listeners
* will receive an object with an `error` property that can be used to diagnose the problem.
*
* @param {Options} options Options.
* @extends {VectorTileLayer}
* @fires module:ol/events/Event~BaseEvent#event:error
* @api
*/
var MapboxVectorLayer = /** @class */ (function (_super) {
__extends(MapboxVectorLayer, _super);
/**
* @param {Options} options Layer options. At a minimum, `styleUrl` and `accessToken`
* must be provided.
*/
function MapboxVectorLayer(options) {
var _this = this;
var declutter = 'declutter' in options ? options.declutter : true;
var source = new VectorTileSource({
state: 'loading',
format: new MVT(),
});
_this = _super.call(this, {
source: source,
background: options.background,
declutter: declutter,
className: options.className,
opacity: options.opacity,
visible: options.visible,
zIndex: options.zIndex,
minResolution: options.minResolution,
maxResolution: options.maxResolution,
minZoom: options.minZoom,
maxZoom: options.maxZoom,
renderOrder: options.renderOrder,
renderBuffer: options.renderBuffer,
renderMode: options.renderMode,
map: options.map,
updateWhileAnimating: options.updateWhileAnimating,
updateWhileInteracting: options.updateWhileInteracting,
preload: options.preload,
useInterimTilesOnError: options.useInterimTilesOnError,
properties: options.properties,
}) || this;
if (options.accessToken) {
_this.accessToken = options.accessToken;
}
var url = options.styleUrl;
applyStyle(_this, url, options.layers || options.source, {
accessToken: _this.accessToken,
})
.then(function () {
source.setState('ready');
})
.catch(function (error) {
_this.dispatchEvent(new ErrorEvent(error));
var source = _this.getSource();
source.setState('error');
});
if (_this.getBackground() === undefined) {
applyBackground(_this, options.styleUrl, {
accessToken: _this.accessToken,
});
}
return _this;
}
return MapboxVectorLayer;
}(VectorTileLayer));
export default MapboxVectorLayer;
//# sourceMappingURL=MapboxVector.js.map

1
node_modules/ol/layer/MapboxVector.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"MapboxVector.js","sourceRoot":"","sources":["../src/layer/MapboxVector.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,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eAAe,GAwD9C;AAED,eAAe,iBAAiB,CAAC"}

14
node_modules/ol/layer/Property.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
declare namespace _default {
const OPACITY: string;
const VISIBLE: string;
const EXTENT: string;
const Z_INDEX: string;
const MAX_RESOLUTION: string;
const MIN_RESOLUTION: string;
const MAX_ZOOM: string;
const MIN_ZOOM: string;
const SOURCE: string;
const MAP: string;
}
export default _default;
//# sourceMappingURL=Property.d.ts.map

1
node_modules/ol/layer/Property.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../src/layer/Property.js"],"names":[],"mappings":""}

19
node_modules/ol/layer/Property.js generated vendored Normal file
View File

@@ -0,0 +1,19 @@
/**
* @module ol/layer/Property
*/
/**
* @enum {string}
*/
export default {
OPACITY: 'opacity',
VISIBLE: 'visible',
EXTENT: 'extent',
Z_INDEX: 'zIndex',
MAX_RESOLUTION: 'maxResolution',
MIN_RESOLUTION: 'minResolution',
MAX_ZOOM: 'maxZoom',
MIN_ZOOM: 'minZoom',
SOURCE: 'source',
MAP: 'map',
};
//# sourceMappingURL=Property.js.map

1
node_modules/ol/layer/Property.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Property.js","sourceRoot":"","sources":["../src/layer/Property.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAe;IACb,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,QAAQ;IACjB,cAAc,EAAE,eAAe;IAC/B,cAAc,EAAE,eAAe;IAC/B,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,MAAM,EAAE,QAAQ;IAChB,GAAG,EAAE,KAAK;CACX,CAAC"}

23
node_modules/ol/layer/Tile.d.ts generated vendored Normal file
View File

@@ -0,0 +1,23 @@
export default TileLayer;
/**
* @classdesc
* For layer sources that provide pre-rendered, tiled images in grids that are
* organized by zoom levels for specific resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Tile.js").default} TileSourceType
* @extends BaseTileLayer<TileSourceType, CanvasTileLayerRenderer>
* @api
*/
declare class TileLayer<TileSourceType extends import("../source/Tile.js").default> extends BaseTileLayer<TileSourceType, CanvasTileLayerRenderer<TileLayer<import("../source/Tile.js").default> | import("./VectorTile.js").default>> {
/**
* @param {import("./BaseTile.js").Options<TileSourceType>} [opt_options] Tile layer options.
*/
constructor(opt_options?: import("./BaseTile.js").Options<TileSourceType> | undefined);
createRenderer(): any;
}
import CanvasTileLayerRenderer from "../renderer/canvas/TileLayer.js";
import BaseTileLayer from "./BaseTile.js";
//# sourceMappingURL=Tile.d.ts.map

1
node_modules/ol/layer/Tile.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Tile.d.ts","sourceRoot":"","sources":["../src/layer/Tile.js"],"names":[],"mappings":";AAMA;;;;;;;;;;;GAWG;AACH;IACE;;OAEG;IACH,uFAEC;IAED,sBAEC;CACF"}

47
node_modules/ol/layer/Tile.js generated vendored Normal file
View File

@@ -0,0 +1,47 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/Tile
*/
import BaseTileLayer from './BaseTile.js';
import CanvasTileLayerRenderer from '../renderer/canvas/TileLayer.js';
/**
* @classdesc
* For layer sources that provide pre-rendered, tiled images in grids that are
* organized by zoom levels for specific resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Tile.js").default} TileSourceType
* @extends BaseTileLayer<TileSourceType, CanvasTileLayerRenderer>
* @api
*/
var TileLayer = /** @class */ (function (_super) {
__extends(TileLayer, _super);
/**
* @param {import("./BaseTile.js").Options<TileSourceType>} [opt_options] Tile layer options.
*/
function TileLayer(opt_options) {
return _super.call(this, opt_options) || this;
}
TileLayer.prototype.createRenderer = function () {
return new CanvasTileLayerRenderer(this);
};
return TileLayer;
}(BaseTileLayer));
export default TileLayer;
//# sourceMappingURL=Tile.js.map

1
node_modules/ol/layer/Tile.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Tile.js","sourceRoot":"","sources":["../src/layer/Tile.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,aAAa,MAAM,eAAe,CAAC;AAC1C,OAAO,uBAAuB,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH;IAAwB,6BAAa;IACnC;;OAEG;IACH,mBAAY,WAAW;eACrB,kBAAM,WAAW,CAAC;IACpB,CAAC;IAED,kCAAc,GAAd;QACE,OAAO,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IACH,gBAAC;AAAD,CAAC,AAXD,CAAwB,aAAa,GAWpC;AAED,eAAe,SAAS,CAAC"}

6
node_modules/ol/layer/TileProperty.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
declare namespace _default {
const PRELOAD: string;
const USE_INTERIM_TILES_ON_ERROR: string;
}
export default _default;
//# sourceMappingURL=TileProperty.d.ts.map

1
node_modules/ol/layer/TileProperty.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"TileProperty.d.ts","sourceRoot":"","sources":["../src/layer/TileProperty.js"],"names":[],"mappings":""}

11
node_modules/ol/layer/TileProperty.js generated vendored Normal file
View File

@@ -0,0 +1,11 @@
/**
* @module ol/layer/TileProperty
*/
/**
* @enum {string}
*/
export default {
PRELOAD: 'preload',
USE_INTERIM_TILES_ON_ERROR: 'useInterimTilesOnError',
};
//# sourceMappingURL=TileProperty.js.map

1
node_modules/ol/layer/TileProperty.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"TileProperty.js","sourceRoot":"","sources":["../src/layer/TileProperty.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAe;IACb,OAAO,EAAE,SAAS;IAClB,0BAA0B,EAAE,wBAAwB;CACrD,CAAC"}

25
node_modules/ol/layer/Vector.d.ts generated vendored Normal file
View File

@@ -0,0 +1,25 @@
export default VectorLayer;
/**
* @classdesc
* Vector data is rendered client-side, as vectors. This layer type provides most accurate rendering
* even during animations. Points and labels stay upright on rotated views. For very large
* amounts of vector data, performance may suffer during pan and zoom animations. In this case,
* try {@link module:ol/layer/VectorImage~VectorImageLayer}.
*
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Vector.js").default} VectorSourceType
* @extends {BaseVectorLayer<VectorSourceType, CanvasVectorLayerRenderer>}
* @api
*/
declare class VectorLayer<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Geometry.js").default>> extends BaseVectorLayer<VectorSourceType, CanvasVectorLayerRenderer> {
/**
* @param {import("./BaseVector.js").Options<VectorSourceType>} [opt_options] Options.
*/
constructor(opt_options?: import("./BaseVector.js").Options<VectorSourceType> | undefined);
}
import CanvasVectorLayerRenderer from "../renderer/canvas/VectorLayer.js";
import BaseVectorLayer from "./BaseVector.js";
//# sourceMappingURL=Vector.d.ts.map

1
node_modules/ol/layer/Vector.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Vector.d.ts","sourceRoot":"","sources":["../src/layer/Vector.js"],"names":[],"mappings":";AAMA;;;;;;;;;;;;;;GAcG;AACH;IACE;;OAEG;IACH,2FAEC;CAKF"}

50
node_modules/ol/layer/Vector.js generated vendored Normal file
View File

@@ -0,0 +1,50 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/Vector
*/
import BaseVectorLayer from './BaseVector.js';
import CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';
/**
* @classdesc
* Vector data is rendered client-side, as vectors. This layer type provides most accurate rendering
* even during animations. Points and labels stay upright on rotated views. For very large
* amounts of vector data, performance may suffer during pan and zoom animations. In this case,
* try {@link module:ol/layer/VectorImage~VectorImageLayer}.
*
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Vector.js").default} VectorSourceType
* @extends {BaseVectorLayer<VectorSourceType, CanvasVectorLayerRenderer>}
* @api
*/
var VectorLayer = /** @class */ (function (_super) {
__extends(VectorLayer, _super);
/**
* @param {import("./BaseVector.js").Options<VectorSourceType>} [opt_options] Options.
*/
function VectorLayer(opt_options) {
return _super.call(this, opt_options) || this;
}
VectorLayer.prototype.createRenderer = function () {
return new CanvasVectorLayerRenderer(this);
};
return VectorLayer;
}(BaseVectorLayer));
export default VectorLayer;
//# sourceMappingURL=Vector.js.map

1
node_modules/ol/layer/Vector.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Vector.js","sourceRoot":"","sources":["../src/layer/Vector.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,eAAe,MAAM,iBAAiB,CAAC;AAC9C,OAAO,yBAAyB,MAAM,mCAAmC,CAAC;AAE1E;;;;;;;;;;;;;;GAcG;AACH;IAA0B,+BAAe;IACvC;;OAEG;IACH,qBAAY,WAAW;eACrB,kBAAM,WAAW,CAAC;IACpB,CAAC;IAED,oCAAc,GAAd;QACE,OAAO,IAAI,yBAAyB,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IACH,kBAAC;AAAD,CAAC,AAXD,CAA0B,eAAe,GAWxC;AAED,eAAe,WAAW,CAAC"}

168
node_modules/ol/layer/VectorImage.d.ts generated vendored Normal file
View File

@@ -0,0 +1,168 @@
export default VectorImageLayer;
export type Options<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Geometry.js").default>> = {
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
*/
renderOrder?: import("../render.js").OrderFunction | undefined;
/**
* The buffer in pixels around the viewport extent used by the
* 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.
*/
renderBuffer?: number | undefined;
/**
* Source.
*/
source?: VectorSourceType | undefined;
/**
* 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()}.
*/
map?: import("../PluggableMap.js").default | undefined;
/**
* 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.
*/
declutter?: boolean | undefined;
/**
* Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module :ol/style/Style~Style} for the default style
* which will be used if this is not set.
*/
style?: import("../style/Style.js").StyleLike | null | undefined;
/**
* Ratio by which the rendered extent should be larger than the
* viewport extent. A larger ratio avoids cut images during panning, but will cause a decrease in performance.
*/
imageRatio?: number | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
/**
* @template {import("../source/Vector.js").default} VectorSourceType
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {import("../render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
* @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the
* 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
* 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()}.
* @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.
* @property {import("../style/Style.js").StyleLike|null} [style] Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
* which will be used if this is not set.
* @property {number} [imageRatio=1] Ratio by which the rendered extent should be larger than the
* viewport extent. A larger ratio avoids cut images during panning, but will cause a decrease in performance.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Vector data is rendered client-side, to an image. This layer type provides great performance
* during panning and zooming, but point symbols and texts are always rotated with the view and
* pixels are scaled during zoom animations. For more accurate rendering of vector data, use
* {@link module:ol/layer/Vector~VectorLayer} instead.
*
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Vector.js").default} VectorSourceType
* @extends {BaseVectorLayer<VectorSourceType, CanvasVectorImageLayerRenderer>}
* @api
*/
declare class VectorImageLayer<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Geometry.js").default>> extends BaseVectorLayer<VectorSourceType, CanvasVectorImageLayerRenderer> {
/**
* @param {Options<VectorSourceType>} [opt_options] Options.
*/
constructor(opt_options?: Options<VectorSourceType> | undefined);
/**
* @type {number}
* @private
*/
private imageRatio_;
/**
* @return {number} Ratio between rendered extent size and viewport extent size.
*/
getImageRatio(): number;
createRenderer(): any;
}
import CanvasVectorImageLayerRenderer from "../renderer/canvas/VectorImageLayer.js";
import BaseVectorLayer from "./BaseVector.js";
//# sourceMappingURL=VectorImage.d.ts.map

1
node_modules/ol/layer/VectorImage.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"VectorImage.d.ts","sourceRoot":"","sources":["../src/layer/VectorImage.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;;;;;;;;;;;;;GAcG;AACH;IACE;;OAEG;IACH,iEAaC;IANC;;;OAGG;IACH,oBAC2D;IAG7D;;OAEG;IACH,iBAFY,MAAM,CAIjB;IAED,sBAEC;CACF"}

109
node_modules/ol/layer/VectorImage.js generated vendored Normal file
View File

@@ -0,0 +1,109 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/VectorImage
*/
import BaseVectorLayer from './BaseVector.js';
import CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.js';
import { assign } from '../obj.js';
/**
* @template {import("../source/Vector.js").default} VectorSourceType
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {import("../render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
* @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the
* 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
* 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()}.
* @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.
* @property {import("../style/Style.js").StyleLike|null} [style] Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
* which will be used if this is not set.
* @property {number} [imageRatio=1] Ratio by which the rendered extent should be larger than the
* viewport extent. A larger ratio avoids cut images during panning, but will cause a decrease in performance.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Vector data is rendered client-side, to an image. This layer type provides great performance
* during panning and zooming, but point symbols and texts are always rotated with the view and
* pixels are scaled during zoom animations. For more accurate rendering of vector data, use
* {@link module:ol/layer/Vector~VectorLayer} instead.
*
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Vector.js").default} VectorSourceType
* @extends {BaseVectorLayer<VectorSourceType, CanvasVectorImageLayerRenderer>}
* @api
*/
var VectorImageLayer = /** @class */ (function (_super) {
__extends(VectorImageLayer, _super);
/**
* @param {Options<VectorSourceType>} [opt_options] Options.
*/
function VectorImageLayer(opt_options) {
var _this = this;
var options = opt_options ? opt_options : {};
var baseOptions = assign({}, options);
delete baseOptions.imageRatio;
_this = _super.call(this, baseOptions) || this;
/**
* @type {number}
* @private
*/
_this.imageRatio_ =
options.imageRatio !== undefined ? options.imageRatio : 1;
return _this;
}
/**
* @return {number} Ratio between rendered extent size and viewport extent size.
*/
VectorImageLayer.prototype.getImageRatio = function () {
return this.imageRatio_;
};
VectorImageLayer.prototype.createRenderer = function () {
return new CanvasVectorImageLayerRenderer(this);
};
return VectorImageLayer;
}(BaseVectorLayer));
export default VectorImageLayer;
//# sourceMappingURL=VectorImage.js.map

1
node_modules/ol/layer/VectorImage.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"VectorImage.js","sourceRoot":"","sources":["../src/layer/VectorImage.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,eAAe,MAAM,iBAAiB,CAAC;AAC9C,OAAO,8BAA8B,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH;;;;;;;;;;;;;;GAcG;AACH;IAA+B,oCAAe;IAC5C;;OAEG;IACH,0BAAY,WAAW;QAAvB,iBAaC;QAZC,IAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QAE/C,IAAM,WAAW,GAAG,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QACxC,OAAO,WAAW,CAAC,UAAU,CAAC;gBAC9B,kBAAM,WAAW,CAAC;QAElB;;;WAGG;QACH,KAAI,CAAC,WAAW;YACd,OAAO,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;;IAC9D,CAAC;IAED;;OAEG;IACH,wCAAa,GAAb;QACE,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,yCAAc,GAAd;QACE,OAAO,IAAI,8BAA8B,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IACH,uBAAC;AAAD,CAAC,AA7BD,CAA+B,eAAe,GA6B7C;AAED,eAAe,gBAAgB,CAAC"}

280
node_modules/ol/layer/VectorTile.d.ts generated vendored Normal file
View File

@@ -0,0 +1,280 @@
export default VectorTileLayer;
/**
* *
*/
export type VectorTileLayerOnSignature<Return> = import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> & import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes | 'change:source' | 'change:preload' | 'change:useInterimTilesOnError', import("../Object").ObjectEvent, Return> & import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> & import("../Observable").CombinedOnSignature<import("../Observable").EventTypes | import("./Base").BaseLayerObjectEventTypes | 'change:source' | 'change:preload' | 'change:useInterimTilesOnError' | import("../render/EventType").LayerRenderEventTypes, Return>;
export type Options = {
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
*/
renderOrder?: import("../render.js").OrderFunction | undefined;
/**
* The buffer in pixels around the tile extent used by the
* renderer when getting features from the vector tile for the rendering or hit-detection.
* Recommended value: Vector tiles are usually generated with a buffer, so this value should match
* the largest possible buffer of the used tiles. It should be at least the size of the largest
* point symbol or line width.
*/
renderBuffer?: number | undefined;
/**
* Render mode for vector tiles:
* * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom
* animations. Point symbols and texts are accurately rendered as vectors and can stay upright on
* rotated views.
* * `'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).
*/
renderMode?: any | string;
/**
* Source.
*/
source?: import("../source/VectorTile.js").default | undefined;
/**
* 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()}.
*/
map?: import("../PluggableMap.js").default | undefined;
/**
* 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.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
*/
declutter?: boolean | undefined;
/**
* Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module :ol/style/Style~Style} for the default style
* which will be used if this is not set.
*/
style?: import("../style/Style.js").StyleLike | null | undefined;
/**
* Background color for the layer. If not specified, no
* background will be rendered.
*/
background?: false | import("./Base").BackgroundColor | undefined;
/**
* 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
* will be recreated when no animation is active.
*/
updateWhileAnimating?: boolean | undefined;
/**
* When set to `true`, feature batches will be
* recreated during interactions. See also `updateWhileAnimating`.
*/
updateWhileInteracting?: boolean | undefined;
/**
* Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading.
*/
preload?: number | undefined;
/**
* Use interim tiles on error.
*/
useInterimTilesOnError?: boolean | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
/***
* @template Return
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
* import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes|
* 'change:source'|'change:preload'|'change:useInterimTilesOnError', import("../Object").ObjectEvent, Return> &
* import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("./Base").BaseLayerObjectEventTypes|
* 'change:source'|'change:preload'|'change:useInterimTilesOnError'|import("../render/EventType").LayerRenderEventTypes, Return>} VectorTileLayerOnSignature
*/
/**
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {import("../render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
* @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the
* renderer when getting features from the vector tile for the rendering or hit-detection.
* Recommended value: Vector tiles are usually generated with a buffer, so this value should match
* the largest possible buffer of the used tiles. It should be at least the size of the largest
* point symbol or line width.
* @property {import("./VectorTileRenderType.js").default|string} [renderMode='hybrid'] Render mode for vector tiles:
* * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom
* animations. Point symbols and texts are accurately rendered as vectors and can stay upright on
* rotated views.
* * `'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("../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
* 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()}.
* @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.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("../style/Style.js").StyleLike|null} [style] Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
* which will be used if this is not set.
* @property {import("./Base.js").BackgroundColor|false} [background] Background color for the layer. If not specified, no
* background will be rendered.
* @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
* will be recreated when no animation is active.
* @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be
* recreated during interactions. See also `updateWhileAnimating`.
* @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Layer for vector tile data that is rendered client-side.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @param {Options} [opt_options] Options.
* @extends {BaseVectorLayer<import("../source/VectorTile.js").default, CanvasVectorTileLayerRenderer>}
* @api
*/
declare class VectorTileLayer extends BaseVectorLayer<import("../source/VectorTile.js").default, CanvasVectorTileLayerRenderer> {
/**
* @param {Options} [opt_options] Options.
*/
constructor(opt_options?: Options | undefined);
/***
* @type {VectorTileLayerOnSignature<import("../events").EventsKey>}
*/
on: VectorTileLayerOnSignature<import("../events").EventsKey>;
/***
* @type {VectorTileLayerOnSignature<import("../events").EventsKey>}
*/
once: VectorTileLayerOnSignature<import("../events").EventsKey>;
/***
* @type {VectorTileLayerOnSignature<void>}
*/
un: VectorTileLayerOnSignature<void>;
/**
* @private
* @type {import("./VectorTileRenderType.js").default}
*/
private renderMode_;
/**
* @return {import("./VectorTileRenderType.js").default} The render mode.
*/
getRenderMode(): any;
/**
* Return the level as number to which we will preload tiles up to.
* @return {number} The level to preload tiles up to.
* @observable
* @api
*/
getPreload(): number;
/**
* Whether we use interim tiles on error.
* @return {boolean} Use interim tiles on error.
* @observable
* @api
*/
getUseInterimTilesOnError(): boolean;
/**
* Set the level as number to which we will preload tiles up to.
* @param {number} preload The level to preload tiles up to.
* @observable
* @api
*/
setPreload(preload: number): void;
/**
* Set whether we use interim tiles on error.
* @param {boolean} useInterimTilesOnError Use interim tiles on error.
* @observable
* @api
*/
setUseInterimTilesOnError(useInterimTilesOnError: boolean): void;
}
import CanvasVectorTileLayerRenderer from "../renderer/canvas/VectorTileLayer.js";
import BaseVectorLayer from "./BaseVector.js";
//# sourceMappingURL=VectorTile.d.ts.map

1
node_modules/ol/layer/VectorTile.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"VectorTile.d.ts","sourceRoot":"","sources":["../src/layer/VectorTile.js"],"names":[],"mappings":";;;;iDAYa,OAAO,eAAe,EAAE,WAAW,CAAC,OAAO,eAAe,EAAE,UAAU,EAAE,OAAO,oBAAoB,EAAE,OAAO,EAAE,MAAM,CAAC,GACjI,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,QAAQ,EAAE,yBAAyB,GAClF,eAAqB,GAAC,gBAAgB,GAAC,+BAA+B,EAAE,OAAO,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,GAChH,OAAW,eAAe,EAAE,WAAW,CAAC,OAAO,qBAAqB,EAAE,qBAAqB,EAAE,OAAO,iBAAiB,EAAE,OAAO,EAAE,MAAM,CAAC,GACvI,OAAW,eAAe,EAAE,mBAAmB,CAAC,OAAO,eAAe,EAAE,UAAU,GAAC,OAAO,QAAQ,EAAE,yBAAyB,GAC7H,eAAqB,GAAC,gBAAgB,GAAC,+BAA+B,GAAC,OAAO,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8BtH,MAA4C,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AArChE;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAEH;;;;;;;;;;GAUG;AACH;IACE;;OAEG;IACH,+CAmEC;IAtDC;;OAEG;IACH,IAFU,2BAA2B,OAAO,WAAW,EAAE,SAAS,CAAC,CAE5D;IAEP;;OAEG;IACH,MAFU,2BAA2B,OAAO,WAAW,EAAE,SAAS,CAAC,CAE1D;IAET;;OAEG;IACH,IAFU,2BAA2B,IAAI,CAAC,CAEnC;IAeP;;;OAGG;IACH,oBAA6B;IA8C/B;;OAEG;IACH,qBAEC;IAED;;;;;OAKG;IACH,cAJY,MAAM,CAMjB;IAED;;;;;OAKG;IACH,6BAJY,OAAO,CAQlB;IAED;;;;;OAKG;IACH,oBAJW,MAAM,QAMhB;IAED;;;;;OAKG;IACH,kDAJW,OAAO,QAMjB;CACF"}

232
node_modules/ol/layer/VectorTile.js generated vendored Normal file
View File

@@ -0,0 +1,232 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/VectorTile
*/
import BaseVectorLayer from './BaseVector.js';
import CanvasVectorTileLayerRenderer from '../renderer/canvas/VectorTileLayer.js';
import TileProperty from './TileProperty.js';
import VectorTileRenderType from './VectorTileRenderType.js';
import { assert } from '../asserts.js';
import { assign } from '../obj.js';
/***
* @template Return
* @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
* import("../Observable").OnSignature<import("./Base").BaseLayerObjectEventTypes|
* 'change:source'|'change:preload'|'change:useInterimTilesOnError', import("../Object").ObjectEvent, Return> &
* import("../Observable").OnSignature<import("../render/EventType").LayerRenderEventTypes, import("../render/Event").default, Return> &
* import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("./Base").BaseLayerObjectEventTypes|
* 'change:source'|'change:preload'|'change:useInterimTilesOnError'|import("../render/EventType").LayerRenderEventTypes, Return>} VectorTileLayerOnSignature
*/
/**
* @typedef {Object} Options
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {import("../render.js").OrderFunction} [renderOrder] Render order. Function to be used when sorting
* features before rendering. By default features are drawn in the order that they are created. Use
* `null` to avoid the sort, but get an undefined draw order.
* @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the
* renderer when getting features from the vector tile for the rendering or hit-detection.
* Recommended value: Vector tiles are usually generated with a buffer, so this value should match
* the largest possible buffer of the used tiles. It should be at least the size of the largest
* point symbol or line width.
* @property {import("./VectorTileRenderType.js").default|string} [renderMode='hybrid'] Render mode for vector tiles:
* * `'hybrid'`: Polygon and line elements are rendered as images, so pixels are scaled during zoom
* animations. Point symbols and texts are accurately rendered as vectors and can stay upright on
* rotated views.
* * `'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("../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
* 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()}.
* @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.
* Higher z-index means higher priority. Within the same z-index, a feature rendered before another has
* higher priority.
*
* As an optimization decluttered features from layers with the same `className` are rendered above
* the fill and stroke styles of all of those layers regardless of z-index. To opt out of this
* behavior and place declutterd features with their own layer configure the layer with a `className`
* other than `ol-layer`.
* @property {import("../style/Style.js").StyleLike|null} [style] Layer style. When set to `null`, only
* features that have their own style will be rendered. See {@link module:ol/style/Style~Style} for the default style
* which will be used if this is not set.
* @property {import("./Base.js").BackgroundColor|false} [background] Background color for the layer. If not specified, no
* background will be rendered.
* @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
* will be recreated when no animation is active.
* @property {boolean} [updateWhileInteracting=false] When set to `true`, feature batches will be
* recreated during interactions. See also `updateWhileAnimating`.
* @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Layer for vector tile data that is rendered client-side.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @param {Options} [opt_options] Options.
* @extends {BaseVectorLayer<import("../source/VectorTile.js").default, CanvasVectorTileLayerRenderer>}
* @api
*/
var VectorTileLayer = /** @class */ (function (_super) {
__extends(VectorTileLayer, _super);
/**
* @param {Options} [opt_options] Options.
*/
function VectorTileLayer(opt_options) {
var _this = this;
var options = opt_options ? opt_options : {};
var baseOptions = /** @type {Object} */ (assign({}, options));
delete baseOptions.preload;
delete baseOptions.useInterimTilesOnError;
_this = _super.call(this,
/** @type {import("./BaseVector.js").Options<import("../source/VectorTile.js").default>} */ (baseOptions)) || this;
/***
* @type {VectorTileLayerOnSignature<import("../events").EventsKey>}
*/
_this.on;
/***
* @type {VectorTileLayerOnSignature<import("../events").EventsKey>}
*/
_this.once;
/***
* @type {VectorTileLayerOnSignature<void>}
*/
_this.un;
if (options.renderMode === VectorTileRenderType.IMAGE) {
//FIXME deprecated - remove this check in v7.
//eslint-disable-next-line
console.warn('renderMode: "image" is deprecated. Option ignored.');
options.renderMode = undefined;
}
var renderMode = options.renderMode || VectorTileRenderType.HYBRID;
assert(renderMode == VectorTileRenderType.HYBRID ||
renderMode == VectorTileRenderType.VECTOR, 28); // `renderMode` must be `'hybrid'` or `'vector'`.
/**
* @private
* @type {import("./VectorTileRenderType.js").default}
*/
_this.renderMode_ = renderMode;
_this.setPreload(options.preload ? options.preload : 0);
_this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined
? options.useInterimTilesOnError
: true);
/**
* @return {import("./Base.js").BackgroundColor} Background color.
* @function
* @api
*/
_this.getBackground;
/**
* @param {import("./Base.js").BackgroundColor} background Background color.
* @function
* @api
*/
_this.setBackground;
return _this;
}
VectorTileLayer.prototype.createRenderer = function () {
return new CanvasVectorTileLayerRenderer(this);
};
/**
* Get the topmost feature that intersects the given pixel on the viewport. Returns a promise
* that resolves with an array of features. The array will either contain the topmost feature
* 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
* image.
*
* @param {import("../pixel.js").Pixel} pixel Pixel.
* @return {Promise<Array<import("../Feature").default>>} Promise that resolves with an array of features.
* @api
*/
VectorTileLayer.prototype.getFeatures = function (pixel) {
return _super.prototype.getFeatures.call(this, pixel);
};
/**
* @return {import("./VectorTileRenderType.js").default} The render mode.
*/
VectorTileLayer.prototype.getRenderMode = function () {
return this.renderMode_;
};
/**
* Return the level as number to which we will preload tiles up to.
* @return {number} The level to preload tiles up to.
* @observable
* @api
*/
VectorTileLayer.prototype.getPreload = function () {
return /** @type {number} */ (this.get(TileProperty.PRELOAD));
};
/**
* Whether we use interim tiles on error.
* @return {boolean} Use interim tiles on error.
* @observable
* @api
*/
VectorTileLayer.prototype.getUseInterimTilesOnError = function () {
return /** @type {boolean} */ (this.get(TileProperty.USE_INTERIM_TILES_ON_ERROR));
};
/**
* Set the level as number to which we will preload tiles up to.
* @param {number} preload The level to preload tiles up to.
* @observable
* @api
*/
VectorTileLayer.prototype.setPreload = function (preload) {
this.set(TileProperty.PRELOAD, preload);
};
/**
* Set whether we use interim tiles on error.
* @param {boolean} useInterimTilesOnError Use interim tiles on error.
* @observable
* @api
*/
VectorTileLayer.prototype.setUseInterimTilesOnError = function (useInterimTilesOnError) {
this.set(TileProperty.USE_INTERIM_TILES_ON_ERROR, useInterimTilesOnError);
};
return VectorTileLayer;
}(BaseVectorLayer));
export default VectorTileLayer;
//# sourceMappingURL=VectorTile.js.map

1
node_modules/ol/layer/VectorTile.js.map generated v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Y,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;OAKG;IACH,mDAAyB,GAAzB,UAA0B,sBAAsB;QAC9C,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAAC;IAC5E,CAAC;IACH,sBAAC;AAAD,CAAC,AA/ID,CAA8B,eAAe,GA+I5C;AAED,eAAe,eAAe,CAAC"}

7
node_modules/ol/layer/VectorTileRenderType.d.ts generated vendored Normal file
View File

@@ -0,0 +1,7 @@
declare namespace _default {
const IMAGE: string;
const HYBRID: string;
const VECTOR: string;
}
export default _default;
//# sourceMappingURL=VectorTileRenderType.d.ts.map

1
node_modules/ol/layer/VectorTileRenderType.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"VectorTileRenderType.d.ts","sourceRoot":"","sources":["../src/layer/VectorTileRenderType.js"],"names":[],"mappings":""}

34
node_modules/ol/layer/VectorTileRenderType.js generated vendored Normal file
View File

@@ -0,0 +1,34 @@
/**
* @module ol/layer/VectorTileRenderType
*/
/**
* @enum {string}
* Render mode for vector tiles:
* @api
*/
export default {
/**
* Vector tiles are rendered as images. Great performance, but
* point symbols and texts are always rotated with the view and pixels are
* scaled during zoom animations
* @api
* @deprecated
*/
IMAGE: 'image',
/**
* Polygon and line elements are rendered as images, so pixels
* are scaled during zoom animations. Point symbols and texts are accurately
* rendered as vectors and can stay upright on rotated views.
* @api
*/
HYBRID: 'hybrid',
/**
* 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).
* @api
*/
VECTOR: 'vector',
};
//# sourceMappingURL=VectorTileRenderType.js.map

1
node_modules/ol/layer/VectorTileRenderType.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"VectorTileRenderType.js","sourceRoot":"","sources":["../src/layer/VectorTileRenderType.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;GAIG;AACH,eAAe;IACb;;;;;;OAMG;IACH,KAAK,EAAE,OAAO;IACd;;;;;OAKG;IACH,MAAM,EAAE,QAAQ;IAChB;;;;;;OAMG;IACH,MAAM,EAAE,QAAQ;CACjB,CAAC"}

163
node_modules/ol/layer/WebGLPoints.d.ts generated vendored Normal file
View File

@@ -0,0 +1,163 @@
export default WebGLPointsLayer;
export type Options<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Point.js").default>> = {
/**
* Literal style to apply to the layer features.
*/
style: import('../style/literal.js').LiteralStyle;
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* Point source.
*/
source?: VectorSourceType | undefined;
/**
* Setting this to true will provide a slight performance boost, but will
* prevent all hit detection on the layer.
*/
disableHitDetection?: boolean | undefined;
/**
* Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
properties?: {
[x: string]: any;
} | undefined;
};
/**
* @template {import("../source/Vector.js").default<import("../geom/Point.js").default>} VectorSourceType
* @typedef {Object} Options
* @property {import('../style/literal.js').LiteralStyle} style Literal style to apply to the layer features.
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {VectorSourceType} [source] Point source.
* @property {boolean} [disableHitDetection=false] Setting this to true will provide a slight performance boost, but will
* prevent all hit detection on the layer.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Layer optimized for rendering large point datasets. Takes a `style` property which
* is a serializable JSON object describing how the layer should be rendered.
*
* Here are a few samples of literal style objects:
* ```js
* const style = {
* symbol: {
* symbolType: 'circle',
* size: 8,
* color: '#33AAFF',
* opacity: 0.9
* }
* }
* ```
*
* ```js
* const style = {
* symbol: {
* symbolType: 'image',
* offset: [0, 12],
* size: [4, 8],
* src: '../static/exclamation-mark.png'
* }
* }
* ```
*
* **Important: a `WebGLPoints` layer must be manually disposed when removed, otherwise the underlying WebGL context
* will not be garbage collected.**
*
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Vector.js").default<import("../geom/Point.js").default>} VectorSourceType
* @extends {Layer<VectorSourceType, WebGLPointsLayerRenderer>}
* @fires import("../render/Event.js").RenderEvent
*/
declare class WebGLPointsLayer<VectorSourceType extends import("../source/Vector.js").default<import("../geom/Point.js").default>> extends Layer<VectorSourceType, WebGLPointsLayerRenderer> {
/**
* @param {Options<VectorSourceType>} options Options.
*/
constructor(options: Options<VectorSourceType>);
/**
* @private
* @type {import('../webgl/ShaderBuilder.js').StyleParseResult}
*/
private parseResult_;
/**
* @type {Object<string, (string|number)>}
* @private
*/
private styleVariables_;
/**
* @private
* @type {boolean}
*/
private hitDetectionDisabled_;
createRenderer(): any;
/**
* Update any variables used by the layer style and trigger a re-render.
* @param {Object<string, number>} variables Variables to update.
*/
updateStyleVariables(variables: {
[x: string]: number;
}): void;
}
import WebGLPointsLayerRenderer from "../renderer/webgl/PointsLayer.js";
import Layer from "./Layer.js";
//# sourceMappingURL=WebGLPoints.d.ts.map

1
node_modules/ol/layer/WebGLPoints.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"WebGLPoints.d.ts","sourceRoot":"","sources":["../src/layer/WebGLPoints.js"],"names":[],"mappings":";;;;;WAWc,OAAO,qBAAqB,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAHxD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH;IACE;;OAEG;IACH,qBAFW,QAAQ,gBAAgB,CAAC,EAwBnC;IAjBC;;;OAGG;IACH,qBAAoD;IAEpD;;;OAGG;IACH,wBAAoD;IAEpD;;;OAGG;IACH,8BAA0D;IAG5D,sBAaC;IAED;;;OAGG;IACH;YAFkB,MAAM,GAAE,MAAM;aAK/B;CACF"}

137
node_modules/ol/layer/WebGLPoints.js generated vendored Normal file
View File

@@ -0,0 +1,137 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/WebGLPoints
*/
import Layer from './Layer.js';
import WebGLPointsLayerRenderer from '../renderer/webgl/PointsLayer.js';
import { assign } from '../obj.js';
import { parseLiteralStyle } from '../webgl/ShaderBuilder.js';
/**
* @template {import("../source/Vector.js").default<import("../geom/Point.js").default>} VectorSourceType
* @typedef {Object} Options
* @property {import('../style/literal.js').LiteralStyle} style Literal style to apply to the layer features.
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {VectorSourceType} [source] Point source.
* @property {boolean} [disableHitDetection=false] Setting this to true will provide a slight performance boost, but will
* prevent all hit detection on the layer.
* @property {Object<string, *>} [properties] Arbitrary observable properties. Can be accessed with `#get()` and `#set()`.
*/
/**
* @classdesc
* Layer optimized for rendering large point datasets. Takes a `style` property which
* is a serializable JSON object describing how the layer should be rendered.
*
* Here are a few samples of literal style objects:
* ```js
* const style = {
* symbol: {
* symbolType: 'circle',
* size: 8,
* color: '#33AAFF',
* opacity: 0.9
* }
* }
* ```
*
* ```js
* const style = {
* symbol: {
* symbolType: 'image',
* offset: [0, 12],
* size: [4, 8],
* src: '../static/exclamation-mark.png'
* }
* }
* ```
*
* **Important: a `WebGLPoints` layer must be manually disposed when removed, otherwise the underlying WebGL context
* will not be garbage collected.**
*
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @template {import("../source/Vector.js").default<import("../geom/Point.js").default>} VectorSourceType
* @extends {Layer<VectorSourceType, WebGLPointsLayerRenderer>}
* @fires import("../render/Event.js").RenderEvent
*/
var WebGLPointsLayer = /** @class */ (function (_super) {
__extends(WebGLPointsLayer, _super);
/**
* @param {Options<VectorSourceType>} options Options.
*/
function WebGLPointsLayer(options) {
var _this = this;
var baseOptions = assign({}, options);
_this = _super.call(this, baseOptions) || this;
/**
* @private
* @type {import('../webgl/ShaderBuilder.js').StyleParseResult}
*/
_this.parseResult_ = parseLiteralStyle(options.style);
/**
* @type {Object<string, (string|number)>}
* @private
*/
_this.styleVariables_ = options.style.variables || {};
/**
* @private
* @type {boolean}
*/
_this.hitDetectionDisabled_ = !!options.disableHitDetection;
return _this;
}
WebGLPointsLayer.prototype.createRenderer = function () {
return new WebGLPointsLayerRenderer(this, {
vertexShader: this.parseResult_.builder.getSymbolVertexShader(),
fragmentShader: this.parseResult_.builder.getSymbolFragmentShader(),
hitVertexShader: !this.hitDetectionDisabled_ &&
this.parseResult_.builder.getSymbolVertexShader(true),
hitFragmentShader: !this.hitDetectionDisabled_ &&
this.parseResult_.builder.getSymbolFragmentShader(true),
uniforms: this.parseResult_.uniforms,
attributes: this.parseResult_.attributes,
});
};
/**
* Update any variables used by the layer style and trigger a re-render.
* @param {Object<string, number>} variables Variables to update.
*/
WebGLPointsLayer.prototype.updateStyleVariables = function (variables) {
assign(this.styleVariables_, variables);
this.changed();
};
return WebGLPointsLayer;
}(Layer));
export default WebGLPointsLayer;
//# sourceMappingURL=WebGLPoints.js.map

1
node_modules/ol/layer/WebGLPoints.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"WebGLPoints.js","sourceRoot":"","sources":["../src/layer/WebGLPoints.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,wBAAwB,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAC,MAAM,EAAC,MAAM,WAAW,CAAC;AACjC,OAAO,EAAC,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH;IAA+B,oCAAK;IAClC;;OAEG;IACH,0BAAY,OAAO;QAAnB,iBAsBC;QArBC,IAAM,WAAW,GAAG,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;gBAExC,kBAAM,WAAW,CAAC;QAElB;;;WAGG;QACH,KAAI,CAAC,YAAY,GAAG,iBAAiB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAErD;;;WAGG;QACH,KAAI,CAAC,eAAe,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,IAAI,EAAE,CAAC;QAErD;;;WAGG;QACH,KAAI,CAAC,qBAAqB,GAAG,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC;;IAC7D,CAAC;IAED,yCAAc,GAAd;QACE,OAAO,IAAI,wBAAwB,CAAC,IAAI,EAAE;YACxC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,qBAAqB,EAAE;YAC/D,cAAc,EAAE,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,uBAAuB,EAAE;YACnE,eAAe,EACb,CAAC,IAAI,CAAC,qBAAqB;gBAC3B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,qBAAqB,CAAC,IAAI,CAAC;YACvD,iBAAiB,EACf,CAAC,IAAI,CAAC,qBAAqB;gBAC3B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,uBAAuB,CAAC,IAAI,CAAC;YACzD,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ;YACpC,UAAU,EAAE,IAAI,CAAC,YAAY,CAAC,UAAU;SACzC,CAAC,CAAC;IACL,CAAC;IAED;;;OAGG;IACH,+CAAoB,GAApB,UAAqB,SAAS;QAC5B,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;QACxC,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IACH,uBAAC;AAAD,CAAC,AAnDD,CAA+B,KAAK,GAmDnC;AAED,eAAe,gBAAgB,CAAC"}

242
node_modules/ol/layer/WebGLTile.d.ts generated vendored Normal file
View File

@@ -0,0 +1,242 @@
export default WebGLTileLayer;
export type SourceType = import("../source/DataTile.js").default | import("../source/TileImage.js").default;
/**
* Translates tile data to rendered pixels.
*/
export type Style = {
/**
* Style variables. Each variable must hold a number or string. These
* variables can be used in the `color`, `brightness`, `contrast`, `exposure`, `saturation` and `gamma`
* {@link import ("../style/expressions.js").ExpressionValue expressions}, using the `['var', 'varName']` operator.
* To update style variables, use the {@link import ("./WebGLTile.js").default#updateStyleVariables} method.
*/
variables?: {
[x: string]: string | number;
} | undefined;
/**
* An expression applied to color values.
*/
color?: import("../style/expressions.js").ExpressionValue | undefined;
/**
* Value used to decrease or increase
* the layer brightness. Values range from -1 to 1.
*/
brightness?: import("../style/expressions.js").ExpressionValue | undefined;
/**
* Value used to decrease or increase
* the layer contrast. Values range from -1 to 1.
*/
contrast?: import("../style/expressions.js").ExpressionValue | undefined;
/**
* Value used to decrease or increase
* the layer exposure. Values range from -1 to 1.
*/
exposure?: import("../style/expressions.js").ExpressionValue | undefined;
/**
* Value used to decrease or increase
* the layer saturation. Values range from -1 to 1.
*/
saturation?: import("../style/expressions.js").ExpressionValue | undefined;
/**
* Apply a gamma correction to the layer.
* Values range from 0 to infinity.
*/
gamma?: import("../style/expressions.js").ExpressionValue | undefined;
};
export type Options = {
/**
* Style to apply to the layer.
*/
style?: Style | undefined;
/**
* A CSS class name to set to the layer element.
*/
className?: string | undefined;
/**
* Opacity (0, 1).
*/
opacity?: number | undefined;
/**
* Visibility.
*/
visible?: boolean | undefined;
/**
* The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
*/
extent?: import("../extent.js").Extent | undefined;
/**
* The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
*/
zIndex?: number | undefined;
/**
* The minimum resolution (inclusive) at which this layer will be
* visible.
*/
minResolution?: number | undefined;
/**
* The maximum resolution (exclusive) below which this layer will
* be visible.
*/
maxResolution?: number | undefined;
/**
* The minimum view zoom level (exclusive) above which this layer will be
* visible.
*/
minZoom?: number | undefined;
/**
* The maximum view zoom level (inclusive) at which this layer will
* be visible.
*/
maxZoom?: number | undefined;
/**
* Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading.
*/
preload?: number | undefined;
/**
* Source for this layer.
*/
source?: SourceType | undefined;
/**
* Array
* of sources for this layer. Takes precedence over `source`. Can either be an array of sources, or a function that
* 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.
*/
sources?: SourceType[] | ((arg0: import("../extent.js").Extent, arg1: number) => Array<SourceType>) | undefined;
/**
* 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}.
*/
map?: import("../PluggableMap.js").default | undefined;
/**
* Use interim tiles on error.
*/
useInterimTilesOnError?: boolean | undefined;
/**
* The internal texture cache size. This needs to be large enough to render
* two zoom levels worth of tiles.
*/
cacheSize?: number | undefined;
};
export type ParsedStyle = {
/**
* The vertex shader.
*/
vertexShader: string;
/**
* The fragment shader.
*/
fragmentShader: string;
/**
* Uniform definitions.
*/
uniforms: {
[x: string]: import("../webgl/Helper.js").UniformValue;
};
/**
* Palette textures.
*/
paletteTextures: Array<import("../webgl/PaletteTexture.js").default>;
};
/**
* @classdesc
* For layer sources that provide pre-rendered, tiled images in grids that are
* organized by zoom levels for specific resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @extends BaseTileLayer<SourceType, WebGLTileLayerRenderer>
* @fires import("../render/Event.js").RenderEvent
* @api
*/
declare class WebGLTileLayer extends BaseTileLayer<SourceType, WebGLTileLayerRenderer> {
/**
* @param {Options} opt_options Tile layer options.
*/
constructor(opt_options: Options);
/**
* @type {Array<SourceType>|function(import("../extent.js").Extent, number):Array<SourceType>}
* @private
*/
private sources_;
/**
* @type {SourceType|null}
* @private
*/
private renderedSource_;
/**
* @type {number}
* @private
*/
private renderedResolution_;
/**
* @type {Style}
* @private
*/
private style_;
/**
* @type {number}
* @private
*/
private cacheSize_;
/**
* @type {Object<string, (string|number)>}
* @private
*/
private styleVariables_;
/**
* Gets the sources for this layer, for a given extent and resolution.
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} resolution Resolution.
* @return {Array<SourceType>} Sources.
*/
getSources(extent: import("../extent.js").Extent, resolution: number): Array<SourceType>;
/**
* @return {SourceType} The source being rendered.
*/
getRenderSource(): SourceType;
/**
* @private
*/
private handleSourceUpdate_;
/**
* @private
* @return {number} The number of source bands.
*/
private getSourceBandCount_;
/**
* @param {import("../PluggableMap").FrameState} frameState Frame state.
* @param {Array<SourceType>} sources Sources.
* @return {HTMLElement} Canvas.
*/
renderSources(frameState: import("../PluggableMap").FrameState, sources: Array<SourceType>): HTMLElement;
/**
* Update the layer style. The `updateStyleVariables` function is a more efficient
* way to update layer rendering. In cases where the whole style needs to be updated,
* this method may be called instead. Note that calling this method will also replace
* any previously set variables, so the new style also needs to include new variables,
* if needed.
* @param {Style} style The new style.
*/
setStyle(style: Style): void;
/**
* Update any variables used by the layer style and trigger a re-render.
* @param {Object<string, number>} variables Variables to update.
* @api
*/
updateStyleVariables(variables: {
[x: string]: number;
}): void;
}
import WebGLTileLayerRenderer from "../renderer/webgl/TileLayer.js";
import BaseTileLayer from "./BaseTile.js";
//# sourceMappingURL=WebGLTile.d.ts.map

1
node_modules/ol/layer/WebGLTile.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"WebGLTile.d.ts","sourceRoot":"","sources":["../src/layer/WebGLTile.js"],"names":[],"mappings":";yBAmBa,OAAO,uBAAuB,EAAE,OAAO,GAAC,OAAO,wBAAwB,EAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA+CpD,OAAO,cAAc,EAAE,MAAM,QAAE,MAAM,KAAE,MAAM,UAAU,CAAC;;;;;;;;;;;;;;;;;;;;;;kBAgBnF,MAAM;;;;oBACN,MAAM;;;;;YACC,MAAM,GAAC,OAAO,oBAAoB,EAAE,YAAY;;;;;qBACvD,MAAM,OAAO,4BAA4B,EAAE,OAAO,CAAC;;AAgNjE;;;;;;;;;;;GAWG;AACH;IACE;;OAEG;IACH,yBAFW,OAAO,EAkDjB;IArCC;;;OAGG;IACH,iBAA+B;IAE/B;;;OAGG;IACH,wBAA2B;IAE3B;;;OAGG;IACH,4BAA8B;IAE9B;;;OAGG;IACH,eAAmB;IAEnB;;;OAGG;IACH,mBAA2B;IAE3B;;;OAGG;IACH,wBAAkD;IAKpD;;;;;OAKG;IACH,mBAJW,OAAO,cAAc,EAAE,MAAM,cAC7B,MAAM,GACL,MAAM,UAAU,CAAC,CAW5B;IAED;;OAEG;IACH,mBAFY,UAAU,CAIrB;IAUD;;OAEG;IACH,4BAIC;IAED;;;OAGG;IACH,4BAMC;IAcD;;;;OAIG;IACH,0BAJW,OAAO,iBAAiB,EAAE,UAAU,WACpC,MAAM,UAAU,CAAC,GAChB,WAAW,CAYtB;IA8CD;;;;;;;OAOG;IACH,gBAFW,KAAK,QAcf;IAED;;;;OAIG;IACH;YAHkB,MAAM,GAAE,MAAM;aAM/B;CACF"}

390
node_modules/ol/layer/WebGLTile.js generated vendored Normal file
View File

@@ -0,0 +1,390 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/layer/WebGLTile
*/
import BaseTileLayer from './BaseTile.js';
import LayerProperty from '../layer/Property.js';
import WebGLTileLayerRenderer, { Attributes, Uniforms, } from '../renderer/webgl/TileLayer.js';
import { PALETTE_TEXTURE_ARRAY, ValueTypes, expressionToGlsl, getStringNumberEquivalent, uniformNameForVariable, } from '../style/expressions.js';
import { assign } from '../obj.js';
/**
* @typedef {import("../source/DataTile.js").default|import("../source/TileImage.js").default} SourceType
*/
/**
* @typedef {Object} Style
* Translates tile data to rendered pixels.
*
* @property {Object<string, (string|number)>} [variables] Style variables. Each variable must hold a number or string. These
* variables can be used in the `color`, `brightness`, `contrast`, `exposure`, `saturation` and `gamma`
* {@link import("../style/expressions.js").ExpressionValue expressions}, using the `['var', 'varName']` operator.
* To update style variables, use the {@link import("./WebGLTile.js").default#updateStyleVariables} method.
* @property {import("../style/expressions.js").ExpressionValue} [color] An expression applied to color values.
* @property {import("../style/expressions.js").ExpressionValue} [brightness=0] Value used to decrease or increase
* the layer brightness. Values range from -1 to 1.
* @property {import("../style/expressions.js").ExpressionValue} [contrast=0] Value used to decrease or increase
* the layer contrast. Values range from -1 to 1.
* @property {import("../style/expressions.js").ExpressionValue} [exposure=0] Value used to decrease or increase
* the layer exposure. Values range from -1 to 1.
* @property {import("../style/expressions.js").ExpressionValue} [saturation=0] Value used to decrease or increase
* the layer saturation. Values range from -1 to 1.
* @property {import("../style/expressions.js").ExpressionValue} [gamma=1] Apply a gamma correction to the layer.
* Values range from 0 to infinity.
*/
/**
* @typedef {Object} Options
* @property {Style} [style] Style to apply to the layer.
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
* @property {number} [opacity=1] Opacity (0, 1).
* @property {boolean} [visible=true] Visibility.
* @property {import("../extent.js").Extent} [extent] The bounding extent for layer rendering. The layer will not be
* rendered outside of this extent.
* @property {number} [zIndex] The z-index for layer rendering. At rendering time, the layers
* will be ordered, first by Z-index and then by position. When `undefined`, a `zIndex` of 0 is assumed
* for layers that are added to the map's `layers` collection, or `Infinity` when the layer's `setMap()`
* method was used.
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
* visible.
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
* be visible.
* @property {number} [minZoom] The minimum view zoom level (exclusive) above which this layer will be
* visible.
* @property {number} [maxZoom] The maximum view zoom level (inclusive) at which this layer will
* be visible.
* @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`
* means no preloading.
* @property {SourceType} [source] Source for this layer.
* @property {Array<SourceType>|function(import("../extent.js").Extent, number):Array<SourceType>} [sources] Array
* of sources for this layer. Takes precedence over `source`. Can either be an array of sources, or a function that
* 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
* 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}.
* @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error.
* @property {number} [cacheSize=512] The internal texture cache size. This needs to be large enough to render
* two zoom levels worth of tiles.
*/
/**
* @typedef {Object} ParsedStyle
* @property {string} vertexShader The vertex shader.
* @property {string} fragmentShader The fragment shader.
* @property {Object<string,import("../webgl/Helper.js").UniformValue>} uniforms Uniform definitions.
* @property {Array<import("../webgl/PaletteTexture.js").default>} paletteTextures Palette textures.
*/
/**
* @param {Style} style The layer style.
* @param {number} [bandCount] The number of bands.
* @return {ParsedStyle} Shaders and uniforms generated from the style.
*/
function parseStyle(style, bandCount) {
var vertexShader = "\n attribute vec2 ".concat(Attributes.TEXTURE_COORD, ";\n uniform mat4 ").concat(Uniforms.TILE_TRANSFORM, ";\n uniform float ").concat(Uniforms.TEXTURE_PIXEL_WIDTH, ";\n uniform float ").concat(Uniforms.TEXTURE_PIXEL_HEIGHT, ";\n uniform float ").concat(Uniforms.TEXTURE_RESOLUTION, ";\n uniform float ").concat(Uniforms.TEXTURE_ORIGIN_X, ";\n uniform float ").concat(Uniforms.TEXTURE_ORIGIN_Y, ";\n uniform float ").concat(Uniforms.DEPTH, ";\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n\n void main() {\n v_textureCoord = ").concat(Attributes.TEXTURE_COORD, ";\n v_mapCoord = vec2(\n ").concat(Uniforms.TEXTURE_ORIGIN_X, " + ").concat(Uniforms.TEXTURE_RESOLUTION, " * ").concat(Uniforms.TEXTURE_PIXEL_WIDTH, " * v_textureCoord[0],\n ").concat(Uniforms.TEXTURE_ORIGIN_Y, " - ").concat(Uniforms.TEXTURE_RESOLUTION, " * ").concat(Uniforms.TEXTURE_PIXEL_HEIGHT, " * v_textureCoord[1]\n );\n gl_Position = ").concat(Uniforms.TILE_TRANSFORM, " * vec4(").concat(Attributes.TEXTURE_COORD, ", ").concat(Uniforms.DEPTH, ", 1.0);\n }\n ");
/**
* @type {import("../style/expressions.js").ParsingContext}
*/
var context = {
inFragmentShader: true,
variables: [],
attributes: [],
stringLiteralsMap: {},
functions: {},
bandCount: bandCount,
};
var pipeline = [];
if (style.color !== undefined) {
var color = expressionToGlsl(context, style.color, ValueTypes.COLOR);
pipeline.push("color = ".concat(color, ";"));
}
if (style.contrast !== undefined) {
var contrast = expressionToGlsl(context, style.contrast, ValueTypes.NUMBER);
pipeline.push("color.rgb = clamp((".concat(contrast, " + 1.0) * color.rgb - (").concat(contrast, " / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"));
}
if (style.exposure !== undefined) {
var exposure = expressionToGlsl(context, style.exposure, ValueTypes.NUMBER);
pipeline.push("color.rgb = clamp((".concat(exposure, " + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"));
}
if (style.saturation !== undefined) {
var saturation = expressionToGlsl(context, style.saturation, ValueTypes.NUMBER);
pipeline.push("\n float saturation = ".concat(saturation, " + 1.0;\n float sr = (1.0 - saturation) * 0.2126;\n float sg = (1.0 - saturation) * 0.7152;\n float sb = (1.0 - saturation) * 0.0722;\n mat3 saturationMatrix = mat3(\n sr + saturation, sr, sr,\n sg, sg + saturation, sg,\n sb, sb, sb + saturation\n );\n color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));\n "));
}
if (style.gamma !== undefined) {
var gamma = expressionToGlsl(context, style.gamma, ValueTypes.NUMBER);
pipeline.push("color.rgb = pow(color.rgb, vec3(1.0 / ".concat(gamma, "));"));
}
if (style.brightness !== undefined) {
var brightness = expressionToGlsl(context, style.brightness, ValueTypes.NUMBER);
pipeline.push("color.rgb = clamp(color.rgb + ".concat(brightness, ", vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"));
}
/** @type {Object<string,import("../webgl/Helper").UniformValue>} */
var uniforms = {};
var numVariables = context.variables.length;
if (numVariables > 1 && !style.variables) {
throw new Error("Missing variables in style (expected ".concat(context.variables, ")"));
}
var _loop_1 = function (i) {
var variableName = context.variables[i];
if (!(variableName in style.variables)) {
throw new Error("Missing '".concat(variableName, "' in style variables"));
}
var uniformName = uniformNameForVariable(variableName);
uniforms[uniformName] = function () {
var value = style.variables[variableName];
if (typeof value === 'string') {
value = getStringNumberEquivalent(context, value);
}
return value !== undefined ? value : -9999999; // to avoid matching with the first string literal
};
};
for (var i = 0; i < numVariables; ++i) {
_loop_1(i);
}
var uniformDeclarations = Object.keys(uniforms).map(function (name) {
return "uniform float ".concat(name, ";");
});
var textureCount = Math.ceil(bandCount / 4);
uniformDeclarations.push("uniform sampler2D ".concat(Uniforms.TILE_TEXTURE_ARRAY, "[").concat(textureCount, "];"));
if (context.paletteTextures) {
uniformDeclarations.push("uniform sampler2D ".concat(PALETTE_TEXTURE_ARRAY, "[").concat(context.paletteTextures.length, "];"));
}
var functionDefintions = Object.keys(context.functions).map(function (name) {
return context.functions[name];
});
var fragmentShader = "\n #ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n #else\n precision mediump float;\n #endif\n\n varying vec2 v_textureCoord;\n varying vec2 v_mapCoord;\n uniform vec4 ".concat(Uniforms.RENDER_EXTENT, ";\n uniform float ").concat(Uniforms.TRANSITION_ALPHA, ";\n uniform float ").concat(Uniforms.TEXTURE_PIXEL_WIDTH, ";\n uniform float ").concat(Uniforms.TEXTURE_PIXEL_HEIGHT, ";\n uniform float ").concat(Uniforms.RESOLUTION, ";\n uniform float ").concat(Uniforms.ZOOM, ";\n\n ").concat(uniformDeclarations.join('\n'), "\n\n ").concat(functionDefintions.join('\n'), "\n\n void main() {\n if (\n v_mapCoord[0] < ").concat(Uniforms.RENDER_EXTENT, "[0] ||\n v_mapCoord[1] < ").concat(Uniforms.RENDER_EXTENT, "[1] ||\n v_mapCoord[0] > ").concat(Uniforms.RENDER_EXTENT, "[2] ||\n v_mapCoord[1] > ").concat(Uniforms.RENDER_EXTENT, "[3]\n ) {\n discard;\n }\n\n vec4 color = texture2D(").concat(Uniforms.TILE_TEXTURE_ARRAY, "[0], v_textureCoord);\n\n ").concat(pipeline.join('\n'), "\n\n if (color.a == 0.0) {\n discard;\n }\n\n gl_FragColor = color;\n gl_FragColor.rgb *= gl_FragColor.a;\n gl_FragColor *= ").concat(Uniforms.TRANSITION_ALPHA, ";\n }");
return {
vertexShader: vertexShader,
fragmentShader: fragmentShader,
uniforms: uniforms,
paletteTextures: context.paletteTextures,
};
}
/**
* @classdesc
* For layer sources that provide pre-rendered, tiled images in grids that are
* organized by zoom levels for specific resolutions.
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
* property on the layer object; for example, setting `title: 'My Title'` in the
* options means that `title` is observable, and has get/set accessors.
*
* @extends BaseTileLayer<SourceType, WebGLTileLayerRenderer>
* @fires import("../render/Event.js").RenderEvent
* @api
*/
var WebGLTileLayer = /** @class */ (function (_super) {
__extends(WebGLTileLayer, _super);
/**
* @param {Options} opt_options Tile layer options.
*/
function WebGLTileLayer(opt_options) {
var _this = this;
var options = opt_options ? assign({}, opt_options) : {};
var style = options.style || {};
delete options.style;
var cacheSize = options.cacheSize;
delete options.cacheSize;
_this = _super.call(this, options) || this;
/**
* @type {Array<SourceType>|function(import("../extent.js").Extent, number):Array<SourceType>}
* @private
*/
_this.sources_ = options.sources;
/**
* @type {SourceType|null}
* @private
*/
_this.renderedSource_ = null;
/**
* @type {number}
* @private
*/
_this.renderedResolution_ = NaN;
/**
* @type {Style}
* @private
*/
_this.style_ = style;
/**
* @type {number}
* @private
*/
_this.cacheSize_ = cacheSize;
/**
* @type {Object<string, (string|number)>}
* @private
*/
_this.styleVariables_ = _this.style_.variables || {};
_this.addChangeListener(LayerProperty.SOURCE, _this.handleSourceUpdate_);
return _this;
}
/**
* Gets the sources for this layer, for a given extent and resolution.
* @param {import("../extent.js").Extent} extent Extent.
* @param {number} resolution Resolution.
* @return {Array<SourceType>} Sources.
*/
WebGLTileLayer.prototype.getSources = function (extent, resolution) {
var source = this.getSource();
return this.sources_
? typeof this.sources_ === 'function'
? this.sources_(extent, resolution)
: this.sources_
: source
? [source]
: [];
};
/**
* @return {SourceType} The source being rendered.
*/
WebGLTileLayer.prototype.getRenderSource = function () {
return this.renderedSource_ || this.getSource();
};
/**
* @return {import("../source/Source.js").State} Source state.
*/
WebGLTileLayer.prototype.getSourceState = function () {
var source = this.getRenderSource();
return source ? source.getState() : 'undefined';
};
/**
* @private
*/
WebGLTileLayer.prototype.handleSourceUpdate_ = function () {
if (this.getSource()) {
this.setStyle(this.style_);
}
};
/**
* @private
* @return {number} The number of source bands.
*/
WebGLTileLayer.prototype.getSourceBandCount_ = function () {
var max = Number.MAX_SAFE_INTEGER;
var sources = this.getSources([-max, -max, max, max], max);
return sources && sources.length && 'bandCount' in sources[0]
? sources[0].bandCount
: 4;
};
WebGLTileLayer.prototype.createRenderer = function () {
var parsedStyle = parseStyle(this.style_, this.getSourceBandCount_());
return new WebGLTileLayerRenderer(this, {
vertexShader: parsedStyle.vertexShader,
fragmentShader: parsedStyle.fragmentShader,
uniforms: parsedStyle.uniforms,
cacheSize: this.cacheSize_,
paletteTextures: parsedStyle.paletteTextures,
});
};
/**
* @param {import("../PluggableMap").FrameState} frameState Frame state.
* @param {Array<SourceType>} sources Sources.
* @return {HTMLElement} Canvas.
*/
WebGLTileLayer.prototype.renderSources = function (frameState, sources) {
var layerRenderer = this.getRenderer();
var canvas;
for (var i = 0, ii = sources.length; i < ii; ++i) {
this.renderedSource_ = sources[i];
if (layerRenderer.prepareFrame(frameState)) {
canvas = layerRenderer.renderFrame(frameState);
}
}
return canvas;
};
/**
* @param {?import("../PluggableMap.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.
*/
WebGLTileLayer.prototype.render = function (frameState, target) {
var _this = this;
this.rendered = true;
var viewState = frameState.viewState;
var sources = this.getSources(frameState.extent, viewState.resolution);
var ready = true;
var _loop_2 = function (i, ii) {
var source = sources[i];
var sourceState = source.getState();
if (sourceState == 'loading') {
var onChange_1 = function () {
if (source.getState() == 'ready') {
source.removeEventListener('change', onChange_1);
_this.changed();
}
};
source.addEventListener('change', onChange_1);
}
ready = ready && sourceState == 'ready';
};
for (var i = 0, ii = sources.length; i < ii; ++i) {
_loop_2(i, ii);
}
var canvas = this.renderSources(frameState, sources);
if (this.getRenderer().renderComplete && ready) {
// Fully rendered, done.
this.renderedResolution_ = viewState.resolution;
return canvas;
}
// Render sources from previously fully rendered frames
if (this.renderedResolution_ > 0.5 * viewState.resolution) {
var altSources = this.getSources(frameState.extent, this.renderedResolution_).filter(function (source) { return !sources.includes(source); });
if (altSources.length > 0) {
return this.renderSources(frameState, altSources);
}
}
return canvas;
};
/**
* Update the layer style. The `updateStyleVariables` function is a more efficient
* way to update layer rendering. In cases where the whole style needs to be updated,
* this method may be called instead. Note that calling this method will also replace
* any previously set variables, so the new style also needs to include new variables,
* if needed.
* @param {Style} style The new style.
*/
WebGLTileLayer.prototype.setStyle = function (style) {
this.styleVariables_ = style.variables || {};
this.style_ = style;
var parsedStyle = parseStyle(this.style_, this.getSourceBandCount_());
var renderer = this.getRenderer();
renderer.reset({
vertexShader: parsedStyle.vertexShader,
fragmentShader: parsedStyle.fragmentShader,
uniforms: parsedStyle.uniforms,
paletteTextures: parsedStyle.paletteTextures,
});
this.changed();
};
/**
* Update any variables used by the layer style and trigger a re-render.
* @param {Object<string, number>} variables Variables to update.
* @api
*/
WebGLTileLayer.prototype.updateStyleVariables = function (variables) {
assign(this.styleVariables_, variables);
this.changed();
};
return WebGLTileLayer;
}(BaseTileLayer));
/**
* Clean up underlying WebGL resources.
* @function
* @api
*/
WebGLTileLayer.prototype.dispose;
export default WebGLTileLayer;
//# sourceMappingURL=WebGLTile.js.map

1
node_modules/ol/layer/WebGLTile.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long