Remove remaining use of inherits in src
This commit is contained in:
@@ -23,6 +23,7 @@ import {assign} from '../obj.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class BaseLayer extends BaseObject {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Abstract base class; normally only used for creating subclasses and not
|
* Abstract base class; normally only used for creating subclasses and not
|
||||||
@@ -37,10 +38,9 @@ import {assign} from '../obj.js';
|
|||||||
* @param {module:ol/layer/Base~Options} options Layer options.
|
* @param {module:ol/layer/Base~Options} options Layer options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class BaseLayer {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
BaseObject.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {Object.<string, *>}
|
* @type {Object.<string, *>}
|
||||||
@@ -249,7 +249,5 @@ class BaseLayer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(BaseLayer, BaseObject);
|
|
||||||
|
|
||||||
|
|
||||||
export default BaseLayer;
|
export default BaseLayer;
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ const Property = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class LayerGroup extends BaseLayer {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* A {@link module:ol/Collection~Collection} of layers that are handled together.
|
* A {@link module:ol/Collection~Collection} of layers that are handled together.
|
||||||
@@ -51,7 +52,6 @@ const Property = {
|
|||||||
* @param {module:ol/layer/Group~Options=} opt_options Layer options.
|
* @param {module:ol/layer/Group~Options=} opt_options Layer options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class LayerGroup {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
@@ -60,7 +60,7 @@ class LayerGroup {
|
|||||||
|
|
||||||
let layers = options.layers;
|
let layers = options.layers;
|
||||||
|
|
||||||
BaseLayer.call(this, baseOptions);
|
super(baseOptions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -236,7 +236,5 @@ class LayerGroup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(LayerGroup, BaseLayer);
|
|
||||||
|
|
||||||
|
|
||||||
export default LayerGroup;
|
export default LayerGroup;
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ const Property = {
|
|||||||
const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
|
const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
|
||||||
|
|
||||||
|
|
||||||
|
class Heatmap extends VectorLayer {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer for rendering vector data as a heatmap.
|
* Layer for rendering vector data as a heatmap.
|
||||||
@@ -73,7 +74,6 @@ const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
|
|||||||
* @param {module:ol/layer/Heatmap~Options=} opt_options Options.
|
* @param {module:ol/layer/Heatmap~Options=} opt_options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class Heatmap {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
const options = opt_options ? opt_options : {};
|
const options = opt_options ? opt_options : {};
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ class Heatmap {
|
|||||||
delete baseOptions.blur;
|
delete baseOptions.blur;
|
||||||
delete baseOptions.shadow;
|
delete baseOptions.shadow;
|
||||||
delete baseOptions.weight;
|
delete baseOptions.weight;
|
||||||
VectorLayer.call(this, /** @type {module:ol/layer/Vector~Options} */ (baseOptions));
|
super(baseOptions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -283,8 +283,6 @@ class Heatmap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(Heatmap, VectorLayer);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Array.<string>} colors A list of colored.
|
* @param {Array.<string>} colors A list of colored.
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ import Layer from '../layer/Layer.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class ImageLayer extends Layer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Server-rendered images that are available for arbitrary extents and
|
* Server-rendered images that are available for arbitrary extents and
|
||||||
@@ -40,11 +42,9 @@ import Layer from '../layer/Layer.js';
|
|||||||
* @param {module:ol/layer/Image~Options=} opt_options Layer options.
|
* @param {module:ol/layer/Image~Options=} opt_options Layer options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class ImageLayer {
|
|
||||||
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
const options = opt_options ? opt_options : {};
|
const options = opt_options ? opt_options : {};
|
||||||
Layer.call(this, /** @type {module:ol/layer/Layer~Options} */ (options));
|
super(options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The layer type.
|
* The layer type.
|
||||||
@@ -57,8 +57,6 @@ class ImageLayer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ImageLayer, Layer);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the associated {@link module:ol/source/Image source} of the image layer.
|
* Return the associated {@link module:ol/source/Image source} of the image layer.
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import SourceState from '../source/State.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class Layer extends BaseLayer {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Abstract base class; normally only used for creating subclasses and not
|
* Abstract base class; normally only used for creating subclasses and not
|
||||||
@@ -66,13 +67,12 @@ import SourceState from '../source/State.js';
|
|||||||
* @param {module:ol/layer/Layer~Options} options Layer options.
|
* @param {module:ol/layer/Layer~Options} options Layer options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class Layer {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
const baseOptions = assign({}, options);
|
const baseOptions = assign({}, options);
|
||||||
delete baseOptions.source;
|
delete baseOptions.source;
|
||||||
|
|
||||||
BaseLayer.call(this, /** @type {module:ol/layer/Base~Options} */ (baseOptions));
|
super(baseOptions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -214,8 +214,6 @@ class Layer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(Layer, BaseLayer);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return `true` if the layer is visible, and if the passed resolution is
|
* Return `true` if the layer is visible, and if the passed resolution is
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import {assign} from '../obj.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class TileLayer extends Layer {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* For layer sources that provide pre-rendered, tiled images in grids that are
|
* For layer sources that provide pre-rendered, tiled images in grids that are
|
||||||
@@ -45,7 +46,6 @@ import {assign} from '../obj.js';
|
|||||||
* @param {module:ol/layer/Tile~Options=} opt_options Tile layer options.
|
* @param {module:ol/layer/Tile~Options=} opt_options Tile layer options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class TileLayer {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
const options = opt_options ? opt_options : {};
|
const options = opt_options ? opt_options : {};
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ class TileLayer {
|
|||||||
|
|
||||||
delete baseOptions.preload;
|
delete baseOptions.preload;
|
||||||
delete baseOptions.useInterimTilesOnError;
|
delete baseOptions.useInterimTilesOnError;
|
||||||
Layer.call(this, /** @type {module:ol/layer/Layer~Options} */ (baseOptions));
|
super(baseOptions);
|
||||||
|
|
||||||
this.setPreload(options.preload !== undefined ? options.preload : 0);
|
this.setPreload(options.preload !== undefined ? options.preload : 0);
|
||||||
this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?
|
this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?
|
||||||
@@ -109,8 +109,6 @@ class TileLayer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(TileLayer, Layer);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the associated {@link module:ol/source/Tile tilesource} of the layer.
|
* Return the associated {@link module:ol/source/Tile tilesource} of the layer.
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ const Property = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class VectorLayer extends Layer {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Vector data that is rendered client-side.
|
* Vector data that is rendered client-side.
|
||||||
@@ -91,7 +92,6 @@ const Property = {
|
|||||||
* @param {module:ol/layer/Vector~Options=} opt_options Options.
|
* @param {module:ol/layer/Vector~Options=} opt_options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class VectorLayer {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
const options = opt_options ?
|
const options = opt_options ?
|
||||||
opt_options : /** @type {module:ol/layer/Vector~Options} */ ({});
|
opt_options : /** @type {module:ol/layer/Vector~Options} */ ({});
|
||||||
@@ -102,7 +102,7 @@ class VectorLayer {
|
|||||||
delete baseOptions.renderBuffer;
|
delete baseOptions.renderBuffer;
|
||||||
delete baseOptions.updateWhileAnimating;
|
delete baseOptions.updateWhileAnimating;
|
||||||
delete baseOptions.updateWhileInteracting;
|
delete baseOptions.updateWhileInteracting;
|
||||||
Layer.call(this, /** @type {module:ol/layer/Layer~Options} */ (baseOptions));
|
super(baseOptions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -263,8 +263,6 @@ class VectorLayer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(VectorLayer, Layer);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the associated {@link module:ol/source/Vector vectorsource} of the layer.
|
* Return the associated {@link module:ol/source/Vector vectorsource} of the layer.
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ export const RenderType = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class VectorTileLayer extends VectorLayer {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer for vector tile data that is rendered client-side.
|
* Layer for vector tile data that is rendered client-side.
|
||||||
@@ -99,7 +100,6 @@ export const RenderType = {
|
|||||||
* @param {module:ol/layer/VectorTile~Options=} opt_options Options.
|
* @param {module:ol/layer/VectorTile~Options=} opt_options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class VectorTileLayer {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
const options = opt_options ? opt_options : {};
|
const options = opt_options ? opt_options : {};
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ class VectorTileLayer {
|
|||||||
|
|
||||||
delete baseOptions.preload;
|
delete baseOptions.preload;
|
||||||
delete baseOptions.useInterimTilesOnError;
|
delete baseOptions.useInterimTilesOnError;
|
||||||
VectorLayer.call(this, /** @type {module:ol/layer/Vector~Options} */ (baseOptions));
|
super(baseOptions);
|
||||||
|
|
||||||
this.setPreload(options.preload ? options.preload : 0);
|
this.setPreload(options.preload ? options.preload : 0);
|
||||||
this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?
|
this.setUseInterimTilesOnError(options.useInterimTilesOnError !== undefined ?
|
||||||
@@ -174,8 +174,6 @@ class VectorTileLayer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(VectorTileLayer, VectorLayer);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the associated {@link module:ol/source/VectorTile vectortilesource} of the layer.
|
* Return the associated {@link module:ol/source/VectorTile vectortilesource} of the layer.
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import {inherits} from '../util.js';
|
|||||||
import Disposable from '../Disposable.js';
|
import Disposable from '../Disposable.js';
|
||||||
import Polygon from '../geom/Polygon.js';
|
import Polygon from '../geom/Polygon.js';
|
||||||
|
|
||||||
|
class RenderBox extends Disposable {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/Disposable}
|
* @extends {module:ol/Disposable}
|
||||||
* @param {string} className CSS class name.
|
* @param {string} className CSS class name.
|
||||||
*/
|
*/
|
||||||
class RenderBox {
|
|
||||||
constructor(className) {
|
constructor(className) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -126,7 +126,5 @@ class RenderBox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(RenderBox, Disposable);
|
|
||||||
|
|
||||||
|
|
||||||
export default RenderBox;
|
export default RenderBox;
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
import {inherits} from '../util.js';
|
import {inherits} from '../util.js';
|
||||||
import Event from '../events/Event.js';
|
import Event from '../events/Event.js';
|
||||||
|
|
||||||
|
class RenderEvent extends Event {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/events/Event}
|
* @extends {module:ol/events/Event}
|
||||||
@@ -13,11 +15,9 @@ import Event from '../events/Event.js';
|
|||||||
* @param {?CanvasRenderingContext2D=} opt_context Context.
|
* @param {?CanvasRenderingContext2D=} opt_context Context.
|
||||||
* @param {?module:ol/webgl/Context=} opt_glContext WebGL Context.
|
* @param {?module:ol/webgl/Context=} opt_glContext WebGL Context.
|
||||||
*/
|
*/
|
||||||
class RenderEvent {
|
|
||||||
|
|
||||||
constructor(type, opt_vectorContext, opt_frameState, opt_context, opt_glContext) {
|
constructor(type, opt_vectorContext, opt_frameState, opt_context, opt_glContext) {
|
||||||
|
|
||||||
Event.call(this, type);
|
super(type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For canvas, this is an instance of {@link module:ol/render/canvas/Immediate}.
|
* For canvas, this is an instance of {@link module:ol/render/canvas/Immediate}.
|
||||||
@@ -53,5 +53,4 @@ class RenderEvent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(RenderEvent, Event);
|
|
||||||
export default RenderEvent;
|
export default RenderEvent;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {inherits} from '../../util.js';
|
|||||||
import CanvasInstruction from '../canvas/Instruction.js';
|
import CanvasInstruction from '../canvas/Instruction.js';
|
||||||
import CanvasReplay from '../canvas/Replay.js';
|
import CanvasReplay from '../canvas/Replay.js';
|
||||||
|
|
||||||
|
class CanvasImageReplay extends CanvasReplay {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/canvas/Replay}
|
* @extends {module:ol/render/canvas/Replay}
|
||||||
@@ -16,10 +17,8 @@ import CanvasReplay from '../canvas/Replay.js';
|
|||||||
* @param {?} declutterTree Declutter tree.
|
* @param {?} declutterTree Declutter tree.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class CanvasImageReplay {
|
|
||||||
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
|
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
|
||||||
CanvasReplay.call(this,
|
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
|
||||||
tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -225,7 +224,5 @@ class CanvasImageReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CanvasImageReplay, CanvasReplay);
|
|
||||||
|
|
||||||
|
|
||||||
export default CanvasImageReplay;
|
export default CanvasImageReplay;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import VectorContext from '../VectorContext.js';
|
|||||||
import {defaultTextAlign, defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline, defaultFont} from '../canvas.js';
|
import {defaultTextAlign, defaultFillStyle, defaultLineCap, defaultLineDash, defaultLineDashOffset, defaultLineJoin, defaultLineWidth, defaultMiterLimit, defaultStrokeStyle, defaultTextBaseline, defaultFont} from '../canvas.js';
|
||||||
import {create as createTransform, compose as composeTransform} from '../../transform.js';
|
import {create as createTransform, compose as composeTransform} from '../../transform.js';
|
||||||
|
|
||||||
|
class CanvasImmediateRenderer extends VectorContext {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* A concrete subclass of {@link module:ol/render/VectorContext} that implements
|
* A concrete subclass of {@link module:ol/render/VectorContext} that implements
|
||||||
@@ -35,9 +36,8 @@ import {create as createTransform, compose as composeTransform} from '../../tran
|
|||||||
* @param {number} viewRotation View rotation.
|
* @param {number} viewRotation View rotation.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class CanvasImmediateRenderer {
|
|
||||||
constructor(context, pixelRatio, extent, transform, viewRotation) {
|
constructor(context, pixelRatio, extent, transform, viewRotation) {
|
||||||
VectorContext.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -943,7 +943,5 @@ class CanvasImmediateRenderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CanvasImmediateRenderer, VectorContext);
|
|
||||||
|
|
||||||
|
|
||||||
export default CanvasImmediateRenderer;
|
export default CanvasImmediateRenderer;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {inherits} from '../../util.js';
|
|||||||
import CanvasInstruction, {strokeInstruction, beginPathInstruction} from '../canvas/Instruction.js';
|
import CanvasInstruction, {strokeInstruction, beginPathInstruction} from '../canvas/Instruction.js';
|
||||||
import CanvasReplay from '../canvas/Replay.js';
|
import CanvasReplay from '../canvas/Replay.js';
|
||||||
|
|
||||||
|
class CanvasLineStringReplay extends CanvasReplay {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/canvas/Replay}
|
* @extends {module:ol/render/canvas/Replay}
|
||||||
@@ -16,10 +17,8 @@ import CanvasReplay from '../canvas/Replay.js';
|
|||||||
* @param {?} declutterTree Declutter tree.
|
* @param {?} declutterTree Declutter tree.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class CanvasLineStringReplay {
|
|
||||||
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
|
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
|
||||||
CanvasReplay.call(this,
|
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
|
||||||
tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -118,7 +117,5 @@ class CanvasLineStringReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CanvasLineStringReplay, CanvasReplay);
|
|
||||||
|
|
||||||
|
|
||||||
export default CanvasLineStringReplay;
|
export default CanvasLineStringReplay;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import CanvasInstruction, {
|
|||||||
import CanvasReplay from '../canvas/Replay.js';
|
import CanvasReplay from '../canvas/Replay.js';
|
||||||
|
|
||||||
|
|
||||||
|
class CanvasPolygonReplay extends CanvasReplay {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/canvas/Replay}
|
* @extends {module:ol/render/canvas/Replay}
|
||||||
@@ -22,10 +23,8 @@ import CanvasReplay from '../canvas/Replay.js';
|
|||||||
* @param {?} declutterTree Declutter tree.
|
* @param {?} declutterTree Declutter tree.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class CanvasPolygonReplay {
|
|
||||||
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
|
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
|
||||||
CanvasReplay.call(this,
|
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
|
||||||
tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -215,7 +214,5 @@ class CanvasPolygonReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CanvasPolygonReplay, CanvasReplay);
|
|
||||||
|
|
||||||
|
|
||||||
export default CanvasPolygonReplay;
|
export default CanvasPolygonReplay;
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const tmpExtent = createEmpty();
|
|||||||
const tmpTransform = createTransform();
|
const tmpTransform = createTransform();
|
||||||
|
|
||||||
|
|
||||||
|
class CanvasReplay extends VectorContext {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/VectorContext}
|
* @extends {module:ol/render/VectorContext}
|
||||||
@@ -52,9 +53,8 @@ const tmpTransform = createTransform();
|
|||||||
* @param {?} declutterTree Declutter tree.
|
* @param {?} declutterTree Declutter tree.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class CanvasReplay {
|
|
||||||
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
|
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
|
||||||
VectorContext.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {?}
|
* @type {?}
|
||||||
@@ -1082,8 +1082,6 @@ class CanvasReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CanvasReplay, VectorContext);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FIXME empty description for jsdoc
|
* FIXME empty description for jsdoc
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ const BATCH_CONSTRUCTORS = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class CanvasReplayGroup extends ReplayGroup {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/ReplayGroup}
|
* @extends {module:ol/render/ReplayGroup}
|
||||||
@@ -46,7 +47,6 @@ const BATCH_CONSTRUCTORS = {
|
|||||||
* @param {number=} opt_renderBuffer Optional rendering buffer.
|
* @param {number=} opt_renderBuffer Optional rendering buffer.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class CanvasReplayGroup {
|
|
||||||
constructor(
|
constructor(
|
||||||
tolerance,
|
tolerance,
|
||||||
maxExtent,
|
maxExtent,
|
||||||
@@ -56,7 +56,7 @@ class CanvasReplayGroup {
|
|||||||
declutterTree,
|
declutterTree,
|
||||||
opt_renderBuffer
|
opt_renderBuffer
|
||||||
) {
|
) {
|
||||||
ReplayGroup.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Declutter tree.
|
* Declutter tree.
|
||||||
@@ -407,8 +407,6 @@ class CanvasReplayGroup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CanvasReplayGroup, ReplayGroup);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This cache is used for storing calculated pixel circles for increasing performance.
|
* This cache is used for storing calculated pixel circles for increasing performance.
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import CanvasReplay from '../canvas/Replay.js';
|
|||||||
import {TEXT_ALIGN} from '../replay.js';
|
import {TEXT_ALIGN} from '../replay.js';
|
||||||
import TextPlacement from '../../style/TextPlacement.js';
|
import TextPlacement from '../../style/TextPlacement.js';
|
||||||
|
|
||||||
|
class CanvasTextReplay extends CanvasReplay {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/canvas/Replay}
|
* @extends {module:ol/render/canvas/Replay}
|
||||||
@@ -25,10 +26,8 @@ import TextPlacement from '../../style/TextPlacement.js';
|
|||||||
* @param {?} declutterTree Declutter tree.
|
* @param {?} declutterTree Declutter tree.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class CanvasTextReplay {
|
|
||||||
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
|
constructor(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree) {
|
||||||
CanvasReplay.call(this,
|
super(tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
|
||||||
tolerance, maxExtent, resolution, pixelRatio, overlaps, declutterTree);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -521,8 +520,6 @@ class CanvasTextReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CanvasTextReplay, CanvasReplay);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} font Font to use for measuring.
|
* @param {string} font Font to use for measuring.
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {DEFAULT_LINEDASH, DEFAULT_LINEDASHOFFSET, DEFAULT_STROKESTYLE,
|
|||||||
import {FLOAT} from '../../webgl.js';
|
import {FLOAT} from '../../webgl.js';
|
||||||
import WebGLBuffer from '../../webgl/Buffer.js';
|
import WebGLBuffer from '../../webgl/Buffer.js';
|
||||||
|
|
||||||
|
class WebGLCircleReplay extends WebGLReplay {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/webgl/Replay}
|
* @extends {module:ol/render/webgl/Replay}
|
||||||
@@ -22,9 +23,8 @@ import WebGLBuffer from '../../webgl/Buffer.js';
|
|||||||
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class WebGLCircleReplay {
|
|
||||||
constructor(tolerance, maxExtent) {
|
constructor(tolerance, maxExtent) {
|
||||||
WebGLReplay.call(this, tolerance, maxExtent);
|
super(tolerance, maxExtent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -404,7 +404,5 @@ class WebGLCircleReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLCircleReplay, WebGLReplay);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLCircleReplay;
|
export default WebGLCircleReplay;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import {getUid, inherits} from '../../util.js';
|
|||||||
import WebGLTextureReplay from '../webgl/TextureReplay.js';
|
import WebGLTextureReplay from '../webgl/TextureReplay.js';
|
||||||
import WebGLBuffer from '../../webgl/Buffer.js';
|
import WebGLBuffer from '../../webgl/Buffer.js';
|
||||||
|
|
||||||
|
class WebGLImageReplay extends WebGLTextureReplay {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/webgl/TextureReplay}
|
* @extends {module:ol/render/webgl/TextureReplay}
|
||||||
@@ -12,9 +13,8 @@ import WebGLBuffer from '../../webgl/Buffer.js';
|
|||||||
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class WebGLImageReplay {
|
|
||||||
constructor(tolerance, maxExtent) {
|
constructor(tolerance, maxExtent) {
|
||||||
WebGLTextureReplay.call(this, tolerance, maxExtent);
|
super(tolerance, maxExtent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {Array.<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}
|
* @type {Array.<HTMLCanvasElement|HTMLImageElement|HTMLVideoElement>}
|
||||||
@@ -163,7 +163,5 @@ class WebGLImageReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLImageReplay, WebGLTextureReplay);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLImageReplay;
|
export default WebGLImageReplay;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import ReplayType from '../ReplayType.js';
|
|||||||
import VectorContext from '../VectorContext.js';
|
import VectorContext from '../VectorContext.js';
|
||||||
import WebGLReplayGroup from '../webgl/ReplayGroup.js';
|
import WebGLReplayGroup from '../webgl/ReplayGroup.js';
|
||||||
|
|
||||||
|
class WebGLImmediateRenderer extends VectorContext {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/VectorContext}
|
* @extends {module:ol/render/VectorContext}
|
||||||
@@ -20,9 +21,8 @@ import WebGLReplayGroup from '../webgl/ReplayGroup.js';
|
|||||||
* @param {number} pixelRatio Pixel ratio.
|
* @param {number} pixelRatio Pixel ratio.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class WebGLImmediateRenderer {
|
|
||||||
constructor(context, center, resolution, rotation, size, extent, pixelRatio) {
|
constructor(context, center, resolution, rotation, size, extent, pixelRatio) {
|
||||||
VectorContext.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -385,7 +385,5 @@ class WebGLImmediateRenderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLImmediateRenderer, VectorContext);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLImmediateRenderer;
|
export default WebGLImmediateRenderer;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ const Instruction = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class WebGLLineStringReplay extends WebGLReplay {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/webgl/Replay}
|
* @extends {module:ol/render/webgl/Replay}
|
||||||
@@ -42,9 +43,8 @@ const Instruction = {
|
|||||||
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class WebGLLineStringReplay {
|
|
||||||
constructor(tolerance, maxExtent) {
|
constructor(tolerance, maxExtent) {
|
||||||
WebGLReplay.call(this, tolerance, maxExtent);
|
super(tolerance, maxExtent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -666,7 +666,5 @@ class WebGLLineStringReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLLineStringReplay, WebGLReplay);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLLineStringReplay;
|
export default WebGLLineStringReplay;
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import WebGLBuffer from '../../webgl/Buffer.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class WebGLPolygonReplay extends WebGLReplay {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/webgl/Replay}
|
* @extends {module:ol/render/webgl/Replay}
|
||||||
@@ -43,9 +44,8 @@ import WebGLBuffer from '../../webgl/Buffer.js';
|
|||||||
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class WebGLPolygonReplay {
|
|
||||||
constructor(tolerance, maxExtent) {
|
constructor(tolerance, maxExtent) {
|
||||||
WebGLReplay.call(this, tolerance, maxExtent);
|
super(tolerance, maxExtent);
|
||||||
|
|
||||||
this.lineStringReplay = new WebGLLineStringReplay(
|
this.lineStringReplay = new WebGLLineStringReplay(
|
||||||
tolerance, maxExtent);
|
tolerance, maxExtent);
|
||||||
@@ -1045,7 +1045,5 @@ class WebGLPolygonReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLPolygonReplay, WebGLReplay);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLPolygonReplay;
|
export default WebGLPolygonReplay;
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {create, fromTransform} from '../../vec/mat4.js';
|
|||||||
import {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, TRIANGLES,
|
import {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, TRIANGLES,
|
||||||
UNSIGNED_INT, UNSIGNED_SHORT} from '../../webgl.js';
|
UNSIGNED_INT, UNSIGNED_SHORT} from '../../webgl.js';
|
||||||
|
|
||||||
|
class WebGLReplay extends VectorContext {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @abstract
|
* @abstract
|
||||||
@@ -23,9 +24,8 @@ import {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, TRIANGLES,
|
|||||||
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class WebGLReplay {
|
|
||||||
constructor(tolerance, maxExtent) {
|
constructor(tolerance, maxExtent) {
|
||||||
VectorContext.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @protected
|
* @protected
|
||||||
@@ -359,7 +359,5 @@ class WebGLReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLReplay, VectorContext);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLReplay;
|
export default WebGLReplay;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ const BATCH_CONSTRUCTORS = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class WebGLReplayGroup extends ReplayGroup {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/ReplayGroup}
|
* @extends {module:ol/render/ReplayGroup}
|
||||||
@@ -40,9 +41,8 @@ const BATCH_CONSTRUCTORS = {
|
|||||||
* @param {number=} opt_renderBuffer Render buffer.
|
* @param {number=} opt_renderBuffer Render buffer.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class WebGLReplayGroup {
|
|
||||||
constructor(tolerance, maxExtent, opt_renderBuffer) {
|
constructor(tolerance, maxExtent, opt_renderBuffer) {
|
||||||
ReplayGroup.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {module:ol/extent~Extent}
|
* @type {module:ol/extent~Extent}
|
||||||
@@ -341,7 +341,5 @@ class WebGLReplayGroup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLReplayGroup, ReplayGroup);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLReplayGroup;
|
export default WebGLReplayGroup;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import WebGLBuffer from '../../webgl/Buffer.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class WebGLTextReplay extends WebGLTextureReplay {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/render/webgl/TextureReplay}
|
* @extends {module:ol/render/webgl/TextureReplay}
|
||||||
@@ -29,9 +30,8 @@ import WebGLBuffer from '../../webgl/Buffer.js';
|
|||||||
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class WebGLTextReplay {
|
|
||||||
constructor(tolerance, maxExtent) {
|
constructor(tolerance, maxExtent) {
|
||||||
WebGLTextureReplay.call(this, tolerance, maxExtent);
|
super(tolerance, maxExtent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -457,7 +457,5 @@ class WebGLTextReplay {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLTextReplay, WebGLTextureReplay);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLTextReplay;
|
export default WebGLTextReplay;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import WebGLReplay from '../webgl/Replay.js';
|
|||||||
import {CLAMP_TO_EDGE, FLOAT, TEXTURE_2D} from '../../webgl.js';
|
import {CLAMP_TO_EDGE, FLOAT, TEXTURE_2D} from '../../webgl.js';
|
||||||
import {createTexture} from '../../webgl/Context.js';
|
import {createTexture} from '../../webgl/Context.js';
|
||||||
|
|
||||||
|
class WebGLTextureReplay extends WebGLReplay {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @abstract
|
* @abstract
|
||||||
@@ -18,9 +19,8 @@ import {createTexture} from '../../webgl/Context.js';
|
|||||||
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
||||||
* @struct
|
* @struct
|
||||||
*/
|
*/
|
||||||
class WebGLTextureReplay {
|
|
||||||
constructor(tolerance, maxExtent) {
|
constructor(tolerance, maxExtent) {
|
||||||
WebGLReplay.call(this, tolerance, maxExtent);
|
super(tolerance, maxExtent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {number|undefined}
|
* @type {number|undefined}
|
||||||
@@ -478,7 +478,5 @@ class WebGLTextureReplay {
|
|||||||
getHitDetectionTextures() {}
|
getHitDetectionTextures() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLTextureReplay, WebGLReplay);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLTextureReplay;
|
export default WebGLTextureReplay;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import Triangulation from '../reproj/Triangulation.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class ReprojImage extends ImageBase {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Class encapsulating single reprojected image.
|
* Class encapsulating single reprojected image.
|
||||||
@@ -32,7 +33,6 @@ import Triangulation from '../reproj/Triangulation.js';
|
|||||||
* @param {module:ol/reproj/Image~FunctionType} getImageFunction
|
* @param {module:ol/reproj/Image~FunctionType} getImageFunction
|
||||||
* Function returning source images (extent, resolution, pixelRatio).
|
* Function returning source images (extent, resolution, pixelRatio).
|
||||||
*/
|
*/
|
||||||
class ReprojImage {
|
|
||||||
constructor(
|
constructor(
|
||||||
sourceProj,
|
sourceProj,
|
||||||
targetProj,
|
targetProj,
|
||||||
@@ -119,7 +119,7 @@ class ReprojImage {
|
|||||||
state = ImageState.IDLE;
|
state = ImageState.IDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageBase.call(this, targetExtent, targetResolution, this.sourcePixelRatio_, state);
|
super(targetExtent, targetResolution, this.sourcePixelRatio_, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -200,7 +200,5 @@ class ReprojImage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ReprojImage, ImageBase);
|
|
||||||
|
|
||||||
|
|
||||||
export default ReprojImage;
|
export default ReprojImage;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import Triangulation from '../reproj/Triangulation.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class ReprojTile extends Tile {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Class encapsulating single reprojected tile.
|
* Class encapsulating single reprojected tile.
|
||||||
@@ -38,7 +39,6 @@ import Triangulation from '../reproj/Triangulation.js';
|
|||||||
* @param {number=} opt_errorThreshold Acceptable reprojection error (in px).
|
* @param {number=} opt_errorThreshold Acceptable reprojection error (in px).
|
||||||
* @param {boolean=} opt_renderEdges Render reprojection edges.
|
* @param {boolean=} opt_renderEdges Render reprojection edges.
|
||||||
*/
|
*/
|
||||||
class ReprojTile {
|
|
||||||
constructor(
|
constructor(
|
||||||
sourceProj,
|
sourceProj,
|
||||||
sourceTileGrid,
|
sourceTileGrid,
|
||||||
@@ -52,7 +52,7 @@ class ReprojTile {
|
|||||||
opt_errorThreshold,
|
opt_errorThreshold,
|
||||||
opt_renderEdges
|
opt_renderEdges
|
||||||
) {
|
) {
|
||||||
Tile.call(this, tileCoord, TileState.IDLE);
|
super(tileCoord, TileState.IDLE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -314,7 +314,5 @@ class ReprojTile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ReprojTile, Tile);
|
|
||||||
|
|
||||||
|
|
||||||
export default ReprojTile;
|
export default ReprojTile;
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ const TOS_ATTRIBUTION = '<a class="ol-attribution-bing-tos" ' +
|
|||||||
* To disable the opacity transition, pass `transition: 0`.
|
* To disable the opacity transition, pass `transition: 0`.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
class BingMaps extends TileImage {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for Bing Maps tile data.
|
* Layer source for Bing Maps tile data.
|
||||||
@@ -53,7 +54,6 @@ const TOS_ATTRIBUTION = '<a class="ol-attribution-bing-tos" ' +
|
|||||||
* @param {module:ol/source/BingMaps~Options=} options Bing Maps options.
|
* @param {module:ol/source/BingMaps~Options=} options Bing Maps options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class BingMaps {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,7 +62,7 @@ class BingMaps {
|
|||||||
*/
|
*/
|
||||||
this.hidpi_ = options.hidpi !== undefined ? options.hidpi : false;
|
this.hidpi_ = options.hidpi !== undefined ? options.hidpi : false;
|
||||||
|
|
||||||
TileImage.call(this, {
|
super({
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: 'anonymous',
|
crossOrigin: 'anonymous',
|
||||||
opaque: true,
|
opaque: true,
|
||||||
@@ -223,6 +223,4 @@ class BingMaps {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(BingMaps, TileImage);
|
|
||||||
|
|
||||||
export default BingMaps;
|
export default BingMaps;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import XYZ from '../source/XYZ.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class CartoDB extends XYZ {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for the CartoDB Maps API.
|
* Layer source for the CartoDB Maps API.
|
||||||
@@ -40,7 +41,6 @@ import XYZ from '../source/XYZ.js';
|
|||||||
* @param {module:ol/source/CartoDB~Options=} options CartoDB options.
|
* @param {module:ol/source/CartoDB~Options=} options CartoDB options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class CartoDB {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,7 +67,7 @@ class CartoDB {
|
|||||||
*/
|
*/
|
||||||
this.templateCache_ = {};
|
this.templateCache_ = {};
|
||||||
|
|
||||||
XYZ.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
@@ -182,7 +182,5 @@ class CartoDB {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CartoDB, XYZ);
|
|
||||||
|
|
||||||
|
|
||||||
export default CartoDB;
|
export default CartoDB;
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import VectorSource from '../source/Vector.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class Cluster extends VectorSource {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source to cluster vector data. Works out of the box with point
|
* Layer source to cluster vector data. Works out of the box with point
|
||||||
@@ -47,9 +48,8 @@ import VectorSource from '../source/Vector.js';
|
|||||||
* @extends {module:ol/source/Vector}
|
* @extends {module:ol/source/Vector}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class Cluster {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
VectorSource.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
@@ -212,7 +212,5 @@ class Cluster {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(Cluster, VectorSource);
|
|
||||||
|
|
||||||
|
|
||||||
export default Cluster;
|
export default Cluster;
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ const ImageSourceEventType = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class ImageSourceEvent extends Event {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this
|
* Events emitted by {@link module:ol/source/Image~ImageSource} instances are instances of this
|
||||||
@@ -51,11 +53,9 @@ const ImageSourceEventType = {
|
|||||||
* @param {string} type Type.
|
* @param {string} type Type.
|
||||||
* @param {module:ol/Image} image The image.
|
* @param {module:ol/Image} image The image.
|
||||||
*/
|
*/
|
||||||
class ImageSourceEvent {
|
|
||||||
|
|
||||||
constructor(type, image) {
|
constructor(type, image) {
|
||||||
|
|
||||||
Event.call(this, type);
|
super(type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The image related to the event.
|
* The image related to the event.
|
||||||
@@ -68,8 +68,6 @@ class ImageSourceEvent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ImageSourceEvent, Event);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
@@ -81,6 +79,7 @@ inherits(ImageSourceEvent, Event);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class ImageSource extends Source {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Abstract base class; normally only used for creating subclasses and not
|
* Abstract base class; normally only used for creating subclasses and not
|
||||||
@@ -93,9 +92,8 @@ inherits(ImageSourceEvent, Event);
|
|||||||
* @param {module:ol/source/Image~Options} options Single image source options.
|
* @param {module:ol/source/Image~Options} options Single image source options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class ImageSource {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
Source.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
@@ -227,8 +225,6 @@ class ImageSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ImageSource, Source);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default image load function for image sources that use module:ol/Image~Image image
|
* Default image load function for image sources that use module:ol/Image~Image image
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import {appendParams} from '../uri.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class ImageArcGISRest extends ImageSource {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Source for data from ArcGIS Rest services providing single, untiled images.
|
* Source for data from ArcGIS Rest services providing single, untiled images.
|
||||||
@@ -54,12 +55,11 @@ import {appendParams} from '../uri.js';
|
|||||||
* @param {module:ol/source/ImageArcGISRest~Options=} opt_options Image ArcGIS Rest Options.
|
* @param {module:ol/source/ImageArcGISRest~Options=} opt_options Image ArcGIS Rest Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class ImageArcGISRest {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
|
|
||||||
ImageSource.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
resolutions: options.resolutions
|
resolutions: options.resolutions
|
||||||
@@ -289,7 +289,5 @@ class ImageArcGISRest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ImageArcGISRest, ImageSource);
|
|
||||||
|
|
||||||
|
|
||||||
export default ImageArcGISRest;
|
export default ImageArcGISRest;
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ import ImageSource from '../source/Image.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class ImageCanvasSource extends ImageSource {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Base class for image sources where a canvas element is the image.
|
* Base class for image sources where a canvas element is the image.
|
||||||
@@ -51,10 +52,9 @@ import ImageSource from '../source/Image.js';
|
|||||||
* @param {module:ol/source/ImageCanvas~Options=} options ImageCanvas options.
|
* @param {module:ol/source/ImageCanvas~Options=} options ImageCanvas options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class ImageCanvasSource {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
ImageSource.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
resolutions: options.resolutions,
|
resolutions: options.resolutions,
|
||||||
@@ -121,7 +121,5 @@ class ImageCanvasSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ImageCanvasSource, ImageSource);
|
|
||||||
|
|
||||||
|
|
||||||
export default ImageCanvasSource;
|
export default ImageCanvasSource;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ import {appendParams} from '../uri.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class ImageMapGuide extends ImageSource {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Source for images from Mapguide servers
|
* Source for images from Mapguide servers
|
||||||
@@ -42,10 +43,9 @@ import {appendParams} from '../uri.js';
|
|||||||
* @param {module:ol/source/ImageMapGuide~Options=} options ImageMapGuide options.
|
* @param {module:ol/source/ImageMapGuide~Options=} options ImageMapGuide options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class ImageMapGuide {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
ImageSource.call(this, {
|
super({
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
resolutions: options.resolutions
|
resolutions: options.resolutions
|
||||||
});
|
});
|
||||||
@@ -234,8 +234,6 @@ class ImageMapGuide {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ImageMapGuide, ImageSource);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {module:ol/extent~Extent} extent The map extents.
|
* @param {module:ol/extent~Extent} extent The map extents.
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import ImageSource, {defaultImageLoadFunction} from '../source/Image.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class Static extends ImageSource {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* A layer source for displaying a single, static image.
|
* A layer source for displaying a single, static image.
|
||||||
@@ -37,7 +38,6 @@ import ImageSource, {defaultImageLoadFunction} from '../source/Image.js';
|
|||||||
* @param {module:ol/source/ImageStatic~Options=} options ImageStatic options.
|
* @param {module:ol/source/ImageStatic~Options=} options ImageStatic options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class Static {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
const imageExtent = options.imageExtent;
|
const imageExtent = options.imageExtent;
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ class Static {
|
|||||||
options.imageLoadFunction !== undefined ?
|
options.imageLoadFunction !== undefined ?
|
||||||
options.imageLoadFunction : defaultImageLoadFunction;
|
options.imageLoadFunction : defaultImageLoadFunction;
|
||||||
|
|
||||||
ImageSource.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
projection: getProjection(options.projection)
|
projection: getProjection(options.projection)
|
||||||
});
|
});
|
||||||
@@ -109,7 +109,5 @@ class Static {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(Static, ImageSource);
|
|
||||||
|
|
||||||
|
|
||||||
export default Static;
|
export default Static;
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ const GETFEATUREINFO_IMAGE_SIZE = [101, 101];
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class ImageWMS extends ImageSource {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Source for WMS servers providing single, untiled images.
|
* Source for WMS servers providing single, untiled images.
|
||||||
@@ -61,12 +62,11 @@ const GETFEATUREINFO_IMAGE_SIZE = [101, 101];
|
|||||||
* @param {module:ol/source/ImageWMS~Options=} [opt_options] ImageWMS options.
|
* @param {module:ol/source/ImageWMS~Options=} [opt_options] ImageWMS options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class ImageWMS {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
|
|
||||||
ImageSource.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
resolutions: options.resolutions
|
resolutions: options.resolutions
|
||||||
@@ -385,7 +385,5 @@ class ImageWMS {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(ImageWMS, ImageSource);
|
|
||||||
|
|
||||||
|
|
||||||
export default ImageWMS;
|
export default ImageWMS;
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ export const ATTRIBUTION = '© ' +
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class OSM extends XYZ {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for the OpenStreetMap tile server.
|
* Layer source for the OpenStreetMap tile server.
|
||||||
@@ -50,8 +52,6 @@ export const ATTRIBUTION = '© ' +
|
|||||||
* @param {module:ol/source/OSM~Options=} [opt_options] Open Street Map options.
|
* @param {module:ol/source/OSM~Options=} [opt_options] Open Street Map options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class OSM {
|
|
||||||
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
@@ -69,7 +69,7 @@ class OSM {
|
|||||||
const url = options.url !== undefined ?
|
const url = options.url !== undefined ?
|
||||||
options.url : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
options.url : 'https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||||
|
|
||||||
XYZ.call(this, {
|
super({
|
||||||
attributions: attributions,
|
attributions: attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: crossOrigin,
|
crossOrigin: crossOrigin,
|
||||||
@@ -85,6 +85,4 @@ class OSM {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(OSM, XYZ);
|
|
||||||
|
|
||||||
export default OSM;
|
export default OSM;
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ const RasterOperationType = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
class RasterSourceEvent extends Event {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Events emitted by {@link module:ol/source/Raster} instances are instances of this
|
* Events emitted by {@link module:ol/source/Raster} instances are instances of this
|
||||||
@@ -83,10 +85,8 @@ const RasterOperationType = {
|
|||||||
* @param {module:ol/PluggableMap~FrameState} frameState The frame state.
|
* @param {module:ol/PluggableMap~FrameState} frameState The frame state.
|
||||||
* @param {Object} data An object made available to operations.
|
* @param {Object} data An object made available to operations.
|
||||||
*/
|
*/
|
||||||
class RasterSourceEvent {
|
|
||||||
|
|
||||||
constructor(type, frameState, data) {
|
constructor(type, frameState, data) {
|
||||||
Event.call(this, type);
|
super(type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The raster extent.
|
* The raster extent.
|
||||||
@@ -114,8 +114,6 @@ class RasterSourceEvent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(RasterSourceEvent, Event);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
* @property {Array.<module:ol/source/Source|module:ol/layer/Layer>} sources Input
|
* @property {Array.<module:ol/source/Source|module:ol/layer/Layer>} sources Input
|
||||||
@@ -137,6 +135,7 @@ inherits(RasterSourceEvent, Event);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class RasterSource extends ImageSource {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* A source that transforms data from any number of input sources using an
|
* A source that transforms data from any number of input sources using an
|
||||||
@@ -149,7 +148,6 @@ inherits(RasterSourceEvent, Event);
|
|||||||
* @param {module:ol/source/Raster~Options=} options Options.
|
* @param {module:ol/source/Raster~Options=} options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class RasterSource {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -245,7 +243,7 @@ class RasterSource {
|
|||||||
wantedTiles: {}
|
wantedTiles: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
ImageSource.call(this, {});
|
super({});
|
||||||
|
|
||||||
if (options.operation !== undefined) {
|
if (options.operation !== undefined) {
|
||||||
this.setOperation(options.operation, options.lib);
|
this.setOperation(options.operation, options.lib);
|
||||||
@@ -421,8 +419,6 @@ class RasterSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(RasterSource, ImageSource);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A reusable canvas context.
|
* A reusable canvas context.
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ import SourceState from '../source/State.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class Source extends BaseObject {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Abstract base class; normally only used for creating subclasses and not
|
* Abstract base class; normally only used for creating subclasses and not
|
||||||
@@ -51,10 +52,9 @@ import SourceState from '../source/State.js';
|
|||||||
* @param {module:ol/source/Source~Options} options Source options.
|
* @param {module:ol/source/Source~Options} options Source options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class Source {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
BaseObject.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -177,8 +177,6 @@ class Source {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(Source, BaseObject);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||||
* @param {number} resolution Resolution.
|
* @param {number} resolution Resolution.
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ const ProviderConfig = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class Stamen extends XYZ {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for the Stamen tile server.
|
* Layer source for the Stamen tile server.
|
||||||
@@ -118,8 +120,6 @@ const ProviderConfig = {
|
|||||||
* @param {module:ol/source/Stamen~Options=} options Stamen options.
|
* @param {module:ol/source/Stamen~Options=} options Stamen options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class Stamen {
|
|
||||||
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
const i = options.layer.indexOf('-');
|
const i = options.layer.indexOf('-');
|
||||||
const provider = i == -1 ? options.layer : options.layer.slice(0, i);
|
const provider = i == -1 ? options.layer : options.layer.slice(0, i);
|
||||||
@@ -131,7 +131,7 @@ class Stamen {
|
|||||||
'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' + options.layer +
|
'https://stamen-tiles-{a-d}.a.ssl.fastly.net/' + options.layer +
|
||||||
'/{z}/{x}/{y}.' + layerConfig.extension;
|
'/{z}/{x}/{y}.' + layerConfig.extension;
|
||||||
|
|
||||||
XYZ.call(this, {
|
super({
|
||||||
attributions: ATTRIBUTIONS,
|
attributions: ATTRIBUTIONS,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: 'anonymous',
|
crossOrigin: 'anonymous',
|
||||||
@@ -148,6 +148,4 @@ class Stamen {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(Stamen, XYZ);
|
|
||||||
|
|
||||||
export default Stamen;
|
export default Stamen;
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import {wrapX, getForProjection as getTileGridForProjection} from '../tilegrid.j
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class TileSource extends Source {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Abstract base class; normally only used for creating subclasses and not
|
* Abstract base class; normally only used for creating subclasses and not
|
||||||
@@ -39,10 +40,9 @@ import {wrapX, getForProjection as getTileGridForProjection} from '../tilegrid.j
|
|||||||
* @param {module:ol/source/Tile~Options=} options SourceTile source options.
|
* @param {module:ol/source/Tile~Options=} options SourceTile source options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class TileSource {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
Source.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
@@ -295,8 +295,6 @@ class TileSource {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(TileSource, Source);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Marks a tile coord as being used, without triggering a load.
|
* Marks a tile coord as being used, without triggering a load.
|
||||||
@@ -318,11 +316,11 @@ TileSource.prototype.useTile = UNDEFINED;
|
|||||||
* @param {string} type Type.
|
* @param {string} type Type.
|
||||||
* @param {module:ol/Tile} tile The tile.
|
* @param {module:ol/Tile} tile The tile.
|
||||||
*/
|
*/
|
||||||
export class TileSourceEvent {
|
export class TileSourceEvent extends Event {
|
||||||
|
|
||||||
constructor(type, tile) {
|
constructor(type, tile) {
|
||||||
|
|
||||||
Event.call(this, type);
|
super(type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The tile related to the event.
|
* The tile related to the event.
|
||||||
@@ -335,6 +333,4 @@ export class TileSourceEvent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(TileSourceEvent, Event);
|
|
||||||
|
|
||||||
export default TileSource;
|
export default TileSource;
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ import {appendParams} from '../uri.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class TileArcGISRest extends TileImage {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for tile data from ArcGIS Rest services. Map and Image
|
* Layer source for tile data from ArcGIS Rest services. Map and Image
|
||||||
@@ -64,12 +65,11 @@ import {appendParams} from '../uri.js';
|
|||||||
* @param {module:ol/source/TileArcGISRest~Options=} opt_options Tile ArcGIS Rest options.
|
* @param {module:ol/source/TileArcGISRest~Options=} opt_options Tile ArcGIS Rest options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class TileArcGISRest {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
|
|
||||||
TileImage.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
@@ -216,7 +216,5 @@ class TileArcGISRest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(TileArcGISRest, TileImage);
|
|
||||||
|
|
||||||
|
|
||||||
export default TileArcGISRest;
|
export default TileArcGISRest;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import TileSource from '../source/Tile.js';
|
|||||||
import {getKeyZXY} from '../tilecoord.js';
|
import {getKeyZXY} from '../tilecoord.js';
|
||||||
|
|
||||||
|
|
||||||
|
class LabeledTile extends Tile {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @extends {module:ol/Tile}
|
* @extends {module:ol/Tile}
|
||||||
@@ -17,10 +18,9 @@ import {getKeyZXY} from '../tilecoord.js';
|
|||||||
* @param {module:ol/size~Size} tileSize Tile size.
|
* @param {module:ol/size~Size} tileSize Tile size.
|
||||||
* @param {string} text Text.
|
* @param {string} text Text.
|
||||||
*/
|
*/
|
||||||
class LabeledTile {
|
|
||||||
constructor(tileCoord, tileSize, text) {
|
constructor(tileCoord, tileSize, text) {
|
||||||
|
|
||||||
Tile.call(this, tileCoord, TileState.LOADED);
|
super(tileCoord, TileState.LOADED);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -73,8 +73,6 @@ class LabeledTile {
|
|||||||
load() {}
|
load() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(LabeledTile, Tile);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
@@ -84,6 +82,7 @@ inherits(LabeledTile, Tile);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class TileDebug extends TileSource {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* A pseudo tile source, which does not fetch tiles from a server, but renders
|
* A pseudo tile source, which does not fetch tiles from a server, but renders
|
||||||
@@ -97,10 +96,9 @@ inherits(LabeledTile, Tile);
|
|||||||
* @param {module:ol/source/TileDebug~Options=} options Debug tile options.
|
* @param {module:ol/source/TileDebug~Options=} options Debug tile options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class TileDebug {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
TileSource.call(this, {
|
super({
|
||||||
opaque: false,
|
opaque: false,
|
||||||
projection: options.projection,
|
projection: options.projection,
|
||||||
tileGrid: options.tileGrid,
|
tileGrid: options.tileGrid,
|
||||||
@@ -129,7 +127,5 @@ class TileDebug {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(TileDebug, TileSource);
|
|
||||||
|
|
||||||
|
|
||||||
export default TileDebug;
|
export default TileDebug;
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class TileImage extends UrlTile {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Base class for sources providing images divided into a tile grid.
|
* Base class for sources providing images divided into a tile grid.
|
||||||
@@ -64,10 +65,9 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
|
|||||||
* @param {module:ol/source/TileImage~Options=} options Image tile options.
|
* @param {module:ol/source/TileImage~Options=} options Image tile options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class TileImage {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
UrlTile.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
@@ -389,8 +389,6 @@ class TileImage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(TileImage, UrlTile);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {module:ol/ImageTile} imageTile Image tile.
|
* @param {module:ol/ImageTile} imageTile Image tile.
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class TileJSON extends TileImage {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for tile data in TileJSON format.
|
* Layer source for tile data in TileJSON format.
|
||||||
@@ -53,7 +54,6 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
|||||||
* @param {module:ol/source/TileJSON~Options=} options TileJSON options.
|
* @param {module:ol/source/TileJSON~Options=} options TileJSON options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class TileJSON {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -62,7 +62,7 @@ class TileJSON {
|
|||||||
*/
|
*/
|
||||||
this.tileJSON_ = null;
|
this.tileJSON_ = null;
|
||||||
|
|
||||||
TileImage.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
@@ -182,7 +182,5 @@ class TileJSON {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(TileJSON, TileImage);
|
|
||||||
|
|
||||||
|
|
||||||
export default TileJSON;
|
export default TileJSON;
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ import {appendParams} from '../uri.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class TileWMS extends TileImage {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for tile data from WMS servers.
|
* Layer source for tile data from WMS servers.
|
||||||
@@ -80,7 +81,6 @@ import {appendParams} from '../uri.js';
|
|||||||
* @param {module:ol/source/TileWMS~Options=} [opt_options] Tile WMS options.
|
* @param {module:ol/source/TileWMS~Options=} [opt_options] Tile WMS options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class TileWMS {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
@@ -89,7 +89,7 @@ class TileWMS {
|
|||||||
|
|
||||||
const transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;
|
const transparent = 'TRANSPARENT' in params ? params['TRANSPARENT'] : true;
|
||||||
|
|
||||||
TileImage.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
@@ -388,7 +388,5 @@ class TileWMS {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(TileWMS, TileImage);
|
|
||||||
|
|
||||||
|
|
||||||
export default TileWMS;
|
export default TileWMS;
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
|||||||
* @param {boolean} preemptive Load the tile when visible (before it's needed).
|
* @param {boolean} preemptive Load the tile when visible (before it's needed).
|
||||||
* @param {boolean} jsonp Load the tile as a script.
|
* @param {boolean} jsonp Load the tile as a script.
|
||||||
*/
|
*/
|
||||||
export class CustomTile {
|
export class CustomTile extends Tile {
|
||||||
|
|
||||||
constructor(tileCoord, state, src, extent, preemptive, jsonp) {
|
constructor(tileCoord, state, src, extent, preemptive, jsonp) {
|
||||||
|
|
||||||
Tile.call(this, tileCoord, state);
|
super(tileCoord, state);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -80,8 +80,6 @@ export class CustomTile {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CustomTile, Tile);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the image element for this tile.
|
* Get the image element for this tile.
|
||||||
@@ -271,6 +269,8 @@ CustomTile.prototype.load = function() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class UTFGrid extends TileSource {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for UTFGrid interaction data loaded from TileJSON format.
|
* Layer source for UTFGrid interaction data loaded from TileJSON format.
|
||||||
@@ -280,10 +280,8 @@ CustomTile.prototype.load = function() {
|
|||||||
* @param {module:ol/source/UTFGrid~Options=} options Source options.
|
* @param {module:ol/source/UTFGrid~Options=} options Source options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class UTFGrid {
|
|
||||||
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
TileSource.call(this, {
|
super({
|
||||||
projection: getProjection('EPSG:3857'),
|
projection: getProjection('EPSG:3857'),
|
||||||
state: SourceState.LOADING
|
state: SourceState.LOADING
|
||||||
});
|
});
|
||||||
@@ -334,8 +332,6 @@ class UTFGrid {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(UTFGrid, TileSource);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import {getKeyZXY} from '../tilecoord.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class UrlTile extends TileSource {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Base class for sources providing tiles divided into a tile grid over http.
|
* Base class for sources providing tiles divided into a tile grid over http.
|
||||||
@@ -37,10 +38,9 @@ import {getKeyZXY} from '../tilecoord.js';
|
|||||||
* @extends {module:ol/source/Tile}
|
* @extends {module:ol/source/Tile}
|
||||||
* @param {module:ol/source/UrlTile~Options=} options Image tile options.
|
* @param {module:ol/source/UrlTile~Options=} options Image tile options.
|
||||||
*/
|
*/
|
||||||
class UrlTile {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
TileSource.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
@@ -205,8 +205,6 @@ class UrlTile {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(UrlTile, TileSource);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {module:ol/Tile~UrlFunction|undefined}
|
* @type {module:ol/Tile~UrlFunction|undefined}
|
||||||
|
|||||||
@@ -41,11 +41,11 @@ import RBush from '../structs/RBush.js';
|
|||||||
* @param {string} type Type.
|
* @param {string} type Type.
|
||||||
* @param {module:ol/Feature=} opt_feature Feature.
|
* @param {module:ol/Feature=} opt_feature Feature.
|
||||||
*/
|
*/
|
||||||
export class VectorSourceEvent {
|
export class VectorSourceEvent extends Event {
|
||||||
|
|
||||||
constructor(type, opt_feature) {
|
constructor(type, opt_feature) {
|
||||||
|
|
||||||
Event.call(this, type);
|
super(type);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The feature being added or removed.
|
* The feature being added or removed.
|
||||||
@@ -58,8 +58,6 @@ export class VectorSourceEvent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(VectorSourceEvent, Event);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} Options
|
* @typedef {Object} Options
|
||||||
@@ -151,6 +149,8 @@ inherits(VectorSourceEvent, Event);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class VectorSource extends Source {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Provides a source of features for vector layers. Vector features provided
|
* Provides a source of features for vector layers. Vector features provided
|
||||||
@@ -163,13 +163,11 @@ inherits(VectorSourceEvent, Event);
|
|||||||
* @param {module:ol/source/Vector~Options=} opt_options Vector source options.
|
* @param {module:ol/source/Vector~Options=} opt_options Vector source options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class VectorSource {
|
|
||||||
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
|
|
||||||
Source.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
projection: undefined,
|
projection: undefined,
|
||||||
state: SourceState.READY,
|
state: SourceState.READY,
|
||||||
@@ -282,8 +280,6 @@ class VectorSource {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(VectorSource, Source);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a single feature to the source. If you want to add a batch of features
|
* Add a single feature to the source. If you want to add a batch of features
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class VectorTile extends UrlTile {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Class for layer sources providing vector data divided into a tile grid, to be
|
* Class for layer sources providing vector data divided into a tile grid, to be
|
||||||
@@ -74,8 +76,6 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
|||||||
* @param {module:ol/source/VectorTile~Options=} options Vector tile options.
|
* @param {module:ol/source/VectorTile~Options=} options Vector tile options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class VectorTile {
|
|
||||||
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
const projection = options.projection || 'EPSG:3857';
|
const projection = options.projection || 'EPSG:3857';
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ class VectorTile {
|
|||||||
tileSize: options.tileSize || 512
|
tileSize: options.tileSize || 512
|
||||||
});
|
});
|
||||||
|
|
||||||
UrlTile.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize !== undefined ? options.cacheSize : 128,
|
cacheSize: options.cacheSize !== undefined ? options.cacheSize : 128,
|
||||||
extent: extent,
|
extent: extent,
|
||||||
@@ -139,8 +139,6 @@ class VectorTile {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(VectorTile, UrlTile);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {boolean} The source can have overlapping geometries.
|
* @return {boolean} The source can have overlapping geometries.
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ import {appendParams} from '../uri.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class WMTS extends TileImage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for tile data from WMTS servers.
|
* Layer source for tile data from WMTS servers.
|
||||||
@@ -65,8 +67,6 @@ import {appendParams} from '../uri.js';
|
|||||||
* @param {module:ol/source/WMTS~Options=} options WMTS options.
|
* @param {module:ol/source/WMTS~Options=} options WMTS options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class WMTS {
|
|
||||||
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
|
|
||||||
// TODO: add support for TileMatrixLimits
|
// TODO: add support for TileMatrixLimits
|
||||||
@@ -199,7 +199,7 @@ class WMTS {
|
|||||||
const tileUrlFunction = (urls && urls.length > 0) ?
|
const tileUrlFunction = (urls && urls.length > 0) ?
|
||||||
createFromTileUrlFunctions(urls.map(this.createFromWMTSTemplate_)) : nullTileUrlFunction;
|
createFromTileUrlFunctions(urls.map(this.createFromWMTSTemplate_)) : nullTileUrlFunction;
|
||||||
|
|
||||||
TileImage.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
@@ -221,8 +221,6 @@ class WMTS {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WMTS, TileImage);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the URLs to use for requests.
|
* Set the URLs to use for requests.
|
||||||
* URLs may contain OCG conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.
|
* URLs may contain OCG conform URL Template Variables: {TileMatrix}, {TileRow}, {TileCol}.
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class XYZ extends TileImage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for tile data with URLs in a set XYZ format that are
|
* Layer source for tile data with URLs in a set XYZ format that are
|
||||||
@@ -66,8 +68,6 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
|||||||
* @param {module:ol/source/XYZ~Options=} opt_options XYZ options.
|
* @param {module:ol/source/XYZ~Options=} opt_options XYZ options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class XYZ {
|
|
||||||
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
const projection = options.projection !== undefined ?
|
const projection = options.projection !== undefined ?
|
||||||
@@ -81,7 +81,7 @@ class XYZ {
|
|||||||
tileSize: options.tileSize
|
tileSize: options.tileSize
|
||||||
});
|
});
|
||||||
|
|
||||||
TileImage.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
@@ -102,6 +102,4 @@ class XYZ {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(XYZ, TileImage);
|
|
||||||
|
|
||||||
export default XYZ;
|
export default XYZ;
|
||||||
|
|||||||
@@ -34,11 +34,11 @@ const TierSizeCalculation = {
|
|||||||
* @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function.
|
* @param {module:ol/Tile~LoadFunction} tileLoadFunction Tile load function.
|
||||||
* @param {module:ol/Tile~Options=} opt_options Tile options.
|
* @param {module:ol/Tile~Options=} opt_options Tile options.
|
||||||
*/
|
*/
|
||||||
export class CustomTile {
|
export class CustomTile extends ImageTile {
|
||||||
|
|
||||||
constructor(tileGrid, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {
|
constructor(tileGrid, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options) {
|
||||||
|
|
||||||
ImageTile.call(this, tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options);
|
super(tileCoord, state, src, crossOrigin, tileLoadFunction, opt_options);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -56,8 +56,6 @@ export class CustomTile {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CustomTile, ImageTile);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
@@ -119,6 +117,8 @@ CustomTile.prototype.getImage = function() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class Zoomify extends TileImage {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Layer source for tile data in Zoomify format (both Zoomify and Internet
|
* Layer source for tile data in Zoomify format (both Zoomify and Internet
|
||||||
@@ -129,8 +129,6 @@ CustomTile.prototype.getImage = function() {
|
|||||||
* @param {module:ol/source/Zoomify~Options=} opt_options Options.
|
* @param {module:ol/source/Zoomify~Options=} opt_options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class Zoomify {
|
|
||||||
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
@@ -245,7 +243,7 @@ class Zoomify {
|
|||||||
|
|
||||||
const ZoomifyTileClass = CustomTile.bind(null, tileGrid);
|
const ZoomifyTileClass = CustomTile.bind(null, tileGrid);
|
||||||
|
|
||||||
TileImage.call(this, {
|
super({
|
||||||
attributions: options.attributions,
|
attributions: options.attributions,
|
||||||
cacheSize: options.cacheSize,
|
cacheSize: options.cacheSize,
|
||||||
crossOrigin: options.crossOrigin,
|
crossOrigin: options.crossOrigin,
|
||||||
@@ -261,6 +259,4 @@ class Zoomify {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(Zoomify, TileImage);
|
|
||||||
|
|
||||||
export default Zoomify;
|
export default Zoomify;
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import EventType from '../events/EventType.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class LRUCache extends EventTarget {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements a Least-Recently-Used cache where the keys do not conflict with
|
* Implements a Least-Recently-Used cache where the keys do not conflict with
|
||||||
* Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring
|
* Object's properties (e.g. 'hasOwnProperty' is not allowed as a key). Expiring
|
||||||
@@ -27,11 +29,9 @@ import EventType from '../events/EventType.js';
|
|||||||
* @template T
|
* @template T
|
||||||
* @param {number=} opt_highWaterMark High water mark.
|
* @param {number=} opt_highWaterMark High water mark.
|
||||||
*/
|
*/
|
||||||
class LRUCache {
|
|
||||||
|
|
||||||
constructor(opt_highWaterMark) {
|
constructor(opt_highWaterMark) {
|
||||||
|
|
||||||
EventTarget.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {number}
|
* @type {number}
|
||||||
@@ -298,6 +298,4 @@ class LRUCache {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(LRUCache, EventTarget);
|
|
||||||
|
|
||||||
export default LRUCache;
|
export default LRUCache;
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import RegularShape from '../style/RegularShape.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class CircleStyle extends RegularShape {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Set circle style for vector features.
|
* Set circle style for vector features.
|
||||||
@@ -29,12 +30,11 @@ import RegularShape from '../style/RegularShape.js';
|
|||||||
* @extends {module:ol/style/RegularShape}
|
* @extends {module:ol/style/RegularShape}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class CircleStyle {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
|
|
||||||
RegularShape.call(this, {
|
super({
|
||||||
points: Infinity,
|
points: Infinity,
|
||||||
fill: options.fill,
|
fill: options.fill,
|
||||||
radius: options.radius,
|
radius: options.radius,
|
||||||
@@ -76,7 +76,5 @@ class CircleStyle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(CircleStyle, RegularShape);
|
|
||||||
|
|
||||||
|
|
||||||
export default CircleStyle;
|
export default CircleStyle;
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ import ImageStyle from '../style/Image.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class Icon extends ImageStyle {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Set icon style for vector features.
|
* Set icon style for vector features.
|
||||||
@@ -61,7 +62,6 @@ import ImageStyle from '../style/Image.js';
|
|||||||
* @extends {module:ol/style/Image}
|
* @extends {module:ol/style/Image}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class Icon {
|
|
||||||
constructor(opt_options) {
|
constructor(opt_options) {
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
@@ -203,7 +203,7 @@ class Icon {
|
|||||||
const snapToPixel = options.snapToPixel !== undefined ?
|
const snapToPixel = options.snapToPixel !== undefined ?
|
||||||
options.snapToPixel : true;
|
options.snapToPixel : true;
|
||||||
|
|
||||||
ImageStyle.call(this, {
|
super({
|
||||||
opacity: opacity,
|
opacity: opacity,
|
||||||
rotation: rotation,
|
rotation: rotation,
|
||||||
scale: scale,
|
scale: scale,
|
||||||
@@ -418,7 +418,5 @@ class Icon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(Icon, ImageStyle);
|
|
||||||
|
|
||||||
|
|
||||||
export default Icon;
|
export default Icon;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import EventType from '../events/EventType.js';
|
|||||||
import ImageState from '../ImageState.js';
|
import ImageState from '../ImageState.js';
|
||||||
import {shared as iconImageCache} from '../style/IconImageCache.js';
|
import {shared as iconImageCache} from '../style/IconImageCache.js';
|
||||||
|
|
||||||
|
class IconImage extends EventTarget {
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
* @param {HTMLImageElement|HTMLCanvasElement} image Image.
|
* @param {HTMLImageElement|HTMLCanvasElement} image Image.
|
||||||
@@ -19,10 +20,9 @@ import {shared as iconImageCache} from '../style/IconImageCache.js';
|
|||||||
* @param {module:ol/color~Color} color Color.
|
* @param {module:ol/color~Color} color Color.
|
||||||
* @extends {module:ol/events/EventTarget}
|
* @extends {module:ol/events/EventTarget}
|
||||||
*/
|
*/
|
||||||
class IconImage {
|
|
||||||
constructor(image, src, size, crossOrigin, imageState, color) {
|
constructor(image, src, size, crossOrigin, imageState, color) {
|
||||||
|
|
||||||
EventTarget.call(this);
|
super();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -241,8 +241,6 @@ class IconImage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(IconImage, EventTarget);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {HTMLImageElement|HTMLCanvasElement} image Image.
|
* @param {HTMLImageElement|HTMLCanvasElement} image Image.
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ import ImageStyle from '../style/Image.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class RegularShape extends ImageStyle {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Set regular shape style for vector features. The resulting shape will be
|
* Set regular shape style for vector features. The resulting shape will be
|
||||||
@@ -57,7 +58,6 @@ import ImageStyle from '../style/Image.js';
|
|||||||
* @extends {module:ol/style/Image}
|
* @extends {module:ol/style/Image}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class RegularShape {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
@@ -164,7 +164,7 @@ class RegularShape {
|
|||||||
const rotateWithView = options.rotateWithView !== undefined ?
|
const rotateWithView = options.rotateWithView !== undefined ?
|
||||||
options.rotateWithView : false;
|
options.rotateWithView : false;
|
||||||
|
|
||||||
ImageStyle.call(this, {
|
super({
|
||||||
opacity: 1,
|
opacity: 1,
|
||||||
rotateWithView: rotateWithView,
|
rotateWithView: rotateWithView,
|
||||||
rotation: options.rotation !== undefined ? options.rotation : 0,
|
rotation: options.rotation !== undefined ? options.rotation : 0,
|
||||||
@@ -591,7 +591,5 @@ class RegularShape {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(RegularShape, ImageStyle);
|
|
||||||
|
|
||||||
|
|
||||||
export default RegularShape;
|
export default RegularShape;
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ import TileGrid from '../tilegrid/TileGrid.js';
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
class WMTSTileGrid extends TileGrid {
|
||||||
/**
|
/**
|
||||||
* @classdesc
|
* @classdesc
|
||||||
* Set the grid pattern for sources accessing WMTS tiled-image servers.
|
* Set the grid pattern for sources accessing WMTS tiled-image servers.
|
||||||
@@ -55,16 +56,13 @@ import TileGrid from '../tilegrid/TileGrid.js';
|
|||||||
* @struct
|
* @struct
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
class WMTSTileGrid {
|
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
* @type {!Array.<string>}
|
* @type {!Array.<string>}
|
||||||
*/
|
*/
|
||||||
this.matrixIds_ = options.matrixIds;
|
this.matrixIds_ = options.matrixIds;
|
||||||
// FIXME: should the matrixIds become optional?
|
super({
|
||||||
|
|
||||||
TileGrid.call(this, {
|
|
||||||
extent: options.extent,
|
extent: options.extent,
|
||||||
origin: options.origin,
|
origin: options.origin,
|
||||||
origins: options.origins,
|
origins: options.origins,
|
||||||
@@ -93,8 +91,6 @@ class WMTSTileGrid {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WMTSTileGrid, TileGrid);
|
|
||||||
|
|
||||||
|
|
||||||
export default WMTSTileGrid;
|
export default WMTSTileGrid;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import ContextEventType from '../webgl/ContextEventType.js';
|
|||||||
*
|
*
|
||||||
* @extends {module:ol/Disposable}
|
* @extends {module:ol/Disposable}
|
||||||
*/
|
*/
|
||||||
class WebGLContext {
|
class WebGLContext extends Disposable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {HTMLCanvasElement} canvas Canvas.
|
* @param {HTMLCanvasElement} canvas Canvas.
|
||||||
@@ -305,8 +305,6 @@ class WebGLContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLContext, Disposable);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {WebGLRenderingContext} gl WebGL rendering context.
|
* @param {WebGLRenderingContext} gl WebGL rendering context.
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ import WebGLShader from '../webgl/Shader.js';
|
|||||||
/**
|
/**
|
||||||
* @extends {module:ol/webgl/Shader}
|
* @extends {module:ol/webgl/Shader}
|
||||||
*/
|
*/
|
||||||
class WebGLFragment {
|
class WebGLFragment extends WebGLShader {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} source Source.
|
* @param {string} source Source.
|
||||||
*/
|
*/
|
||||||
constructor(source) {
|
constructor(source) {
|
||||||
WebGLShader.call(this, source);
|
super(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,7 +25,5 @@ class WebGLFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLFragment, WebGLShader);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLFragment;
|
export default WebGLFragment;
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ import WebGLShader from '../webgl/Shader.js';
|
|||||||
/**
|
/**
|
||||||
* @extends {module:ol/webgl/Shader}
|
* @extends {module:ol/webgl/Shader}
|
||||||
*/
|
*/
|
||||||
class WebGLVertex {
|
class WebGLVertex extends WebGLShader {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} source Source.
|
* @param {string} source Source.
|
||||||
*/
|
*/
|
||||||
constructor(source) {
|
constructor(source) {
|
||||||
WebGLShader.call(this, source);
|
super(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -25,7 +25,5 @@ class WebGLVertex {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inherits(WebGLVertex, WebGLShader);
|
|
||||||
|
|
||||||
|
|
||||||
export default WebGLVertex;
|
export default WebGLVertex;
|
||||||
|
|||||||
Reference in New Issue
Block a user