Move olx.layer.HeatmapOptions to ol/layer/Heatmap
This commit is contained in:
118
externs/olx.js
118
externs/olx.js
@@ -5,124 +5,6 @@
|
||||
let olx;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{gradient: (Array.<string>|undefined),
|
||||
* radius: (number|undefined),
|
||||
* blur: (number|undefined),
|
||||
* shadow: (number|undefined),
|
||||
* weight: (string|function(module:ol/Feature~Feature):number|undefined),
|
||||
* extent: (ol.Extent|undefined),
|
||||
* minResolution: (number|undefined),
|
||||
* maxResolution: (number|undefined),
|
||||
* opacity: (number|undefined),
|
||||
* source: (ol.source.Vector|undefined),
|
||||
* visible: (boolean|undefined),
|
||||
* zIndex: (number|undefined)}}
|
||||
*/
|
||||
olx.layer.HeatmapOptions;
|
||||
|
||||
|
||||
/**
|
||||
* The color gradient of the heatmap, specified as an array of CSS color
|
||||
* strings. Default is `['#00f', '#0ff', '#0f0', '#ff0', '#f00']`.
|
||||
* @type {Array.<string>|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.gradient;
|
||||
|
||||
|
||||
/**
|
||||
* Radius size in pixels. Default is `8`.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.radius;
|
||||
|
||||
|
||||
/**
|
||||
* Blur size in pixels. Default is `15`.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.blur;
|
||||
|
||||
|
||||
/**
|
||||
* Shadow size in pixels. Default is `250`.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.shadow;
|
||||
|
||||
|
||||
/**
|
||||
* The feature attribute to use for the weight or a function that returns a
|
||||
* weight from a feature. Weight values should range from 0 to 1 (and values
|
||||
* outside will be clamped to that range). Default is `weight`.
|
||||
* @type {string|function(module:ol/Feature~Feature):number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.weight;
|
||||
|
||||
|
||||
/**
|
||||
* The bounding extent for layer rendering. The layer will not be rendered
|
||||
* outside of this extent.
|
||||
* @type {ol.Extent|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.extent;
|
||||
|
||||
|
||||
/**
|
||||
* The minimum resolution (inclusive) at which this layer will be visible.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.minResolution;
|
||||
|
||||
|
||||
/**
|
||||
* The maximum resolution (exclusive) below which this layer will be visible.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.maxResolution;
|
||||
|
||||
|
||||
/**
|
||||
* Opacity. 0-1. Default is `1`.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.opacity;
|
||||
|
||||
|
||||
/**
|
||||
* Source.
|
||||
* @type {ol.source.Vector}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.source;
|
||||
|
||||
|
||||
/**
|
||||
* Visibility. Default is `true` (visible).
|
||||
* @type {boolean|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.visible;
|
||||
|
||||
|
||||
/**
|
||||
* The z-index for layer rendering. At rendering time, the layers will be
|
||||
* ordered, first by Z-index and then by position. The default Z-index is 0.
|
||||
* @type {number|undefined}
|
||||
* @api
|
||||
*/
|
||||
olx.layer.HeatmapOptions.prototype.zIndex;
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{opacity: (number|undefined),
|
||||
* map: (ol.PluggableMap|undefined),
|
||||
|
||||
@@ -13,6 +13,30 @@ import Icon from '../style/Icon.js';
|
||||
import Style from '../style/Style.js';
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {number} [opacity=1] Opacity (0, 1).
|
||||
* @property {boolean} [visible=true] Visibility.
|
||||
* @property {ol.Extent} [extent] The bounding extent for layer rendering. The layer will not be
|
||||
* rendered outside of this extent.
|
||||
* @property {number} [zIndex=0] The z-index for layer rendering. At rendering time, the layers
|
||||
* will be ordered, first by Z-index and then by position.
|
||||
* @property {number} [minResolution] The minimum resolution (inclusive) at which this layer will be
|
||||
* visible.
|
||||
* @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will
|
||||
* be visible.
|
||||
* @property {Array.<string>} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient
|
||||
* of the heatmap, specified as an array of CSS color strings.
|
||||
* @property {number} [radius=8] Radius size in pixels.
|
||||
* @property {number} [blur=15] Blur size in pixels.
|
||||
* @property {number} [shadow=250] Shadow size in pixels.
|
||||
* @property {string|function(module:ol/Feature~Feature):number} [weight='weight'] The feature
|
||||
* attribute to use for the weight or a function that returns a weight from a feature. Weight values
|
||||
* should range from 0 to 1 (and values outside will be clamped to that range).
|
||||
* @property {ol.source.Vector} [source] Source.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
* @private
|
||||
@@ -41,7 +65,7 @@ const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00'];
|
||||
* @constructor
|
||||
* @extends {module:ol/layer/Vector~VectorLayer}
|
||||
* @fires ol.render.Event
|
||||
* @param {olx.layer.HeatmapOptions=} opt_options Options.
|
||||
* @param {module:ol/layer/Heatmap~Options=} opt_options Options.
|
||||
* @api
|
||||
*/
|
||||
const Heatmap = function(opt_options) {
|
||||
|
||||
Reference in New Issue
Block a user