import Extent from '../geo/Extent'; import Geometry from '../geometry/Geometry'; import OverlayLayer, { OverlayLayerOptionsType } from './OverlayLayer'; import { LayerIdentifyOptionsType } from './Layer'; import Painter from '../renderer/geometry/Painter'; import CollectionPainter from '../renderer/geometry/CollectionPainter'; import Coordinate from '../geo/Coordinate'; import Point from '../geo/Point'; import { VectorLayerCanvasRenderer } from '../renderer'; import { LayerJSONType } from './Layer'; type VectorLayerToJSONOptions = { geometries: any; clipExtent: Extent; }; /** * 用于管理、呈现 geometries 的 layer * * @english * @classdesc * A layer for managing and rendering geometries. * @category layer * @extends OverlayLayer */ declare class VectorLayer extends OverlayLayer { options: VectorLayerOptionsType; isVectorLayer: boolean; /** * @param id - layer's id * @param geometries=null - geometries to add * @param options=null - construct options * @param options.style=null - vectorlayer's style * @param options.*=null - options defined in [VectorLayer]{@link VectorLayer#options} */ constructor(id: string, geometries?: VectorLayerOptionsType | Array, options?: VectorLayerOptionsType); onConfig(conf: Record): void; /** * 通过给定 coordinate 识别 geometries * * @english * Identify the geometries on the given coordinate * @param {maptalks.Coordinate} coordinate - coordinate to identify * @param {Object} [options=null] - options * @param {Object} [options.tolerance=0] - identify tolerance in pixel * @param {Object} [options.count=null] - result count * @return {Geometry[]} geometries identified */ identify(coordinate: Coordinate, options?: LayerIdentifyOptionsType): Geometry[]; /** * 通过给定 point 识别 geometries * * @english * Identify the geometries on the given container point * @param {maptalks.Point} point - container point to identify * @param {Object} [options=null] - options * @param {Object} [options.tolerance=0] - identify tolerance in pixel * @param {Object} [options.count=null] - result count * @return {Geometry[]} geometries identified */ identifyAtPoint(point: Point, options?: LayerIdentifyOptionsType): any; getAltitude(): number; /** * 输出 VectorLayer 的 json * * @english * Export the VectorLayer's JSON.
* @param {Object} [options=null] - export options * @param {Object} [options.geometries=null] - If not null and the layer is a [OverlayerLayer]{@link OverlayLayer}, * the layer's geometries will be exported with the given "options.geometries" as a parameter of geometry's toJSON. * @param {Extent} [options.clipExtent=null] - if set, only the geometries intersectes with the extent will be exported. * @return layer's JSON */ toJSON(options?: VectorLayerToJSONOptions): LayerJSONType; getRenderer(): VectorLayerCanvasRenderer; /** * 通过 json 生成 VectorLayer * * @english * Reproduce a VectorLayer from layer's JSON. * @param {Object} layerJSON - layer's JSON * @return {VectorLayer} * @static * @private * @function */ static fromJSON(json: Record): VectorLayer; static getPainterClass(): typeof Painter; static getCollectionPainterClass(): typeof CollectionPainter; } export default VectorLayer; export type VectorLayerOptionsType = OverlayLayerOptionsType & { debug?: boolean; enableSimplify?: boolean; cursor?: string; geometryEvents?: boolean; defaultIconSize?: [number, number]; cacheVectorOnCanvas?: boolean; cacheSvgOnCanvas?: boolean; enableAltitude?: boolean; altitudeProperty?: string; drawAltitude?: boolean; sortByDistanceToCamera?: boolean; roundPoint?: boolean; altitude?: number; clipBBoxBufferSize?: number; collision?: boolean; collisionBufferSize?: number; collisionDelay?: number; collisionScope?: 'layer' | 'map'; progressiveRender?: boolean; progressiveRenderCount?: number; progressiveRenderDebug?: boolean; }; //# sourceMappingURL=VectorLayer.d.ts.map