import Coordinate from '../geo/Coordinate'; import PointExtent from '../geo/PointExtent'; import Geometry, { GeometryOptionsType } from './Geometry'; import { GeometryEditOptionsType } from './ext/Geometry.Edit'; /** * @classdesc * Represents a GeometryCollection. * @category geometry * @extends Geometry * @example * var marker = new Marker([0, 0]), * line = new LineString([[0, 0], [0, 1]]), * polygon = new Polygon([[0, 0], [0, 1], [1, 3]]); * var collection = new GeometryCollection([marker, line, polygon]) * .addTo(layer); */ declare class GeometryCollection extends Geometry { _lastUndoEditIndex: number; _lastRedoEditIndex: number; /** * @param {Geometry[]} geometries - GeometryCollection's geometries * @param {Object} [options=null] - options defined in [nGeometryCollection]{@link GeometryCollection#options} */ constructor(geometries?: Geometry[], opts?: GeometryOptionsType); getContainerExtent(out?: PointExtent): PointExtent; /** * 将多个几何图形设置到几何图形集合 * @english * Set new geometries to the geometry collection * @param {Geometry[]} geometries * @return {GeometryCollection} this * @fires GeometryCollection#shapechange */ setGeometries(_geometries: Geometry[]): this; /** * 获取几何集合中的几何图形们 * @english * Get geometries of the geometry collection * @return {Geometry[]} geometries */ getGeometries(): Geometry[]; /** * 按顺序对集合中存在的每个几何体执行一次提供的回调。 * @english * Executes the provided callback once for each geometry present in the collection in order. * @param {Function} fn - a callback function * @param {*} [context=undefined] - callback's context * @return {GeometryCollection} this */ forEach(fn: (geo: Geometry, index: number) => void, context?: any): this; /** * 创建一个几何集合类,这个集合类的所有元素都通过所提供的函数实现的测试 * @english * Creates a GeometryCollection with all elements that pass the test implemented by the provided function. * @param {Function} fn - Function to test each geometry * @param {*} [context=undefined] - Function's context * @return {GeometryCollection} A GeometryCollection with all elements that pass the test * @example * var filtered = collection.filter(['==', 'foo', 'bar]); * @example * var filtered = collection.filter(geometry => geometry.getProperties().foo === 'bar'); */ filter(fn?: (geo: Geometry) => boolean, context?: any): GeometryCollection; /** * 按给定偏移平移或移动几何体集合。 * @english * Translate or move the geometry collection by the given offset. * @param {Coordinate} offset - translate offset * @return {GeometryCollection} this */ translate(offset: Coordinate): this; /** * 几何图形集合是否为空 * @english * Whether the geometry collection is empty * @return {Boolean} */ isEmpty(): boolean; /** * 移除本身,如果图层含有的话 * @english * remove itself from the layer if any. * @returns {Geometry} this * @fires GeometryCollection#removestart * @fires GeometryCollection#remove * @fires GeometryCollection#removeend */ remove(): any; /** * 显示几何集合 * @english * Show the geometry collection. * @return {GeometryCollection} this * @fires GeometryCollection#show */ show(): this; /** * 隐藏几何集合 * @english * Hide the geometry collection. * @return {GeometryCollection} this * @fires GeometryCollection#hide */ hide(): this; onConfig(config?: string | Record): void; getSymbol(): any; setSymbol(s?: any): this; startEdit(opts?: GeometryEditOptionsType): this; endEdit(): this; isEditing(): boolean; undoEdit(): this; redoEdit(): this; undoEditcheck(): boolean; redoEditcheck(): boolean; } export default GeometryCollection; //# sourceMappingURL=GeometryCollection.d.ts.map