@yandex/ymaps3-types
Version:
Types for ymaps3 maps library
22 lines (21 loc) • 717 B
TypeScript
import { YMapGroupEntity } from "../YMapEnities";
/**
* YMapCollection is a collection of YMapEntity objects.
* Allow adding or removing [[YMapEntity]] objects.
* ```typescript
* const collection = new YMapCollection({});
* const markerElement = document.createElement('div');
* markerElement.className = 'marker';
*
* for (let i = 0; i < 10_000; i++) {
* collection.addChild(new YMapMarker({
* coordinates: [Math.random() * 180, Math.random() * 180]
* }, markerElement.cloneNode(true)));
* }
*
* map.addChild(collection); // Add collection to the map
* map.removeChild(collection); // Remove all markers from the map
* ```
*/
export declare class YMapCollection extends YMapGroupEntity<{}> {
}