Merge pull request #8101 from fredj/jsdoc_module
More Jsdoc module fixes
This commit is contained in:
@@ -27,7 +27,7 @@ import RenderFeature from '../render/Feature.js';
|
||||
* @property {function((module:ol/geom/Geometry~Geometry|Object.<string,*>)=)|function(module:ol/geom/GeometryType~GeometryType,Array.<number>,(Array.<number>|Array.<Array.<number>>),Object.<string,*>,number)} [featureClass]
|
||||
* Class for features returned by {@link ol.format.MVT#readFeatures}. Set to
|
||||
* {@link module:ol/Feature~Feature} to get full editing and geometry support at the cost of
|
||||
* decreased rendering performance. The default is {@link ol.render.Feature},
|
||||
* decreased rendering performance. The default is {@link module:ol/render/Feature~RenderFeature},
|
||||
* which is optimized for rendering and hit detection.
|
||||
* @property {string} [geometryName='geometry'] Geometry name to use when creating
|
||||
* features.
|
||||
@@ -297,7 +297,7 @@ function getGeometryType(type, numEnds) {
|
||||
* @param {ol.ext.PBF} pbf PBF
|
||||
* @param {Object} rawFeature Raw Mapbox feature.
|
||||
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
|
||||
* @return {module:ol/Feature~Feature|ol.render.Feature} Feature.
|
||||
* @return {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} Feature.
|
||||
*/
|
||||
MVT.prototype.createFeature_ = function(pbf, rawFeature, opt_options) {
|
||||
const type = rawFeature.type;
|
||||
@@ -387,7 +387,7 @@ MVT.prototype.readFeatures = function(source, opt_options) {
|
||||
|
||||
const pbf = new PBF(/** @type {ArrayBuffer} */ (source));
|
||||
const pbfLayers = pbf.readFields(layersPBFReader, {});
|
||||
/** @type {Array.<module:ol/Feature~Feature|ol.render.Feature>} */
|
||||
/** @type {Array.<module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature>} */
|
||||
const features = [];
|
||||
for (const name in pbfLayers) {
|
||||
if (layers && layers.indexOf(name) == -1) {
|
||||
|
||||
@@ -64,7 +64,7 @@ const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/layer/Vector~VectorLayer}
|
||||
* @fires ol.render.Event
|
||||
* @fires module:ol/render/Event~RenderEvent
|
||||
* @param {module:ol/layer/Heatmap~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
@@ -259,7 +259,7 @@ Heatmap.prototype.handleStyleChanged_ = function() {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.Event} event Post compose event
|
||||
* @param {module:ol/render/Event~RenderEvent} event Post compose event
|
||||
* @private
|
||||
*/
|
||||
Heatmap.prototype.handleRender_ = function(event) {
|
||||
|
||||
@@ -36,7 +36,7 @@ import Layer from '../layer/Layer.js';
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/layer/Layer~Layer}
|
||||
* @fires ol.render.Event
|
||||
* @fires module:ol/render/Event~RenderEvent
|
||||
* @param {module:ol/layer/Image~Options=} opt_options Layer options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,7 @@ import SourceState from '../source/State.js';
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {module:ol/layer/Base~BaseLayer}
|
||||
* @fires ol.render.Event
|
||||
* @fires module:ol/render/Event~RenderEvent
|
||||
* @param {module:ol/layer/Layer~Options} options Layer options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ import {assign} from '../obj.js';
|
||||
* be visible.
|
||||
* @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`
|
||||
* means no preloading.
|
||||
* @property {ol.source.Tile} [source] Source for this layer.
|
||||
* @property {module:ol/source/Tile~TileSource} [source] Source for this layer.
|
||||
* @property {module:ol/PluggableMap~PluggableMap} [map] Sets the layer as overlay on a map. The map will not manage
|
||||
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
||||
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
||||
@@ -41,7 +41,7 @@ import {assign} from '../obj.js';
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/layer/Layer~Layer}
|
||||
* @fires ol.render.Event
|
||||
* @fires module:ol/render/Event~RenderEvent
|
||||
* @param {module:ol/layer/Tile~Options=} opt_options Tile layer options.
|
||||
* @api
|
||||
*/
|
||||
@@ -84,7 +84,7 @@ TileLayer.prototype.getPreload = function() {
|
||||
/**
|
||||
* Return the associated {@link ol.source.Tile tilesource} of the layer.
|
||||
* @function
|
||||
* @return {ol.source.Tile} Source.
|
||||
* @return {module:ol/source/Tile~TileSource} Source.
|
||||
* @api
|
||||
*/
|
||||
TileLayer.prototype.getSource;
|
||||
|
||||
@@ -21,7 +21,7 @@ import {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style.
|
||||
* visible.
|
||||
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
|
||||
* be visible.
|
||||
* @property {ol.RenderOrderFunction} [renderOrder] Render order. Function to be used when sorting
|
||||
* @property {module:ol/render~OrderFunction} [renderOrder] Render order. Function to be used when sorting
|
||||
* features before rendering. By default features are drawn in the order that they are created. Use
|
||||
* `null` to avoid the sort, but get an undefined draw order.
|
||||
* @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the
|
||||
@@ -70,7 +70,7 @@ const Property = {
|
||||
*
|
||||
* @constructor
|
||||
* @extends {module:ol/layer/Layer~Layer}
|
||||
* @fires ol.render.Event
|
||||
* @fires module:ol/render/Event~RenderEvent
|
||||
* @param {module:ol/layer/Vector~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -22,7 +22,7 @@ import {assign} from '../obj.js';
|
||||
* visible.
|
||||
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
|
||||
* be visible.
|
||||
* @property {ol.RenderOrderFunction} [renderOrder] Render order. Function to be used when sorting
|
||||
* @property {module:ol/render~OrderFunction} [renderOrder] Render order. Function to be used when sorting
|
||||
* features before rendering. By default features are drawn in the order that they are created. Use
|
||||
* `null` to avoid the sort, but get an undefined draw order.
|
||||
* @property {number} [renderBuffer=100] The buffer in pixels around the tile extent used by the
|
||||
@@ -60,7 +60,7 @@ import {assign} from '../obj.js';
|
||||
* recreated during interactions. See also `updateWhileAnimating`.
|
||||
* @property {number} [preload=0] Preload. Load low-resolution tiles up to `preload` levels. `0`
|
||||
* means no preloading.
|
||||
* @property {ol.RenderOrderFunction} [renderOrder] Render order. Function to be used when sorting
|
||||
* @property {module:ol/render~OrderFunction} [renderOrder] Render order. Function to be used when sorting
|
||||
* features before rendering. By default features are drawn in the order that they are created.
|
||||
* @property {(module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>|module:ol/style~StyleFunction)} [style] Layer style. See
|
||||
* {@link ol.style} for default style which will be used if this is not defined.
|
||||
|
||||
@@ -8,8 +8,8 @@ import Event from '../events/Event.js';
|
||||
* @constructor
|
||||
* @extends {module:ol/events/Event~Event}
|
||||
* @implements {oli.render.Event}
|
||||
* @param {ol.render.EventType} type Type.
|
||||
* @param {ol.render.VectorContext=} opt_vectorContext Vector context.
|
||||
* @param {module:ol/render/EventType~EventType} type Type.
|
||||
* @param {module:ol/render/VectorContext~VectorContext=} opt_vectorContext Vector context.
|
||||
* @param {module:ol/PluggableMap~FrameState=} opt_frameState Frame state.
|
||||
* @param {?CanvasRenderingContext2D=} opt_context Context.
|
||||
* @param {?module:ol/webgl/Context~WebGLContext=} opt_glContext WebGL Context.
|
||||
@@ -22,7 +22,7 @@ const RenderEvent = function(
|
||||
|
||||
/**
|
||||
* For canvas, this is an instance of {@link ol.render.canvas.Immediate}.
|
||||
* @type {ol.render.VectorContext|undefined}
|
||||
* @type {module:ol/render/VectorContext~VectorContext|undefined}
|
||||
* @api
|
||||
*/
|
||||
this.vectorContext = opt_vectorContext;
|
||||
|
||||
@@ -7,17 +7,17 @@
|
||||
*/
|
||||
export default {
|
||||
/**
|
||||
* @event ol.render.Event#postcompose
|
||||
* @event module:ol/render/Event~RenderEvent#postcompose
|
||||
* @api
|
||||
*/
|
||||
POSTCOMPOSE: 'postcompose',
|
||||
/**
|
||||
* @event ol.render.Event#precompose
|
||||
* @event module:ol/render/Event~RenderEvent#precompose
|
||||
* @api
|
||||
*/
|
||||
PRECOMPOSE: 'precompose',
|
||||
/**
|
||||
* @event ol.render.Event#render
|
||||
* @event module:ol/render/Event~RenderEvent#render
|
||||
* @api
|
||||
*/
|
||||
RENDER: 'render'
|
||||
|
||||
@@ -207,7 +207,7 @@ RenderFeature.prototype.getFlatCoordinates =
|
||||
/**
|
||||
* For API compatibility with {@link module:ol/Feature~Feature}, this method is useful when
|
||||
* determining the geometry type in style function (see {@link #getType}).
|
||||
* @return {ol.render.Feature} Feature.
|
||||
* @return {module:ol/render/Feature~RenderFeature} Feature.
|
||||
* @api
|
||||
*/
|
||||
RenderFeature.prototype.getGeometry = function() {
|
||||
@@ -227,7 +227,7 @@ RenderFeature.prototype.getProperties = function() {
|
||||
|
||||
/**
|
||||
* Get the feature for working with its geometry.
|
||||
* @return {ol.render.Feature} Feature.
|
||||
* @return {module:ol/render/Feature~RenderFeature} Feature.
|
||||
*/
|
||||
RenderFeature.prototype.getSimplifiedGeometry =
|
||||
RenderFeature.prototype.getGeometry;
|
||||
|
||||
@@ -12,8 +12,8 @@ const ReplayGroup = function() {};
|
||||
/**
|
||||
* @abstract
|
||||
* @param {number|undefined} zIndex Z index.
|
||||
* @param {ol.render.ReplayType} replayType Replay type.
|
||||
* @return {ol.render.VectorContext} Replay.
|
||||
* @param {module:ol/render/ReplayType~ReplayType} replayType Replay type.
|
||||
* @return {module:ol/render/VectorContext~VectorContext} Replay.
|
||||
*/
|
||||
ReplayGroup.prototype.getReplay = function(zIndex, replayType) {};
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ const VectorContext = function() {
|
||||
* Render a geometry with a custom renderer.
|
||||
*
|
||||
* @param {module:ol/geom/SimpleGeometry~SimpleGeometry} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @param {Function} renderer Renderer.
|
||||
*/
|
||||
VectorContext.prototype.drawCustom = function(geometry, feature, renderer) {};
|
||||
@@ -62,54 +62,50 @@ VectorContext.prototype.drawGeometryCollection = function(geometryCollectionGeom
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/LineString~LineString|ol.render.Feature} lineStringGeometry Line
|
||||
* string geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/LineString~LineString|module:ol/render/Feature~RenderFeature} lineStringGeometry Line string geometry.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawLineString = function(lineStringGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString|ol.render.Feature} multiLineStringGeometry
|
||||
* MultiLineString geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString|module:ol/render/Feature~RenderFeature} multiLineStringGeometry MultiLineString geometry.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawMultiLineString = function(multiLineStringGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint|ol.render.Feature} multiPointGeometry MultiPoint
|
||||
* geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint|module:ol/render/Feature~RenderFeature} multiPointGeometry MultiPoint geometry.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawMultiPoint = function(multiPointGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/MultiPolygon~MultiPolygon} multiPolygonGeometry MultiPolygon geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawMultiPolygon = function(multiPolygonGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/Point~Point|ol.render.Feature} pointGeometry Point geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/Point~Point|module:ol/render/Feature~RenderFeature} pointGeometry Point geometry.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawPoint = function(pointGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/Polygon~Polygon|ol.render.Feature} polygonGeometry Polygon
|
||||
* geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/Polygon~Polygon|module:ol/render/Feature~RenderFeature} polygonGeometry Polygon geometry.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawPolygon = function(polygonGeometry, feature) {};
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
VectorContext.prototype.drawText = function(geometry, feature) {};
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import CanvasReplay from '../canvas/Replay.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.canvas.Replay}
|
||||
* @extends {module:ol/render/canvas/Replay~CanvasReplay}
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
|
||||
* @param {number} resolution Resolution.
|
||||
|
||||
@@ -19,15 +19,15 @@ import {create as createTransform, compose as composeTransform} from '../../tran
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* A concrete subclass of {@link ol.render.VectorContext} that implements
|
||||
* A concrete subclass of {@link module:ol/render/VectorContext~VectorContext} that implements
|
||||
* direct rendering of features and geometries to an HTML5 Canvas context.
|
||||
* Instances of this class are created internally by the library and
|
||||
* provided to application code as vectorContext member of the
|
||||
* {@link ol.render.Event} object associated with postcompose, precompose and
|
||||
* {@link module:ol/render/Event~RenderEvent} object associated with postcompose, precompose and
|
||||
* render events emitted by layers and maps.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.render.VectorContext}
|
||||
* @extends {module:ol/render/VectorContext~VectorContext}
|
||||
* @param {CanvasRenderingContext2D} context Context.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/extent~Extent} extent Extent.
|
||||
@@ -450,7 +450,7 @@ CanvasImmediateRenderer.prototype.setStyle = function(style) {
|
||||
* Render a geometry into the canvas. Call
|
||||
* {@link ol.render.canvas.Immediate#setStyle} first to set the rendering style.
|
||||
*
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry The geometry to render.
|
||||
* @param {module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature} geometry The geometry to render.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
@@ -526,7 +526,7 @@ CanvasImmediateRenderer.prototype.drawGeometryCollection = function(geometry) {
|
||||
* Render a Point geometry into the canvas. Rendering is immediate and uses
|
||||
* the current style.
|
||||
*
|
||||
* @param {module:ol/geom/Point~Point|ol.render.Feature} geometry Point geometry.
|
||||
* @param {module:ol/geom/Point~Point|module:ol/render/Feature~RenderFeature} geometry Point geometry.
|
||||
* @override
|
||||
*/
|
||||
CanvasImmediateRenderer.prototype.drawPoint = function(geometry) {
|
||||
@@ -545,7 +545,7 @@ CanvasImmediateRenderer.prototype.drawPoint = function(geometry) {
|
||||
* Render a MultiPoint geometry into the canvas. Rendering is immediate and
|
||||
* uses the current style.
|
||||
*
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint|ol.render.Feature} geometry MultiPoint geometry.
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint|module:ol/render/Feature~RenderFeature} geometry MultiPoint geometry.
|
||||
* @override
|
||||
*/
|
||||
CanvasImmediateRenderer.prototype.drawMultiPoint = function(geometry) {
|
||||
@@ -564,7 +564,7 @@ CanvasImmediateRenderer.prototype.drawMultiPoint = function(geometry) {
|
||||
* Render a LineString into the canvas. Rendering is immediate and uses
|
||||
* the current style.
|
||||
*
|
||||
* @param {module:ol/geom/LineString~LineString|ol.render.Feature} geometry LineString geometry.
|
||||
* @param {module:ol/geom/LineString~LineString|module:ol/render/Feature~RenderFeature} geometry LineString geometry.
|
||||
* @override
|
||||
*/
|
||||
CanvasImmediateRenderer.prototype.drawLineString = function(geometry) {
|
||||
@@ -591,8 +591,7 @@ CanvasImmediateRenderer.prototype.drawLineString = function(geometry) {
|
||||
* Render a MultiLineString geometry into the canvas. Rendering is immediate
|
||||
* and uses the current style.
|
||||
*
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString|ol.render.Feature} geometry MultiLineString
|
||||
* geometry.
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString|module:ol/render/Feature~RenderFeature} geometry MultiLineString geometry.
|
||||
* @override
|
||||
*/
|
||||
CanvasImmediateRenderer.prototype.drawMultiLineString = function(geometry) {
|
||||
@@ -624,7 +623,7 @@ CanvasImmediateRenderer.prototype.drawMultiLineString = function(geometry) {
|
||||
* Render a Polygon geometry into the canvas. Rendering is immediate and uses
|
||||
* the current style.
|
||||
*
|
||||
* @param {module:ol/geom/Polygon~Polygon|ol.render.Feature} geometry Polygon geometry.
|
||||
* @param {module:ol/geom/Polygon~Polygon|module:ol/render/Feature~RenderFeature} geometry Polygon geometry.
|
||||
* @override
|
||||
*/
|
||||
CanvasImmediateRenderer.prototype.drawPolygon = function(geometry) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import CanvasReplay from '../canvas/Replay.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.canvas.Replay}
|
||||
* @extends {module:ol/render/canvas/Replay~CanvasReplay}
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
|
||||
* @param {number} resolution Resolution.
|
||||
|
||||
@@ -13,7 +13,7 @@ import CanvasReplay from '../canvas/Replay.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.canvas.Replay}
|
||||
* @extends {module:ol/render/canvas/Replay~CanvasReplay}
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
|
||||
* @param {number} resolution Resolution.
|
||||
@@ -201,7 +201,7 @@ CanvasPolygonReplay.prototype.finish = function() {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
*/
|
||||
CanvasPolygonReplay.prototype.setFillStrokeStyles_ = function(geometry) {
|
||||
const state = this.state;
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.VectorContext}
|
||||
* @extends {module:ol/render/VectorContext~VectorContext}
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
|
||||
* @param {number} resolution Resolution.
|
||||
@@ -439,8 +439,8 @@ CanvasReplay.prototype.drawCustom = function(geometry, feature, renderer) {
|
||||
|
||||
/**
|
||||
* @protected
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
CanvasReplay.prototype.beginGeometry = function(geometry, feature) {
|
||||
this.beginGeometryInstruction1_ = [CanvasInstruction.BEGIN_GEOMETRY, feature, 0];
|
||||
@@ -487,7 +487,7 @@ CanvasReplay.prototype.setStrokeStyle_ = function(context, instruction) {
|
||||
|
||||
/**
|
||||
* @param {module:ol/render/canvas~DeclutterGroup} declutterGroup Declutter group.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
|
||||
if (declutterGroup && declutterGroup.length > 5) {
|
||||
@@ -529,7 +529,7 @@ CanvasReplay.prototype.renderDeclutter_ = function(declutterGroup, feature) {
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {Array.<*>} instructions Instructions array.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined}
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T|undefined}
|
||||
* featureCallback Feature callback.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this
|
||||
* extent.
|
||||
@@ -575,14 +575,14 @@ CanvasReplay.prototype.replay_ = function(
|
||||
// When the batch size gets too big, performance decreases. 200 is a good
|
||||
// balance between batch size and number of fill/stroke instructions.
|
||||
const batchSize = this.instructions != instructions || this.overlaps ? 0 : 200;
|
||||
let /** @type {module:ol/Feature~Feature|ol.render.Feature} */ feature;
|
||||
let /** @type {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} */ feature;
|
||||
let x, y;
|
||||
while (i < ii) {
|
||||
const instruction = instructions[i];
|
||||
const type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
|
||||
const type = /** @type {module:ol/render/canvas/Instruction~Instruction} */ (instruction[0]);
|
||||
switch (type) {
|
||||
case CanvasInstruction.BEGIN_GEOMETRY:
|
||||
feature = /** @type {module:ol/Feature~Feature|ol.render.Feature} */ (instruction[1]);
|
||||
feature = /** @type {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} */ (instruction[1]);
|
||||
if ((skipFeatures &&
|
||||
skippedFeaturesHash[getUid(feature).toString()]) ||
|
||||
!feature.getGeometry()) {
|
||||
@@ -710,7 +710,7 @@ CanvasReplay.prototype.replay_ = function(
|
||||
const pathLength = lineStringLength(pixelCoordinates, begin, end, 2);
|
||||
const textLength = measure(text);
|
||||
if (overflow || textLength <= pathLength) {
|
||||
const textAlign = /** @type {ol.render.canvas.TextReplay} */ (this).textStates[textKey].textAlign;
|
||||
const textAlign = /** @type {module:ol.render.canvas.TextReplay~CanvasTextReplay} */ (this).textStates[textKey].textAlign;
|
||||
const startM = (pathLength - textLength) * TEXT_ALIGN[textAlign];
|
||||
const parts = drawTextOnPath(
|
||||
pixelCoordinates, begin, end, 2, text, measure, startM, maxAngle);
|
||||
@@ -720,7 +720,7 @@ CanvasReplay.prototype.replay_ = function(
|
||||
for (c = 0, cc = parts.length; c < cc; ++c) {
|
||||
part = parts[c]; // x, y, anchorX, rotation, chunk
|
||||
chars = /** @type {string} */ (part[4]);
|
||||
label = /** @type {ol.render.canvas.TextReplay} */ (this).getImage(chars, textKey, '', strokeKey);
|
||||
label = /** @type {module:ol.render.canvas.TextReplay~CanvasTextReplay} */ (this).getImage(chars, textKey, '', strokeKey);
|
||||
anchorX = /** @type {number} */ (part[2]) + strokeWidth;
|
||||
anchorY = baseline * label.height + (0.5 - baseline) * 2 * strokeWidth - offsetY;
|
||||
this.replayImage_(context,
|
||||
@@ -734,7 +734,7 @@ CanvasReplay.prototype.replay_ = function(
|
||||
for (c = 0, cc = parts.length; c < cc; ++c) {
|
||||
part = parts[c]; // x, y, anchorX, rotation, chunk
|
||||
chars = /** @type {string} */ (part[4]);
|
||||
label = /** @type {ol.render.canvas.TextReplay} */ (this).getImage(chars, textKey, fillKey, '');
|
||||
label = /** @type {module:ol.render.canvas.TextReplay~CanvasTextReplay} */ (this).getImage(chars, textKey, fillKey, '');
|
||||
anchorX = /** @type {number} */ (part[2]);
|
||||
anchorY = baseline * label.height - offsetY;
|
||||
this.replayImage_(context,
|
||||
@@ -751,7 +751,7 @@ CanvasReplay.prototype.replay_ = function(
|
||||
break;
|
||||
case CanvasInstruction.END_GEOMETRY:
|
||||
if (featureCallback !== undefined) {
|
||||
feature = /** @type {module:ol/Feature~Feature|ol.render.Feature} */ (instruction[1]);
|
||||
feature = /** @type {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} */ (instruction[1]);
|
||||
const result = featureCallback(feature);
|
||||
if (result) {
|
||||
return result;
|
||||
@@ -861,7 +861,7 @@ CanvasReplay.prototype.replay = function(
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T=} opt_featureCallback
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T=} opt_featureCallback
|
||||
* Feature callback.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this
|
||||
* extent.
|
||||
@@ -892,7 +892,7 @@ CanvasReplay.prototype.reverseHitDetectionInstructions = function() {
|
||||
let begin = -1;
|
||||
for (i = 0; i < n; ++i) {
|
||||
instruction = hitDetectionInstructions[i];
|
||||
type = /** @type {ol.render.canvas.Instruction} */ (instruction[0]);
|
||||
type = /** @type {module:ol/render/canvas/Instruction~Instruction} */ (instruction[0]);
|
||||
if (type == CanvasInstruction.END_GEOMETRY) {
|
||||
begin = i;
|
||||
} else if (type == CanvasInstruction.BEGIN_GEOMETRY) {
|
||||
@@ -958,7 +958,7 @@ CanvasReplay.prototype.setFillStrokeStyle = function(fillStyle, strokeStyle) {
|
||||
|
||||
/**
|
||||
* @param {module:ol/render/canvas~FillStrokeState} state State.
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
* @return {Array.<*>} Fill instruction.
|
||||
*/
|
||||
CanvasReplay.prototype.createFill = function(state, geometry) {
|
||||
@@ -996,8 +996,8 @@ CanvasReplay.prototype.createStroke = function(state) {
|
||||
|
||||
/**
|
||||
* @param {module:ol/render/canvas~FillStrokeState} state State.
|
||||
* @param {function(this:ol.render.canvas.Replay, module:ol/render/canvas~FillStrokeState, (module:ol/geom/Geometry~Geometry|ol.render.Feature)):Array.<*>} createFill Create fill.
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {function(this:module:ol/render/canvas/Replay~CanvasReplay, module:ol/render/canvas~FillStrokeState, (module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature)):Array.<*>} createFill Create fill.
|
||||
* @param {module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
*/
|
||||
CanvasReplay.prototype.updateFillStyle = function(state, createFill, geometry) {
|
||||
const fillStyle = state.fillStyle;
|
||||
@@ -1012,7 +1012,7 @@ CanvasReplay.prototype.updateFillStyle = function(state, createFill, geometry) {
|
||||
|
||||
/**
|
||||
* @param {module:ol/render/canvas~FillStrokeState} state State.
|
||||
* @param {function(this:ol.render.canvas.Replay, module:ol/render/canvas~FillStrokeState)} applyStroke Apply stroke.
|
||||
* @param {function(this:module:ol/render/canvas/Replay~CanvasReplay, module:ol/render/canvas~FillStrokeState)} applyStroke Apply stroke.
|
||||
*/
|
||||
CanvasReplay.prototype.updateStrokeStyle = function(state, applyStroke) {
|
||||
const strokeStyle = state.strokeStyle;
|
||||
@@ -1044,8 +1044,8 @@ CanvasReplay.prototype.updateStrokeStyle = function(state, applyStroke) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
CanvasReplay.prototype.endGeometry = function(geometry, feature) {
|
||||
this.beginGeometryInstruction1_[2] = this.instructions.length;
|
||||
|
||||
@@ -19,8 +19,8 @@ import {create as createTransform, compose as composeTransform} from '../../tran
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object.<ol.render.ReplayType,
|
||||
* function(new: ol.render.canvas.Replay, number, module:ol/extent~Extent,
|
||||
* @type {Object.<module:ol/render/ReplayType~ReplayType,
|
||||
* function(new: module:ol/render/canvas/Replay~CanvasReplay, number, module:ol/extent~Extent,
|
||||
* number, number, boolean, Array.<module:ol/render/canvas~DeclutterGroup>)>}
|
||||
*/
|
||||
const BATCH_CONSTRUCTORS = {
|
||||
@@ -35,7 +35,7 @@ const BATCH_CONSTRUCTORS = {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.ReplayGroup}
|
||||
* @extends {module:ol/render/ReplayGroup~ReplayGroup}
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
||||
* @param {number} resolution Resolution.
|
||||
@@ -100,7 +100,7 @@ const CanvasReplayGroup = function(
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object.<string, !Object.<ol.render.ReplayType, ol.render.canvas.Replay>>}
|
||||
* @type {!Object.<string, !Object.<module:ol/render/ReplayType~ReplayType, module:ol/render/canvas/Replay~CanvasReplay>>}
|
||||
*/
|
||||
this.replaysByZIndex_ = {};
|
||||
|
||||
@@ -252,7 +252,7 @@ CanvasReplayGroup.prototype.clip = function(context, transform) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array.<ol.render.ReplayType>} replays Replays.
|
||||
* @param {Array.<module:ol/render/ReplayType~ReplayType>} replays Replays.
|
||||
* @return {boolean} Has replays of the provided types.
|
||||
*/
|
||||
CanvasReplayGroup.prototype.hasReplays = function(replays) {
|
||||
@@ -286,12 +286,9 @@ CanvasReplayGroup.prototype.finish = function() {
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number} rotation Rotation.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T} callback Feature
|
||||
* callback.
|
||||
* @param {Object.<string, module:ol/render/canvas~DeclutterGroup>} declutterReplays Declutter
|
||||
* replays.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T} callback Feature callback.
|
||||
* @param {Object.<string, module:ol/render/canvas~DeclutterGroup>} declutterReplays Declutter replays.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
@@ -335,7 +332,7 @@ CanvasReplayGroup.prototype.forEachFeatureAtCoordinate = function(
|
||||
let replayType;
|
||||
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function featureCallback(feature) {
|
||||
@@ -434,7 +431,7 @@ CanvasReplayGroup.prototype.getReplay = function(zIndex, replayType) {
|
||||
|
||||
|
||||
/**
|
||||
* @return {Object.<string, Object.<ol.render.ReplayType, ol.render.canvas.Replay>>} Replays.
|
||||
* @return {Object.<string, Object.<module:ol/render/ReplayType~ReplayType, module:ol/render/canvas/Replay~CanvasReplay>>} Replays.
|
||||
*/
|
||||
CanvasReplayGroup.prototype.getReplays = function() {
|
||||
return this.replaysByZIndex_;
|
||||
@@ -453,12 +450,10 @@ CanvasReplayGroup.prototype.isEmpty = function() {
|
||||
* @param {CanvasRenderingContext2D} context Context.
|
||||
* @param {module:ol/transform~Transform} transform Transform.
|
||||
* @param {number} viewRotation View rotation.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {Array.<ol.render.ReplayType>=} opt_replayTypes Ordered replay types
|
||||
* to replay. Default is {@link ol.render.replay.ORDER}
|
||||
* @param {Object.<string, module:ol/render/canvas~DeclutterGroup>=} opt_declutterReplays Declutter
|
||||
* replays.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {Array.<module:ol/render/ReplayType~ReplayType>=} opt_replayTypes Ordered replay types to replay.
|
||||
* Default is {@link ol.render.replay.ORDER}
|
||||
* @param {Object.<string, module:ol/render/canvas~DeclutterGroup>=} opt_declutterReplays Declutter replays.
|
||||
*/
|
||||
CanvasReplayGroup.prototype.replay = function(context,
|
||||
transform, viewRotation, skippedFeaturesHash, opt_replayTypes, opt_declutterReplays) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import TextPlacement from '../../style/TextPlacement.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.canvas.Replay}
|
||||
* @extends {module:ol/render/canvas/Replay~CanvasReplay}
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {module:ol/extent~Extent} maxExtent Maximum extent.
|
||||
* @param {number} resolution Resolution.
|
||||
|
||||
@@ -6,7 +6,7 @@ import ReplayType from '../render/ReplayType.js';
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {Array.<ol.render.ReplayType>}
|
||||
* @type {Array.<module:ol/render/ReplayType~ReplayType>}
|
||||
*/
|
||||
export const ORDER = [
|
||||
ReplayType.POLYGON,
|
||||
|
||||
@@ -10,7 +10,7 @@ import WebGLReplayGroup from '../webgl/ReplayGroup.js';
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.VectorContext}
|
||||
* @extends {module:ol/render/VectorContext~VectorContext}
|
||||
* @param {module:ol/webgl/Context~WebGLContext} context Context.
|
||||
* @param {module:ol/coordinate~Coordinate} center Center.
|
||||
* @param {number} resolution Resolution.
|
||||
@@ -89,7 +89,7 @@ inherits(WebGLImmediateRenderer, VectorContext);
|
||||
|
||||
/**
|
||||
* @param {ol.render.webgl.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
* @private
|
||||
*/
|
||||
WebGLImmediateRenderer.prototype.drawText_ = function(replayGroup, geometry) {
|
||||
@@ -130,7 +130,7 @@ WebGLImmediateRenderer.prototype.setStyle = function(style) {
|
||||
* Render a geometry into the canvas. Call
|
||||
* {@link ol.render.webgl.Immediate#setStyle} first to set the rendering style.
|
||||
*
|
||||
* @param {module:ol/geom/Geometry~Geometry|ol.render.Feature} geometry The geometry to render.
|
||||
* @param {module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature} geometry The geometry to render.
|
||||
* @override
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -396,7 +396,7 @@ WebGLLineStringReplay.prototype.drawPolygonCoordinates = function(
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @param {number=} opt_index Index count.
|
||||
*/
|
||||
WebGLLineStringReplay.prototype.setPolygonStyle = function(feature, opt_index) {
|
||||
|
||||
@@ -18,7 +18,7 @@ import {ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER, TRIANGLES,
|
||||
/**
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @extends {ol.render.VectorContext}
|
||||
* @extends {module:ol/render/VectorContext~VectorContext}
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
||||
* @struct
|
||||
@@ -95,7 +95,7 @@ const WebGLReplay = function(tolerance, maxExtent) {
|
||||
/**
|
||||
* Start index per feature (the feature).
|
||||
* @protected
|
||||
* @type {Array.<module:ol/Feature~Feature|ol.render.Feature>}
|
||||
* @type {Array.<module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature>}
|
||||
*/
|
||||
this.startIndicesFeature = [];
|
||||
|
||||
@@ -170,8 +170,7 @@ WebGLReplay.prototype.shutDownProgram = function(gl, locations) {};
|
||||
* @protected
|
||||
* @param {WebGLRenderingContext} gl gl.
|
||||
* @param {module:ol/webgl/Context~WebGLContext} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {boolean} hitDetection Hit detection mode.
|
||||
*/
|
||||
WebGLReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hitDetection) {};
|
||||
@@ -182,11 +181,9 @@ WebGLReplay.prototype.drawReplay = function(gl, context, skippedFeaturesHash, hi
|
||||
* @protected
|
||||
* @param {WebGLRenderingContext} gl gl.
|
||||
* @param {module:ol/webgl/Context~WebGLContext} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting this extent are checked.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
@@ -197,9 +194,8 @@ WebGLReplay.prototype.drawHitDetectionReplayOneByOne = function(gl, context, ski
|
||||
* @protected
|
||||
* @param {WebGLRenderingContext} gl gl.
|
||||
* @param {module:ol/webgl/Context~WebGLContext} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
@@ -224,9 +220,8 @@ WebGLReplay.prototype.drawHitDetectionReplay = function(gl, context, skippedFeat
|
||||
* @protected
|
||||
* @param {WebGLRenderingContext} gl gl.
|
||||
* @param {module:ol/webgl/Context~WebGLContext} context Context.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T|undefined} featureCallback Feature callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
@@ -252,9 +247,8 @@ WebGLReplay.prototype.drawHitDetectionReplayAll = function(gl, context, skippedF
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
|
||||
@@ -19,7 +19,7 @@ import WebGLTextReplay from '../webgl/TextReplay.js';
|
||||
const HIT_DETECTION_SIZE = [1, 1];
|
||||
|
||||
/**
|
||||
* @type {Object.<ol.render.ReplayType,
|
||||
* @type {Object.<module:ol/render/ReplayType~ReplayType,
|
||||
* function(new: ol.render.webgl.Replay, number,
|
||||
* module:ol/extent~Extent)>}
|
||||
*/
|
||||
@@ -34,7 +34,7 @@ const BATCH_CONSTRUCTORS = {
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {ol.render.ReplayGroup}
|
||||
* @extends {module:ol/render/ReplayGroup~ReplayGroup}
|
||||
* @param {number} tolerance Tolerance.
|
||||
* @param {module:ol/extent~Extent} maxExtent Max extent.
|
||||
* @param {number=} opt_renderBuffer Render buffer.
|
||||
@@ -64,7 +64,7 @@ const WebGLReplayGroup = function(tolerance, maxExtent, opt_renderBuffer) {
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object.<string,
|
||||
* Object.<ol.render.ReplayType, ol.render.webgl.Replay>>}
|
||||
* Object.<module:ol/render/ReplayType~ReplayType, ol.render.webgl.Replay>>}
|
||||
*/
|
||||
this.replaysByZIndex_ = {};
|
||||
|
||||
@@ -158,8 +158,7 @@ WebGLReplayGroup.prototype.isEmpty = function() {
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
*/
|
||||
WebGLReplayGroup.prototype.replay = function(context,
|
||||
center, resolution, rotation, size, pixelRatio,
|
||||
@@ -193,9 +192,8 @@ WebGLReplayGroup.prototype.replay = function(context,
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T|undefined} featureCallback Feature callback.
|
||||
* @param {boolean} oneByOne Draw features one-by-one for the hit-detecion.
|
||||
* @param {module:ol/extent~Extent=} opt_hitExtent Hit extent: Only features intersecting
|
||||
* this extent are checked.
|
||||
@@ -239,9 +237,8 @@ WebGLReplayGroup.prototype.replayHitDetection_ = function(context,
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T|undefined} callback Feature callback.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T|undefined} callback Feature callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
@@ -268,7 +265,7 @@ WebGLReplayGroup.prototype.forEachFeatureAtCoordinate = function(
|
||||
coordinate, resolution, rotation, HIT_DETECTION_SIZE,
|
||||
pixelRatio, opacity, skippedFeaturesHash,
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -294,8 +291,7 @@ WebGLReplayGroup.prototype.forEachFeatureAtCoordinate = function(
|
||||
* @param {module:ol/size~Size} size Size.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {number} opacity Global opacity.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features
|
||||
* to skip.
|
||||
* @param {Object.<string, boolean>} skippedFeaturesHash Ids of features to skip.
|
||||
* @return {boolean} Is there a feature at the given coordinate?
|
||||
*/
|
||||
WebGLReplayGroup.prototype.hasFeatureAtCoordinate = function(
|
||||
@@ -309,7 +305,7 @@ WebGLReplayGroup.prototype.hasFeatureAtCoordinate = function(
|
||||
coordinate, resolution, rotation, HIT_DETECTION_SIZE,
|
||||
pixelRatio, opacity, skippedFeaturesHash,
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @return {boolean} Is there a feature?
|
||||
*/
|
||||
function(feature) {
|
||||
|
||||
@@ -36,7 +36,7 @@ inherits(LayerRenderer, Observable);
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature), module:ol/layer/Layer~Layer): T}
|
||||
* @param {function(this: S, (module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature), module:ol/layer/Layer~Layer): T}
|
||||
* callback Feature callback.
|
||||
* @param {S} thisArg Value to use as `this` when executing `callback`.
|
||||
* @return {T|undefined} Callback result.
|
||||
@@ -55,7 +55,7 @@ LayerRenderer.prototype.hasFeatureAtCoordinate = FALSE;
|
||||
|
||||
/**
|
||||
* Create a function that adds loaded tiles to the tile lookup.
|
||||
* @param {ol.source.Tile} source Tile source.
|
||||
* @param {module:ol/source/Tile~TileSource} source Tile source.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection of the tiles.
|
||||
* @param {Object.<number, Object.<string, module:ol/Tile~Tile>>} tiles Lookup of loaded tiles by zoom level.
|
||||
* @return {function(number, module:ol/TileRange~TileRange):boolean} A function that can be
|
||||
@@ -135,13 +135,13 @@ LayerRenderer.prototype.renderIfReadyAndVisible = function() {
|
||||
|
||||
/**
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
|
||||
* @param {ol.source.Tile} tileSource Tile source.
|
||||
* @param {module:ol/source/Tile~TileSource} tileSource Tile source.
|
||||
* @protected
|
||||
*/
|
||||
LayerRenderer.prototype.scheduleExpireCache = function(frameState, tileSource) {
|
||||
if (tileSource.canExpireCache()) {
|
||||
/**
|
||||
* @param {ol.source.Tile} tileSource Tile source.
|
||||
* @param {module:ol/source/Tile~TileSource} tileSource Tile source.
|
||||
* @param {module:ol/PluggableMap~PluggableMap} map Map.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
|
||||
*/
|
||||
@@ -162,7 +162,7 @@ LayerRenderer.prototype.scheduleExpireCache = function(frameState, tileSource) {
|
||||
|
||||
/**
|
||||
* @param {!Object.<string, !Object.<string, module:ol/TileRange~TileRange>>} usedTiles Used tiles.
|
||||
* @param {ol.source.Tile} tileSource Tile source.
|
||||
* @param {module:ol/source/Tile~TileSource} tileSource Tile source.
|
||||
* @param {number} z Z.
|
||||
* @param {module:ol/TileRange~TileRange} tileRange Tile range.
|
||||
* @protected
|
||||
@@ -192,7 +192,7 @@ LayerRenderer.prototype.updateUsedTiles = function(usedTiles, tileSource, z, til
|
||||
* discarded by the tile queue
|
||||
* - enqueues missing tiles
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
|
||||
* @param {ol.source.Tile} tileSource Tile source.
|
||||
* @param {module:ol/source/Tile~TileSource} tileSource Tile source.
|
||||
* @param {module:ol/tilegrid/TileGrid~TileGrid} tileGrid Tile grid.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {module:ol/proj/Projection~Projection} projection Projection.
|
||||
|
||||
@@ -111,7 +111,7 @@ function expireIconCache(map, frameState) {
|
||||
* @param {module:ol/coordinate~Coordinate} coordinate Coordinate.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState FrameState.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {function(this: S, (module:ol/Feature~Feature|ol.render.Feature),
|
||||
* @param {function(this: S, (module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature),
|
||||
* module:ol/layer/Layer~Layer): T} callback Feature callback.
|
||||
* @param {S} thisArg Value to use as `this` when executing `callback`.
|
||||
* @param {function(this: U, module:ol/layer/Layer~Layer): boolean} layerFilter Layer filter
|
||||
@@ -129,7 +129,7 @@ MapRenderer.prototype.forEachFeatureAtCoordinate = function(coordinate, frameSta
|
||||
const viewResolution = viewState.resolution;
|
||||
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @param {module:ol/layer/Layer~Layer} layer Layer.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
|
||||
@@ -107,9 +107,9 @@ IntermediateCanvasRenderer.prototype.forEachFeatureAtCoordinate = function(coord
|
||||
return source.forEachFeatureAtCoordinate(
|
||||
coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
return callback.call(thisArg, feature, layer);
|
||||
});
|
||||
|
||||
@@ -72,7 +72,7 @@ CanvasLayerRenderer.prototype.clip = function(context, frameState, extent) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.EventType} type Event type.
|
||||
* @param {module:ol/render/EventType~EventType} type Event type.
|
||||
* @param {CanvasRenderingContext2D} context Context.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
|
||||
* @param {module:ol/transform~Transform=} opt_transform Transform.
|
||||
|
||||
@@ -61,7 +61,7 @@ inherits(CanvasMapRenderer, MapRenderer);
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.EventType} type Event type.
|
||||
* @param {module:ol/render/EventType~EventType} type Event type.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -127,7 +127,7 @@ CanvasTileLayerRenderer.prototype.prepareFrame = function(frameState, layerState
|
||||
const viewCenter = viewState.center;
|
||||
|
||||
const tileLayer = this.getLayer();
|
||||
const tileSource = /** @type {ol.source.Tile} */ (tileLayer.getSource());
|
||||
const tileSource = /** @type {module:ol/source/Tile~TileSource} */ (tileLayer.getSource());
|
||||
const sourceRevision = tileSource.getRevision();
|
||||
const tileGrid = tileSource.getTileGridForProjection(projection);
|
||||
const z = tileGrid.getZForResolution(viewResolution, this.zDirection);
|
||||
|
||||
@@ -63,7 +63,7 @@ const CanvasVectorLayerRenderer = function(vectorLayer) {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {ol.render.canvas.ReplayGroup}
|
||||
* @type {module:ol/render/canvas/ReplayGroup~CanvasReplayGroup}
|
||||
*/
|
||||
this.replayGroup_ = null;
|
||||
|
||||
@@ -255,7 +255,7 @@ CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordi
|
||||
const features = {};
|
||||
const result = this.replayGroup_.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -405,9 +405,8 @@ CanvasVectorLayerRenderer.prototype.prepareFrame = function(frameState, layerSta
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
* @param {number} resolution Resolution.
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {(module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>)} styles The style or array of
|
||||
* styles.
|
||||
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
|
||||
* @param {(module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>)} styles The style or array of styles.
|
||||
* @param {module:ol/render/canvas/ReplayGroup~CanvasReplayGroup} replayGroup Replay group.
|
||||
* @return {boolean} `true` if an image is loading.
|
||||
*/
|
||||
CanvasVectorLayerRenderer.prototype.renderFeature = function(feature, resolution, pixelRatio, styles, replayGroup) {
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
|
||||
|
||||
/**
|
||||
* @type {!Object.<string, Array.<ol.render.ReplayType>>}
|
||||
* @type {!Object.<string, Array.<module:ol/render/ReplayType~ReplayType>>}
|
||||
*/
|
||||
const IMAGE_REPLAYS = {
|
||||
'image': [ReplayType.POLYGON, ReplayType.CIRCLE,
|
||||
@@ -38,7 +38,7 @@ const IMAGE_REPLAYS = {
|
||||
|
||||
|
||||
/**
|
||||
* @type {!Object.<string, Array.<ol.render.ReplayType>>}
|
||||
* @type {!Object.<string, Array.<module:ol/render/ReplayType~ReplayType>>}
|
||||
*/
|
||||
const VECTOR_REPLAYS = {
|
||||
'image': [ReplayType.DEFAULT],
|
||||
@@ -195,7 +195,7 @@ CanvasVectorTileLayerRenderer.prototype.createReplayGroup_ = function(tile, fram
|
||||
const squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);
|
||||
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @this {ol.renderer.canvas.VectorTileLayer}
|
||||
*/
|
||||
const render = function(feature) {
|
||||
@@ -290,7 +290,7 @@ CanvasVectorTileLayerRenderer.prototype.forEachFeatureAtCoordinate = function(co
|
||||
replayGroup = sourceTile.getReplayGroup(layer, tile.tileCoord.toString());
|
||||
found = found || replayGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, {},
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
@@ -444,11 +444,10 @@ CanvasVectorTileLayerRenderer.prototype.postCompose = function(context, frameSta
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @param {(module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>)} styles The style or array of
|
||||
* styles.
|
||||
* @param {ol.render.canvas.ReplayGroup} replayGroup Replay group.
|
||||
* @param {(module:ol/style/Style~Style|Array.<module:ol/style/Style~Style>)} styles The style or array of styles.
|
||||
* @param {module:ol/render/canvas/ReplayGroup~CanvasReplayGroup} replayGroup Replay group.
|
||||
* @return {boolean} `true` if an image is loading.
|
||||
*/
|
||||
CanvasVectorTileLayerRenderer.prototype.renderFeature = function(feature, squaredTolerance, styles, replayGroup) {
|
||||
|
||||
@@ -17,7 +17,7 @@ const SIMPLIFY_TOLERANCE = 0.5;
|
||||
/**
|
||||
* @const
|
||||
* @type {Object.<module:ol/geom/GeometryType~GeometryType,
|
||||
* function(ol.render.ReplayGroup, module:ol/geom/Geometry~Geometry,
|
||||
* function(module:ol/render/ReplayGroup~ReplayGroup, module:ol/geom/Geometry~Geometry,
|
||||
* module:ol/style/Style~Style, Object)>}
|
||||
*/
|
||||
const GEOMETRY_RENDERERS = {
|
||||
@@ -33,8 +33,8 @@ const GEOMETRY_RENDERERS = {
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature1 Feature 1.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature2 Feature 2.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature1 Feature 1.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature2 Feature 2.
|
||||
* @return {number} Order.
|
||||
*/
|
||||
export function defaultOrder(feature1, feature2) {
|
||||
@@ -64,7 +64,7 @@ export function getTolerance(resolution, pixelRatio) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Circle~Circle} geometry Geometry.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
@@ -87,8 +87,8 @@ function renderCircleGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
* @param {function(this: T, module:ol/events/Event~Event)} listener Listener function.
|
||||
@@ -119,8 +119,8 @@ export function renderFeature(replayGroup, feature, style, squaredTolerance, lis
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {number} squaredTolerance Squared tolerance.
|
||||
*/
|
||||
@@ -141,10 +141,10 @@ function renderFeatureInternal(replayGroup, feature, style, squaredTolerance) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Geometry~Geometry} geometry Geometry.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
function renderGeometry(replayGroup, geometry, style, feature) {
|
||||
if (geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {
|
||||
@@ -160,7 +160,7 @@ function renderGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/GeometryCollection~GeometryCollection} geometry Geometry.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
@@ -177,10 +177,10 @@ function renderGeometryCollectionGeometry(replayGroup, geometry, style, feature)
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/LineString~LineString|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/LineString~LineString|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
function renderLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
const strokeStyle = style.getStroke();
|
||||
@@ -199,10 +199,10 @@ function renderLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/MultiLineString~MultiLineString|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
const strokeStyle = style.getStroke();
|
||||
@@ -221,7 +221,7 @@ function renderMultiLineStringGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/MultiPolygon~MultiPolygon} geometry Geometry.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {module:ol/Feature~Feature} feature Feature.
|
||||
@@ -244,10 +244,10 @@ function renderMultiPolygonGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Point~Point|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Point~Point|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
function renderPointGeometry(replayGroup, geometry, style, feature) {
|
||||
const imageStyle = style.getImage();
|
||||
@@ -269,10 +269,10 @@ function renderPointGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/MultiPoint~MultiPoint|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
function renderMultiPointGeometry(replayGroup, geometry, style, feature) {
|
||||
const imageStyle = style.getImage();
|
||||
@@ -294,10 +294,10 @@ function renderMultiPointGeometry(replayGroup, geometry, style, feature) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Polygon~Polygon|ol.render.Feature} geometry Geometry.
|
||||
* @param {module:ol/render/ReplayGroup~ReplayGroup} replayGroup Replay group.
|
||||
* @param {module:ol/geom/Polygon~Polygon|module:ol/render/Feature~RenderFeature} geometry Geometry.
|
||||
* @param {module:ol/style/Style~Style} style Style.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
*/
|
||||
function renderPolygonGeometry(replayGroup, geometry, style, feature) {
|
||||
const fillStyle = style.getFill();
|
||||
|
||||
@@ -113,7 +113,7 @@ WebGLImageLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordina
|
||||
coordinate, resolution, rotation, hitTolerance, skippedFeatureUids,
|
||||
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
|
||||
@@ -182,7 +182,7 @@ WebGLLayerRenderer.prototype.composeFrame = function(frameState, layerState, con
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.EventType} type Event type.
|
||||
* @param {module:ol/render/EventType~EventType} type Event type.
|
||||
* @param {module:ol/webgl/Context~WebGLContext} context WebGL context.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
|
||||
* @private
|
||||
|
||||
@@ -246,7 +246,7 @@ WebGLMapRenderer.prototype.bindTileTexture = function(tile, tileSize, tileGutter
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.render.EventType} type Event type.
|
||||
* @param {module:ol/render/EventType~EventType} type Event type.
|
||||
* @param {module:ol/PluggableMap~FrameState} frameState Frame state.
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -148,9 +148,9 @@ WebGLVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function(coordin
|
||||
frameState.size, frameState.pixelRatio, layerState.opacity,
|
||||
{},
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @return {?} Callback result.
|
||||
*/
|
||||
function(feature) {
|
||||
const key = getUid(feature).toString();
|
||||
if (!(key in features)) {
|
||||
|
||||
@@ -59,7 +59,7 @@ const ReprojImage = function(sourceProj, targetProj,
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!ol.reproj.Triangulation}
|
||||
* @type {!module:ol/reproj/Triangulation~Triangulation}
|
||||
*/
|
||||
this.triangulation_ = new Triangulation(
|
||||
sourceProj, targetProj, limitedTargetExtent, this.maxSourceExtent_,
|
||||
|
||||
@@ -146,7 +146,7 @@ const ReprojTile = function(sourceProj, sourceTileGrid,
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!ol.reproj.Triangulation}
|
||||
* @type {!module:ol/reproj/Triangulation~Triangulation}
|
||||
*/
|
||||
this.triangulation_ = new Triangulation(
|
||||
sourceProj, targetProj, limitedTargetExtent, maxSourceExtent,
|
||||
|
||||
@@ -497,7 +497,7 @@ function createImageRenderer(source) {
|
||||
|
||||
/**
|
||||
* Create a tile renderer for the provided source.
|
||||
* @param {ol.source.Tile} source The source.
|
||||
* @param {module:ol/source/Tile~TileSource} source The source.
|
||||
* @return {ol.renderer.canvas.Layer} The renderer.
|
||||
*/
|
||||
function createTileRenderer(source) {
|
||||
|
||||
@@ -114,8 +114,7 @@ Source.prototype.adaptAttributions_ = function(attributionLike) {
|
||||
* @param {number} rotation Rotation.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {Object.<string, boolean>} skippedFeatureUids Skipped feature uids.
|
||||
* @param {function((module:ol/Feature~Feature|ol.render.Feature)): T} callback Feature
|
||||
* callback.
|
||||
* @param {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)): T} callback Feature callback.
|
||||
* @return {T|undefined} Callback result.
|
||||
* @template T
|
||||
*/
|
||||
|
||||
@@ -324,7 +324,7 @@ TileSource.prototype.useTile = UNDEFINED;
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Events emitted by {@link ol.source.Tile} instances are instances of this
|
||||
* Events emitted by {@link module:ol/source/Tile~TileSource} instances are instances of this
|
||||
* type.
|
||||
*
|
||||
* @constructor
|
||||
|
||||
@@ -12,7 +12,7 @@ import {appendParams} from '../uri.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {ol.AttributionLike} [attributions] Attributions.
|
||||
* @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
|
||||
* @property {number} [cacheSize=2048] Cache size.
|
||||
* @property {null|string} [crossOrigin] The `crossOrigin` attribute for loaded images.
|
||||
* Note that you must provide a `crossOrigin` value if you are using the WebGL renderer
|
||||
|
||||
@@ -92,7 +92,7 @@ LabeledTile.prototype.load = function() {};
|
||||
* Uses Canvas context2d, so requires Canvas support.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.Tile}
|
||||
* @extends {module:ol/source/Tile~TileSource}
|
||||
* @param {module:ol/source/TileDebug~Options=} options Debug tile options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@ export default {
|
||||
|
||||
/**
|
||||
* Triggered when a tile starts loading.
|
||||
* @event ol.source.Tile.Event#tileloadstart
|
||||
* @event module:ol/source/Tile~TileSourceEvent#tileloadstart
|
||||
* @api
|
||||
*/
|
||||
TILELOADSTART: 'tileloadstart',
|
||||
@@ -17,14 +17,14 @@ export default {
|
||||
/**
|
||||
* Triggered when a tile finishes loading, either when its data is loaded,
|
||||
* or when loading was aborted because the tile is no longer needed.
|
||||
* @event ol.source.Tile.Event#tileloadend
|
||||
* @event module:ol/source/Tile~TileSourceEvent#tileloadend
|
||||
* @api
|
||||
*/
|
||||
TILELOADEND: 'tileloadend',
|
||||
|
||||
/**
|
||||
* Triggered if tile loading results in an error.
|
||||
* @event ol.source.Tile.Event#tileloaderror
|
||||
* @event module:ol/source/Tile~TileSourceEvent#tileloaderror
|
||||
* @api
|
||||
*/
|
||||
TILELOADERROR: 'tileloaderror'
|
||||
|
||||
@@ -61,7 +61,7 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js';
|
||||
* Base class for sources providing images divided into a tile grid.
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.Tile.Event
|
||||
* @fires module:ol/source/Tile~TileSourceEvent
|
||||
* @extends {ol.source.UrlTile}
|
||||
* @param {module:ol/source/TileImage~Options=} options Image tile options.
|
||||
* @api
|
||||
|
||||
@@ -271,7 +271,7 @@ CustomTile.prototype.load = function() {
|
||||
* Layer source for UTFGrid interaction data loaded from TileJSON format.
|
||||
*
|
||||
* @constructor
|
||||
* @extends {ol.source.Tile}
|
||||
* @extends {module:ol/source/Tile~TileSource}
|
||||
* @param {module:ol/source/TileUTFGrid~Options=} options Source options.
|
||||
* @api
|
||||
*/
|
||||
|
||||
@@ -33,8 +33,8 @@ import {getKeyZXY} from '../tilecoord.js';
|
||||
*
|
||||
* @constructor
|
||||
* @abstract
|
||||
* @fires ol.source.Tile.Event
|
||||
* @extends {ol.source.Tile}
|
||||
* @fires module:ol/source/Tile~TileSourceEvent
|
||||
* @extends {module:ol/source/Tile~TileSource}
|
||||
* @param {module:ol/source/UrlTile~Options=} options Image tile options.
|
||||
*/
|
||||
const UrlTile = function(options) {
|
||||
|
||||
@@ -60,8 +60,8 @@ inherits(VectorSourceEvent, Event);
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {module:ol/source/Source~AttributionLike} [attributions] Attributions.
|
||||
* @property {Array.<module:ol/Feature~Feature>|ol.Collection.<module:ol/Feature~Feature>} [features]
|
||||
* Features. If provided as {@link ol.Collection}, the features in the source
|
||||
* @property {Array.<module:ol/Feature~Feature>|module:ol/Collection~Collection.<module:ol/Feature~Feature>} [features]
|
||||
* Features. If provided as {@link module:ol/Collection~Collection}, the features in the source
|
||||
* and the collection will stay in sync.
|
||||
* @property {module:ol/format/Feature~FeatureFormat} [format] The feature format used by the XHR
|
||||
* feature loader when `url` is set. Required if `url` is set, otherwise ignored.
|
||||
@@ -135,7 +135,7 @@ inherits(VectorSourceEvent, Event);
|
||||
* through all features.
|
||||
*
|
||||
* When set to `false`, the features will be maintained in an
|
||||
* {@link ol.Collection}, which can be retrieved through
|
||||
* {@link module:ol/Collection~Collection}, which can be retrieved through
|
||||
* {@link module:ol/source/Vector~VectorSource#getFeaturesCollection}.
|
||||
* @property {boolean} [wrapX=true] Wrap the world horizontally. For vector editing across the
|
||||
* -180° and 180° meridians to work properly, this should be set to `false`. The
|
||||
|
||||
@@ -65,7 +65,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid.
|
||||
* editing.
|
||||
*
|
||||
* @constructor
|
||||
* @fires ol.source.Tile.Event
|
||||
* @fires module:ol/source/Tile~TileSourceEvent
|
||||
* @extends {ol.source.UrlTile}
|
||||
* @param {module:ol/source/VectorTile~Options=} options Vector tile options.
|
||||
* @api
|
||||
|
||||
@@ -11,8 +11,8 @@ import Stroke from '../style/Stroke.js';
|
||||
* A function that takes an {@link module:ol/Feature~Feature} as argument and returns an
|
||||
* {@link module:ol/geom/Geometry~Geometry} that will be rendered and styled for the feature.
|
||||
*
|
||||
* @typedef {function((module:ol/Feature~Feature|ol.render.Feature)):
|
||||
* (module:ol/geom/Geometry~Geometry|ol.render.Feature|undefined)} GeometryFunction
|
||||
* @typedef {function((module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature)):
|
||||
* (module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature|undefined)} GeometryFunction
|
||||
*/
|
||||
|
||||
|
||||
@@ -344,7 +344,7 @@ let defaultStyles = null;
|
||||
|
||||
|
||||
/**
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature.
|
||||
* @param {number} resolution Resolution.
|
||||
* @return {Array.<module:ol/style/Style~Style>} Style.
|
||||
*/
|
||||
@@ -451,9 +451,8 @@ export function createEditingStyle() {
|
||||
|
||||
/**
|
||||
* Function that is called with a feature and returns its default geometry.
|
||||
* @param {module:ol/Feature~Feature|ol.render.Feature} feature Feature to get the geometry
|
||||
* for.
|
||||
* @return {module:ol/geom/Geometry~Geometry|ol.render.Feature|undefined} Geometry to render.
|
||||
* @param {module:ol/Feature~Feature|module:ol/render/Feature~RenderFeature} feature Feature to get the geometry for.
|
||||
* @return {module:ol/geom/Geometry~Geometry|module:ol/render/Feature~RenderFeature|undefined} Geometry to render.
|
||||
*/
|
||||
function defaultGeometryFunction(feature) {
|
||||
return feature.getGeometry();
|
||||
|
||||
Reference in New Issue
Block a user