Added generic source option to layer option types
This commit is contained in:
committed by
Andreas Hocevar
parent
8520a18eae
commit
a211666fd8
@@ -6,6 +6,7 @@ import CanvasVectorImageLayerRenderer from '../renderer/canvas/VectorImageLayer.
|
||||
import {assign} from '../obj.js';
|
||||
|
||||
/**
|
||||
* @template {import("../source/Vector.js").default} VectorSourceType
|
||||
* @typedef {Object} Options
|
||||
* @property {string} [className='ol-layer'] A CSS class name to set to the layer element.
|
||||
* @property {number} [opacity=1] Opacity (0, 1).
|
||||
@@ -30,7 +31,7 @@ import {assign} from '../obj.js';
|
||||
* @property {number} [renderBuffer=100] The buffer in pixels around the viewport extent used by the
|
||||
* renderer when getting features from the vector source for the rendering or hit-detection.
|
||||
* Recommended value: the size of the largest symbol, line width or label.
|
||||
* @property {import("../source/Vector.js").default} [source] Source.
|
||||
* @property {VectorSourceType} [source] Source.
|
||||
* @property {import("../PluggableMap.js").default} [map] Sets the layer as overlay on a map. The map will not manage
|
||||
* this layer in its layers collection, and the layer will be rendered on top. This is useful for
|
||||
* temporary layers. The standard way to add a layer to a map and have it managed by the map is to
|
||||
@@ -58,7 +59,7 @@ import {assign} from '../obj.js';
|
||||
*/
|
||||
class VectorImageLayer extends BaseVectorLayer {
|
||||
/**
|
||||
* @param {Options} [opt_options] Options.
|
||||
* @param {Options<VectorSourceType>} [opt_options] Options.
|
||||
*/
|
||||
constructor(opt_options) {
|
||||
const options = opt_options ? opt_options : {};
|
||||
|
||||
Reference in New Issue
Block a user