You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.2 KiB
36 lines
1.2 KiB
|
3 years ago
|
/**
|
||
|
|
* @module ol/layer/Vector
|
||
|
|
*/
|
||
|
|
import BaseVectorLayer from './BaseVector.js';
|
||
|
|
import CanvasVectorLayerRenderer from '../renderer/canvas/VectorLayer.js';
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @classdesc
|
||
|
|
* Vector data is rendered client-side, as vectors. This layer type provides most accurate rendering
|
||
|
|
* even during animations. Points and labels stay upright on rotated views. For very large
|
||
|
|
* amounts of vector data, performance may suffer during pan and zoom animations. In this case,
|
||
|
|
* try {@link module:ol/layer/VectorImage~VectorImageLayer}.
|
||
|
|
*
|
||
|
|
* Note that any property set in the options is set as a {@link module:ol/Object~BaseObject}
|
||
|
|
* property on the layer object; for example, setting `title: 'My Title'` in the
|
||
|
|
* options means that `title` is observable, and has get/set accessors.
|
||
|
|
*
|
||
|
|
* @template {import("../source/Vector.js").default} VectorSourceType
|
||
|
|
* @extends {BaseVectorLayer<VectorSourceType, CanvasVectorLayerRenderer>}
|
||
|
|
* @api
|
||
|
|
*/
|
||
|
|
class VectorLayer extends BaseVectorLayer {
|
||
|
|
/**
|
||
|
|
* @param {import("./BaseVector.js").Options<VectorSourceType>} [options] Options.
|
||
|
|
*/
|
||
|
|
constructor(options) {
|
||
|
|
super(options);
|
||
|
|
}
|
||
|
|
|
||
|
|
createRenderer() {
|
||
|
|
return new CanvasVectorLayerRenderer(this);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export default VectorLayer;
|