vue-yandex-maps
Version:
Yandex Maps 3.0 components library for VueJS.
134 lines (133 loc) • 5.04 kB
TypeScript
import { PropType, SlotsType } from 'vue';
import { YMapClusterer } from '@yandex/ymaps3-types/packages/clusterer';
import { LngLatBounds, YMapCollection, YMapMarker } from '@yandex/ymaps3-types';
import { ClustererObject } from '@yandex/ymaps3-types/packages/clusterer/YMapClusterer/interface';
import { YandexMapMarkerCustomProps } from '../../../types/marker.ts';
import { EasingFunctionDescription } from '@yandex/ymaps3-types/common/types';
type Settings = ConstructorParameters<typeof YMapClusterer>[0];
export type YandexMapClustererOptions = Partial<Omit<Settings, 'cluster'>>;
export type YandexMapClustererZoomOptionsObject = {
duration?: number;
easing?: EasingFunctionDescription;
/**
* @description zoomCorrect will apply Math.floor after initial bounds update. boundsCorrect will instead subtract the distance between left top and right bottom coordinates of bounds.
*
* If boundsCorrect is active, updated bounds will be returned in updatedBounds event.
* @default zoomCorrect
*/
strategy?: 'zoomCorrect' | 'boundsCorrect';
/**
* @description By default, if objects are too close to borders, library will add -1 zoom for user's comfort.
*
* This can work poor on large grid sizes and/or high density of objects. You can disable behavior by using this setting.
*/
disableMinimalZoomCorrectDiff?: boolean;
};
export interface IYMapClusterFeature {
clusterer: ClustererObject;
element: YMapCollection;
}
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
value: {
type: PropType<YMapClusterer | null>;
default: null;
};
modelValue: {
type: PropType<YMapClusterer | null>;
default: null;
};
settings: {
type: PropType<YandexMapClustererOptions>;
default: () => {};
};
/**
* @description All custom (non-settings) props are also supported
*/
clusterMarkerProps: {
type: PropType<Omit<ConstructorParameters<typeof YMapMarker>[0], "coordinates"> & YandexMapMarkerCustomProps>;
default: () => {};
};
/**
* @description Size of the grid division in pixels
*
* Used in settings.method via Yandex clusterByGrid method
*
* @see https://yandex.ru/maps-api/docs/js-api/object/markers/YMapClusterer.html
*/
gridSize: {
type: NumberConstructor;
default: number;
};
/**
* @description Zooms to bounds of features of cluster
*/
zoomOnClusterClick: {
type: PropType<boolean | YandexMapClustererZoomOptionsObject>;
default: boolean;
};
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
[key: string]: any;
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
input(item: YMapClusterer): boolean;
'update:modelValue'(item: YMapClusterer): boolean;
trueBounds(bounds: LngLatBounds): boolean;
updatedBounds(bounds: LngLatBounds): boolean;
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
value: {
type: PropType<YMapClusterer | null>;
default: null;
};
modelValue: {
type: PropType<YMapClusterer | null>;
default: null;
};
settings: {
type: PropType<YandexMapClustererOptions>;
default: () => {};
};
/**
* @description All custom (non-settings) props are also supported
*/
clusterMarkerProps: {
type: PropType<Omit<ConstructorParameters<typeof YMapMarker>[0], "coordinates"> & YandexMapMarkerCustomProps>;
default: () => {};
};
/**
* @description Size of the grid division in pixels
*
* Used in settings.method via Yandex clusterByGrid method
*
* @see https://yandex.ru/maps-api/docs/js-api/object/markers/YMapClusterer.html
*/
gridSize: {
type: NumberConstructor;
default: number;
};
/**
* @description Zooms to bounds of features of cluster
*/
zoomOnClusterClick: {
type: PropType<boolean | YandexMapClustererZoomOptionsObject>;
default: boolean;
};
}>> & Readonly<{
onInput?: ((item: YMapClusterer) => any) | undefined;
"onUpdate:modelValue"?: ((item: YMapClusterer) => any) | undefined;
onTrueBounds?: ((bounds: LngLatBounds) => any) | undefined;
onUpdatedBounds?: ((bounds: LngLatBounds) => any) | undefined;
}>, {
value: YMapClusterer | null;
modelValue: YMapClusterer | null;
settings: Partial<Omit<import('@yandex/ymaps3-types/packages/clusterer').YMapClustererProps, "cluster">>;
clusterMarkerProps: Omit<import('@yandex/ymaps3-types').YMapMarkerProps, "coordinates"> & YandexMapMarkerCustomProps;
zoomOnClusterClick: boolean | YandexMapClustererZoomOptionsObject;
gridSize: number;
}, SlotsType<{
default: {};
cluster: {
clusterer: ClustererObject;
coordinates: ClustererObject["lnglat"];
length: number;
};
}>, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
export default _default;