///
import type { YMapEntity } from '@yandex/ymaps3-types';
import type { LngLat } from '@yandex/ymaps3-types/common/types';
import type { ClustererObject, Feature, IClusterMethod } from './interface';
/**
* YMapClusterer props
*/
type YMapClustererProps = {
/** Clusterisation method */
method: IClusterMethod;
/** Features */
features: Feature[];
/** Function to create marker for point*/
marker: (feature: Feature) => YMapEntity;
/** Function to create marker for cluster*/
cluster: (coordinates: LngLat, features: Feature[]) => YMapEntity;
/** The amount of time that may be passed before the render method can be called again */
tickTimeout?: number;
/** Return false, if you want to override the render */
onRender?: (clusters: ClustererObject[]) => void | false;
/**
* Maximum zoom for clusterisation.
* If map zoom is bigger, markers will be displayed as is.
**/
maxZoom?: number;
};
type DefaultProps = typeof defaultProps;
declare const defaultProps: Readonly<{
tickTimeout: 200;
}>;
/**
* Display clustered features on a map.
*
* @example
* ```javascript
* const clusterer = new YMapClusterer({
* method: clusterByGrid({gridSize: 64}),
* features: POINTS,
* marker: (feature) => new YMapMarker({
* coordinates: feature.geometry.coordinates,
* source: 'my-source'
* }
* cluster: (coordinates, cluster) => new YMapMarker({
* coordinates,
* source: 'my-source'
* }
* });
*
* map.addChild(new YMapDefaultSchemeLayer())
* .addChild(new YMapFeatureDataSource({id: 'my-source'}))
* .addChild(new YMapLayer({source: 'my-source', type: 'markers'}))
* .addChild(clusterer);
* ```
*/
declare class YMapClusterer extends ymaps3.YMapComplexEntity {
static readonly __implName = "YMapClusterer";
static defaultProps: Readonly<{
tickTimeout: 200;
}>;
/** @internal */
static [ymaps3.overrideKeyReactify]: import("@yandex/ymaps3-types/reactify/reactify").CustomReactify false | void;
maxZoom?: number;
marker: (feature: Feature) => import("react").ReactElement>;
cluster: (coordinates: LngLat, features: Feature[]) => import("react").ReactElement>;
} & import("react").RefAttributes false | void;
maxZoom?: number;
marker: (feature: Feature) => import("react").ReactElement>;
cluster: (coordinates: LngLat, features: Feature[]) => import("react").ReactElement>;
}, {}>>>>;
static [ymaps3.overrideKeyVuefy]: import("@yandex/ymaps3-types/modules/vuefy").CustomVuefyFn;
static [ymaps3.optionsKeyVuefy]: import("@yandex/ymaps3-types/modules/vuefy").CustomVuefyOptions;
/** All created entities with cluster id*/
private _entitiesCache;
/** Viewport entities with cluster id */
private _visibleEntities;
/** Store to add entities on a map */
private _container;
/** Listener on map update and resize */
private _mapListener;
constructor(props: YMapClustererProps);
/**
* Compare feature coordinates with bounds.
* Visible in x2 bounds.
*
* @param feature
* @param bounds
* @param projection
* @returns either feature belongs to viewport or not
*/
private _isVisible;
/**
* Get entity from store or create it
*
* @param feature
* @param entityId
* @param length count of entities in the cluster
* @returns ready to add to map entity
*/
private _getEntity;
/**
* Generate map of new entities based on returned from method objects
*
* @param nextViewportObjects clustered objects
* @returns map of entities for new render
*/
private _getVisibleEntities;
/**
* Removes unnecessary entities and adds new to the map
*
* @param nextVisibleEntities new entities for matching with existing entities
*/
private _syncVisibleEntities;
private _render;
protected _onAttach(): void;
protected _onDetach(): void;
protected _onUpdate(): void;
}
export { YMapClusterer, YMapClustererProps };