@types/yandex-maps
Version:
TypeScript definitions for yandex-maps
1,615 lines (1,198 loc) • 162 kB
TypeScript
declare namespace ymaps {
interface IClassConstructor<T> {
new(): T;
}
type ControlSingleKey =
| "fullscreenControl"
| "geolocationControl"
| "routeEditor"
| "rulerControl"
| "searchControl"
| "trafficControl"
| "typeSelector"
| "zoomControl";
type ControlSetKey = "smallMapDefaultSet" | "mediumMapDefaultSet" | "largeMapDefaultSet" | "default";
type ControlKey = ControlSingleKey | ControlSetKey;
type OverlayKey =
| "default#placemark"
| "default#pin"
| "default#circle"
| "default#rectangle"
| "default#polyline"
| "default#polygon"
| "hotspot#placemark"
| "hotspot#circle"
| "hotspot#rectangle"
| "hotspot#polyline"
| "hotspot#polygon"
| "html#balloon"
| "html#hint"
| "html#placemark"
| "html#rectangle"
| string
| IClassConstructor<IOverlay>
| ((
geometry: IPixelLineStringGeometry,
data: IDataManager | object,
options: object,
) => Promise<string | IClassConstructor<IOverlay>>);
type InteractivityModelKey =
| "default#opaque"
| "default#geoObject"
| "default#layer"
| "default#transparent"
| "default#silent"
| string;
type PresetWithTextKey =
| "islands#blueIcon"
| "islands#darkGreenIcon"
| "islands#redIcon"
| "islands#violetIcon"
| "islands#darkOrangeIcon"
| "islands#blackIcon"
| "islands#nightIcon"
| "islands#yellowIcon"
| "islands#darkBlueIcon"
| "islands#greenIcon"
| "islands#pinkIcon"
| "islands#orangeIcon"
| "islands#grayIcon"
| "islands#lightBlueIcon"
| "islands#brownIcon"
| "islands#oliveIcon";
type PresetWithTextStretchyKey =
| "islands#blueStretchyIcon"
| "islands#darkGreenStretchyIcon"
| "islands#redStretchyIcon"
| "islands#violetStretchyIcon"
| "islands#darkOrangeStretchyIcon"
| "islands#blackStretchyIcon"
| "islands#nightStretchyIcon"
| "islands#yellowStretchyIcon"
| "islands#darkBlueStretchyIcon"
| "islands#greenStretchyIcon"
| "islands#pinkStretchyIcon"
| "islands#orangeStretchyIcon"
| "islands#grayStretchyIcon"
| "islands#lightBlueStretchyIcon"
| "islands#brownStretchyIcon"
| "islands#oliveStretchyIcon";
type PresetDotKey =
| "islands#blueDotIcon"
| "islands#darkGreenDotIcon"
| "islands#redDotIcon"
| "islands#violetDotIcon"
| "islands#darkOrangeDotIcon"
| "islands#blackDotIcon"
| "islands#nightDotIcon"
| "islands#yellowDotIcon"
| "islands#darkBlueDotIcon"
| "islands#greenDotIcon"
| "islands#pinkDotIcon"
| "islands#orangeDotIcon"
| "islands#grayDotIcon"
| "islands#lightBlueDotIcon"
| "islands#brownDotIcon"
| "islands#oliveDotIcon";
type PresetCircleKey =
| "islands#blueCircleIcon"
| "islands#darkGreenCircleIcon"
| "islands#redCircleIcon"
| "islands#violetCircleIcon"
| "islands#darkOrangeCircleIcon"
| "islands#blackCircleIcon"
| "islands#nightCircleIcon"
| "islands#yellowCircleIcon"
| "islands#darkBlueCircleIcon"
| "islands#greenCircleIcon"
| "islands#pinkCircleIcon"
| "islands#orangeCircleIcon"
| "islands#grayCircleIcon"
| "islands#lightBlueCircleIcon"
| "islands#brownCircleIcon"
| "islands#oliveCircleIcon";
type PresetCircleDotKey =
| "islands#blueCircleDotIcon"
| "islands#darkGreenCircleDotIcon"
| "islands#redCircleDotIcon"
| "islands#violetCircleDotIcon"
| "islands#darkOrangeCircleDotIcon"
| "islands#blackCircleDotIcon"
| "islands#nightCircleDotIcon"
| "islands#yellowCircleDotIcon"
| "islands#darkBlueCircleDotIcon"
| "islands#greenCircleDotIcon"
| "islands#pinkCircleDotIcon"
| "islands#orangeCircleDotIcon"
| "islands#grayCircleDotIcon"
| "islands#lightBlueCircleDotIcon"
| "islands#brownCircleDotIcon"
| "islands#oliveCircleDotIcon";
type PresetWithIconKey =
| "islands#blueAirportIcon"
| "islands#blueAttentionIcon"
| "islands#blueAutoIcon"
| "islands#blueBarIcon"
| "islands#blueBarberIcon"
| "islands#blueBeachIcon"
| "islands#blueBicycleIcon"
| "islands#blueBicycle2Icon"
| "islands#blueBookIcon"
| "islands#blueCarWashIcon"
| "islands#blueChristianIcon"
| "islands#blueCinemaIcon"
| "islands#blueCircusIcon"
| "islands#blueCourtIcon"
| "islands#blueDeliveryIcon"
| "islands#blueDiscountIcon"
| "islands#blueDogIcon"
| "islands#blueEducationIcon"
| "islands#blueEntertainmentCenterIcon"
| "islands#blueFactoryIcon"
| "islands#blueFamilyIcon"
| "islands#blueFashionIcon"
| "islands#blueFoodIcon"
| "islands#blueFuelStationIcon"
| "islands#blueGardenIcon"
| "islands#blueGovernmentIcon"
| "islands#blueHeartIcon"
| "islands#blueHomeIcon"
| "islands#blueHotelIcon"
| "islands#blueHydroIcon"
| "islands#blueInfoIcon"
| "islands#blueLaundryIcon"
| "islands#blueLeisureIcon"
| "islands#blueMassTransitIcon"
| "islands#blueMedicalIcon"
| "islands#blueMoneyIcon"
| "islands#blueMountainIcon"
| "islands#blueNightClubIcon"
| "islands#blueObservationIcon"
| "islands#blueParkIcon"
| "islands#blueParkingIcon"
| "islands#bluePersonIcon"
| "islands#bluePocketIcon"
| "islands#bluePoolIcon"
| "islands#bluePostIcon"
| "islands#blueRailwayIcon"
| "islands#blueRapidTransitIcon"
| "islands#blueRepairShopIcon"
| "islands#blueRunIcon"
| "islands#blueScienceIcon"
| "islands#blueShoppingIcon"
| "islands#blueSouvenirsIcon"
| "islands#blueSportIcon"
| "islands#blueStarIcon"
| "islands#blueTheaterIcon"
| "islands#blueToiletIcon"
| "islands#blueUnderpassIcon"
| "islands#blueVegetationIcon"
| "islands#blueVideoIcon"
| "islands#blueWasteIcon"
| "islands#blueWaterParkIcon"
| "islands#blueWaterwayIcon"
| "islands#blueWorshipIcon"
| "islands#blueZooIcon";
type PresetWithIconCircleKey =
| "islands#blueHomeCircleIcon"
| "islands#blueScienceCircleIcon"
| "islands#blueAirportCircleIcon"
| "islands#blueAttentionCircleIcon"
| "islands#blueAutoCircleIcon"
| "islands#blueBarCircleIcon"
| "islands#blueBarberCircleIcon"
| "islands#blueBeachCircleIcon"
| "islands#blueBicycleCircleIcon"
| "islands#blueBicycle2CircleIcon"
| "islands#blueBookCircleIcon"
| "islands#blueCarWashCircleIcon"
| "islands#blueChristianCircleIcon"
| "islands#blueCinemaCircleIcon"
| "islands#blueCircusCircleIcon"
| "islands#blueCourtCircleIcon"
| "islands#blueDeliveryCircleIcon"
| "islands#blueDiscountCircleIcon"
| "islands#blueDogCircleIcon"
| "islands#blueEducationCircleIcon"
| "islands#blueEntertainmentCenterCircleIcon"
| "islands#blueFactoryCircleIcon"
| "islands#blueFamilyCircleIcon"
| "islands#blueFashionCircleIcon"
| "islands#blueFoodCircleIcon"
| "islands#blueFuelStationCircleIcon"
| "islands#blueGardenCircleIcon"
| "islands#blueGovernmentCircleIcon"
| "islands#blueHeartCircleIcon"
| "islands#blueHotelCircleIcon"
| "islands#blueHydroCircleIcon"
| "islands#blueInfoCircleIcon"
| "islands#blueLaundryCircleIcon"
| "islands#blueLeisureCircleIcon"
| "islands#blueMassTransitCircleIcon"
| "islands#blueMedicalCircleIcon"
| "islands#blueMoneyCircleIcon"
| "islands#blueMountainCircleIcon"
| "islands#blueNightClubCircleIcon"
| "islands#blueObservationCircleIcon"
| "islands#blueParkCircleIcon"
| "islands#blueParkingCircleIcon"
| "islands#bluePersonCircleIcon"
| "islands#bluePocketCircleIcon"
| "islands#bluePoolCircleIcon"
| "islands#bluePostCircleIcon"
| "islands#blueRailwayCircleIcon"
| "islands#blueRapidTransitCircleIcon"
| "islands#blueRepairShopCircleIcon"
| "islands#blueRunCircleIcon"
| "islands#blueShoppingCircleIcon"
| "islands#blueSouvenirsCircleIcon"
| "islands#blueSportCircleIcon"
| "islands#blueStarCircleIcon"
| "islands#blueTheaterCircleIcon"
| "islands#blueToiletCircleIcon"
| "islands#blueUnderpassCircleIcon"
| "islands#blueVegetationCircleIcon"
| "islands#blueVideoCircleIcon"
| "islands#blueWasteCircleIcon"
| "islands#blueWaterParkCircleIcon"
| "islands#blueWaterwayCircleIcon"
| "islands#blueWorshipCircleIcon"
| "islands#blueZooCircleIcon";
type PresetPictogramKey = "islands#geolocationIcon";
type PresetClusterKey =
| "islands#blueClusterIcons"
| "islands#invertedBlueClusterIcons"
| "islands#redClusterIcons"
| "islands#invertedRedClusterIcons"
| "islands#darkOrangeClusterIcons"
| "islands#invertedDarkOrangeClusterIcons"
| "islands#nightClusterIcons"
| "islands#invertedNightClusterIcons"
| "islands#darkBlueClusterIcons"
| "islands#invertedDarkBlueClusterIcons"
| "islands#pinkClusterIcons"
| "islands#invertedPinkClusterIcons"
| "islands#grayClusterIcons"
| "islands#invertedGrayClusterIcons"
| "islands#brownClusterIcons"
| "islands#invertedBrownClusterIcons"
| "islands#darkGreenClusterIcons"
| "islands#invertedDarkGreenClusterIcons"
| "islands#violetClusterIcons"
| "islands#invertedVioletClusterIcons"
| "islands#blackClusterIcons"
| "islands#invertedBlackClusterIcons"
| "islands#yellowClusterIcons"
| "islands#invertedYellowClusterIcons"
| "islands#greenClusterIcons"
| "islands#invertedGreenClusterIcons"
| "islands#orangeClusterIcons"
| "islands#invertedOrangeClusterIcons"
| "islands#lightBlueClusterIcons"
| "islands#invertedLightBlueClusterIcons"
| "islands#oliveClusterIcons"
| "islands#invertedOliveClusterIcons";
type PresetKey =
| PresetWithTextKey
| PresetWithTextStretchyKey
| PresetDotKey
| PresetCircleKey
| PresetCircleDotKey
| PresetWithIconKey
| PresetWithIconCircleKey
| PresetPictogramKey
| PresetClusterKey
| string; // option.presetStorage
// [number, number]
// [[number, number], [number, number]]
type IconLayoutKey = "default#image" | "default#imageWithContent" | string;
type ClusterLayoutKey =
| "cluster#balloonTwoColumns"
| "cluster#balloonCarousel"
| "cluster#balloonAccordion"
| string;
type ClusterContentLayoutKey =
| "cluster#balloonTwoColumnsItemContent"
| "cluster#balloonCarouselItemContent"
| "cluster#balloonAccordionItemContent"
| string;
type EventMap = GlobalEventHandlersEventMap;
namespace behavior {
class DblClickZoom implements IBehavior {
constructor(options?: IDblClickZoomOptions);
events: IEventManager;
options: IOptionManager;
disable(): void;
enable(): void;
isEnabled(): boolean;
getParent(): IControlParent | null;
setParent(parent: IControlParent): this;
}
interface IDblClickZoomOptions extends IMapMarginOptions {
centering?: boolean | undefined;
duration?: number | undefined;
}
class Drag implements IBehavior {
constructor(options?: IDragOptions);
events: IEventManager;
options: IOptionManager;
disable(): void;
enable(): void;
isEnabled(): boolean;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
}
interface IDragOptions {
actionCursor?: string | undefined;
cursor?: string | undefined;
inertia?: boolean | undefined;
inertiaDuration?: number | undefined;
tremor?: number | undefined;
}
class LeftMouseButtonMagnifier implements IBehavior {
constructor(options?: ILeftMouseButtonMagnifierOptions);
events: IEventManager;
options: IOptionManager;
disable(): void;
enable(): void;
isEnabled(): boolean;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
}
interface ILeftMouseButtonMagnifierOptions {
actionCursor?: string | undefined;
cursor?: string | undefined;
duration?: number | undefined;
}
class MultiTouch implements IBehavior {
constructor(options?: IMultiTouchOptions);
events: IEventManager;
options: IOptionManager;
disable(): void;
enable(): void;
isEnabled(): boolean;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
}
interface IMultiTouchOptions {
tremor?: number | undefined;
}
class RightMouseButtonMagnifier implements IBehavior {
constructor(options?: IRightMouseButtonMagnifierOptions);
events: IEventManager;
options: IOptionManager;
disable(): void;
enable(): void;
isEnabled(): boolean;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
}
interface IRightMouseButtonMagnifierOptions {
actionCursor?: string | undefined;
duration?: number | undefined;
}
class RouteEditor implements IBehavior {
events: IEventManager;
options: IOptionManager;
disable(): void;
enable(): void;
isEnabled(): boolean;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
getRoute(): router.Route;
getState(): string;
setState(state: string | null): void;
}
class Ruler implements IBehavior {
constructor(options?: IRulerOptions);
events: IEventManager;
options: IOptionManager;
disable(): void;
enable(): void;
isEnabled(): boolean;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
close(): boolean;
getState(): string;
setState(state: string | null): void;
}
interface IRulerOptions {
balloonAutoPan?: boolean | undefined;
}
class ScrollZoom implements IBehavior {
constructor(options?: IScrollZoomOptions);
events: IEventManager;
options: IOptionManager;
disable(): void;
enable(): void;
isEnabled(): boolean;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
}
interface IScrollZoomOptions {
maximumDelta?: number | undefined;
speed?: number | undefined;
}
const storage: util.Storage;
}
namespace clusterer {
class Balloon implements IBalloonManager<Clusterer> {
constructor(clusterer: Clusterer);
events: IEventManager;
autoPan(): Promise<Clusterer>;
close(force?: boolean): Promise<Clusterer>;
destroy(): void;
getData(): object | null;
getOptions(): IOptionManager | null;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getPosition(): number[] | null;
isOpen(): boolean;
open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise<Clusterer>;
setData(data: object | string | HTMLElement): Promise<Clusterer>;
setOptions(options: object): Promise<Clusterer>;
setPosition(position: number[]): Promise<Clusterer>;
}
class Hint implements IHintManager<Clusterer> {
constructor(clusterer: Clusterer);
events: IEventManager;
close(force?: boolean): Promise<Clusterer>;
destroy(): void;
getData(): object | null;
getOptions(): IOptionManager | null;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getPosition(): number[] | null;
isOpen(): boolean;
open(position?: number[], data?: object | string | HTMLElement, options?: object): Promise<Clusterer>;
setData(data: object | string | HTMLElement): Promise<Clusterer>;
setOptions(options: object): Promise<Clusterer>;
setPosition(position: number[]): Promise<Clusterer>;
}
}
namespace collection {
class Item implements IChildOnMap, ICustomizable, IEventEmitter, IParentOnMap {
constructor(options?: object);
events: IEventManager;
options: IOptionManager;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
getMap(): Map;
onAddToMap(map: Map): void;
onRemoveFromMap(oldMap: Map): void;
}
}
namespace control {
class Button implements ICustomizable, ISelectableControl {
constructor(parameters?: IButtonParameters | string);
options: IOptionManager;
events: IEventManager;
data: data.Manager;
state: data.Manager;
deselect(): void;
disable(): void;
enable(): void;
isEnabled(): boolean;
isSelected(): boolean;
select(): void;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
}
interface IBaseButtonParametersOptions {
adjustMapMargin?: boolean | undefined;
float?: "none" | "left" | "right" | undefined;
floatIndex?: number | undefined;
layout?: IClassConstructor<ISelectableControlLayout> | string | undefined;
maxWidth?: number[][] | number[] | number | undefined;
position?: {
bottom?: number | string | undefined;
left?: number | string | undefined;
right?: number | string | undefined;
top?: number | string | undefined;
} | undefined;
visible?: boolean | undefined;
}
interface IButtonParameters {
data?: {
content?: string | undefined;
image?: string | undefined;
title?: string | undefined;
} | undefined;
options?:
| IBaseButtonParametersOptions & {
selectOnClick?: boolean | undefined;
size?: "auto" | "small" | "medium" | "large" | undefined;
}
| undefined;
state?: {
enabled?: boolean | undefined;
selected?: boolean | undefined;
} | undefined;
}
class FullscreenControl extends Button {
constructor(parameters?: IFullscreenControlParameters);
enterFullscreen(): void;
exitFullscreen(): void;
}
interface IFullscreenControlParameters {
data?: {
title?: string | undefined;
} | undefined;
options?:
| IBaseButtonParametersOptions & {
collapseOnBlur?: boolean | undefined;
expandOnClick?: boolean | undefined;
popupFloat?: "left" | "right" | undefined;
}
| undefined;
state?: {
expanded?: boolean | undefined;
} | undefined;
}
class GeolocationControl extends Button {
constructor(parameters?: IGeolocationControlParameters);
}
interface IGeolocationControlParameters extends IButtonParameters {
data?: {
image?: string | undefined;
title?: string | undefined;
} | undefined;
options?: IBaseButtonParametersOptions | undefined;
}
class ListBox implements ICollection, IControl, ICustomizable {
constructor(parameters?: IListBoxParameters);
events: IEventManager;
options: IOptionManager;
data: data.Manager;
state: data.Manager;
add(object: object): this;
getIterator(): IIterator;
remove(object: object): this;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
}
interface IListBoxParameters extends IButtonParameters {
options?:
| IBaseButtonParametersOptions & {
noPlacemark?: boolean | undefined;
}
| undefined;
}
class ListBoxItem implements ICustomizable, ISelectableControl {
constructor(parameters?: IListBoxItemParameters);
options: IOptionManager;
events: IEventManager;
data: data.Manager;
state: data.Manager;
deselect(): void;
disable(): void;
enable(): void;
isEnabled(): boolean;
isSelected(): boolean;
select(): void;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
getMap(): Map;
}
interface IListBoxItemParameters {
data?: {
content?: string | undefined;
} | undefined;
options?: {
layout?: string | IClassConstructor<ISelectableControlLayout> | undefined;
selectableLayout?: string | IClassConstructor<ISelectableControlLayout> | undefined;
selectOnClick?: boolean | undefined;
separatorLayout?: string | IClassConstructor<ISelectableControlLayout> | undefined;
type?: "selectable" | "separator" | undefined;
visible?: boolean | undefined;
} | undefined;
state?: {
selected?: boolean | undefined;
} | undefined;
}
class Manager {
constructor(map: Map, controls?: Array<string | IControl>, options?: IManagerOptions);
events: event.Manager;
options: option.Manager;
state: data.Manager;
add(control: IControl | ControlKey, options?: IManagerControlOptions): this;
each(callback: (control: IControl) => void, context?: object): this;
get(index: number | string): IControl | null;
getChildElement(control: IControl): Promise<HTMLElement>;
getContainer(): HTMLElement;
getMap(): Map;
indexOf(childToFind: IControl | string): number;
remove(control: IControl | string): this;
}
interface IManagerOptions {
margin?: number | undefined;
pane?: IPane | undefined;
states?: string[] | undefined;
}
interface IManagerControlOptions {
float?: "none" | "left" | "right" | undefined;
floatIndex?: number | undefined;
position?: {
bottom?: number | string | undefined;
left?: number | string | undefined;
right?: number | string | undefined;
top?: number | string | undefined;
} | undefined;
}
class RouteButton implements IControl, ICustomizable {
constructor(parameters?: IRouteButtonParameters);
events: IEventManager;
options: IOptionManager;
routePanel: IRoutePanel;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
}
interface IRouteButtonParameters {
options?: {
adjustMapMargin?: boolean | undefined;
collapseOnBlur?: boolean | undefined;
float?: "none" | "left" | "right" | undefined;
floatIndex?: number | undefined;
popupAnimate?: boolean | undefined;
popupFloat?: "auto" | "left" | "right" | undefined;
popupWidth?: string | undefined;
position?: {
bottom?: number | string | undefined;
left?: number | string | undefined;
right?: number | string | undefined;
top?: number | string | undefined;
} | undefined;
size?: "auto" | "small" | "medium" | "large" | undefined;
visible?: boolean | undefined;
} | undefined;
state?: {
expanded?: boolean | undefined;
} | undefined;
}
class RouteEditor extends Button {
constructor(parameters?: IRouteEditorParameters);
getRoute(): router.Route;
}
interface IRouteEditorParameters {
data?: {
image?: string | undefined;
title?: string | undefined;
} | undefined;
options?: IBaseButtonParametersOptions | undefined;
state?: {} | undefined;
}
class RoutePanel implements IControl, ICustomizable {
constructor(parameters?: IRoutePanelParameters);
events: IEventManager;
options: IOptionManager;
routePanel: IRoutePanel;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
}
interface IRoutePanelParameters {
options?: {
autofocus?: boolean;
float?: "none" | "left" | "right";
floatIndex?: number;
maxWidth?: string;
position?: {
bottom?: number | string;
left?: number | string;
right?: number | string;
top?: number | string;
};
showHeader?: boolean;
title?: string;
visible?: boolean;
};
state?: {};
}
class RulerControl extends Button {
constructor(parameters?: IRulerControlParameters);
}
interface IRulerControlParameters {
data?: {} | undefined;
options?: {
adjustMapMargin?: boolean | undefined;
position?: {
bottom?: number | string | undefined;
left?: number | string | undefined;
right?: number | string | undefined;
top?: number | string | undefined;
} | undefined;
scaleLine?: boolean | undefined;
visible?: boolean | undefined;
} | undefined;
state?: {} | undefined;
}
class SearchControl implements IControl, ICustomizable {
constructor(parameters?: ISearchControlParameters);
events: IEventManager;
options: IOptionManager;
state: data.Manager;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
clear(): void;
getMap(): Map;
getRequestString(): string;
getResponseMetaData(): object;
getResult(index: number): Promise<object>;
getResultsArray(): object[];
getResultsCount(): number;
getSelectedIndex(): number;
hideResult(): void;
search(request: string): Promise<void>;
showResult(index: number): this;
}
interface ISearchControlParameters {
data?: {} | undefined;
options?: {
adjustMapMargin?: boolean | undefined;
boundedBy?: number[][] | undefined;
fitMaxWidth?: boolean | undefined;
float?: "none" | "left" | "right" | undefined;
floatIndex?: number | undefined;
formLayout?: string | IClassConstructor<ILayout> | undefined;
kind?: "house" | "street" | "metro" | "district" | "locality" | undefined;
layout?: string | IClassConstructor<ISearchControlLayout> | undefined;
maxWidth?: number[][] | number[] | number | undefined;
noCentering?: boolean | undefined;
noPlacemark?: boolean | undefined;
noPopup?: boolean | undefined;
noSelect?: boolean | undefined;
noSuggestPanel?: boolean | undefined;
placeholderContent?: string | undefined;
popupItemLayout?: string | IClassConstructor<ILayout> | undefined;
popupLayout?: string | IClassConstructor<ILayout> | undefined;
position?: {
bottom?: number | string | undefined;
left?: number | string | undefined;
right?: number | string | undefined;
top?: number | string | undefined;
} | undefined;
provider?: IGeocodeProvider | "yandex#map" | "yandex#search" | undefined;
searchCoordOrder?: "latlong" | "longlat" | undefined;
size?: "auto" | "small" | "medium" | "large" | undefined;
strictBounds?: boolean | undefined;
suppressYandexSearch?: boolean | undefined;
useMapBounds?: boolean | undefined;
zoomMargin?: number | undefined;
visible?: boolean | undefined;
} | undefined;
state?: {} | undefined;
}
class ZoomControl implements IControl, ICustomizable {
constructor(parameters?: IZoomControlParameters);
events: IEventManager;
options: IOptionManager;
state: data.Manager;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
clear(): void;
getMap(): Map;
getRequestString(): string;
getResponseMetaData(): object;
getResult(index: number): Promise<object>;
getResultsArray(): object[];
getResultsCount(): number;
getSelectedIndex(): number;
hideResult(): void;
search(request: string): Promise<void>;
showResult(index: number): this;
}
interface IZoomControlParameters {
options?: {
adjustMapMargin?: boolean | undefined;
position?: {
top?: number | string | "auto" | undefined;
right?: number | string | "auto" | undefined;
bottom?: number | string | "auto" | undefined;
left?: number | string | "auto" | undefined;
} | undefined;
size?: "small" | "large" | "auto" | undefined;
visible?: boolean | undefined;
zoomDuration?: number | undefined;
zoomStep?: number | undefined;
} | undefined;
}
class TypeSelector extends ListBox {
constructor(parameters?: ITypeSelectorParameters);
}
interface ITypeSelectorParameters {
options?: {
panoramasItemMode: "on" | "off" | "ifMercator";
} | undefined;
}
}
namespace data {
class Manager implements IDataManager, IFreezable {
constructor(data?: object);
events: IEventManager;
get(path: string, defaultValue?: object): object;
getAll(): object;
set(path: object | string, value: object | number | string | null | undefined): this;
setAll(): this;
unset(path: object | string): this;
unsetAll(): this;
freeze(): IFreezable;
isFrozen(): boolean;
unfreeze(): IFreezable;
add(
types: string[][] | string[] | string,
callback: (event: object | IEvent) => void,
context?: object,
priority?: number,
): this;
getParent(): IEventManager | null;
group(): IEventGroup;
remove(
types: string[][] | string[] | string,
callback: (event: object | IEvent) => void,
context?: object,
priority?: number,
): this;
setParent(parent: IEventManager | null): this;
fire(type: string, eventObject: object | IEvent): this;
}
}
namespace domEvent {
interface manager {
add<K extends keyof EventMap>(
htmlElement: HTMLElement | Document,
types: K,
callback: (event: EventMap[K]) => void,
context?: object,
capture?: boolean,
): this;
add(
htmlElement: HTMLElement | Document,
types: string[] | string,
callback: (event: any) => void,
context?: object,
capture?: boolean,
): this;
group(htmlElement: HTMLElement | Document, capture?: boolean): event.Group;
remove(
htmlElement: HTMLElement | Document,
types: string[] | string,
callback: ((event: any) => void) | string,
context?: object,
capture?: boolean,
): this;
}
}
namespace event {
class Group implements IEventGroup {
events: IEventManager;
add<K extends keyof EventMap>(
types: K,
callback: (event: EventMap[K] | IEvent) => void,
context?: object,
priority?: number,
): this;
add(
types: string[][] | string[] | string,
callback: (event: object | IEvent) => void,
context?: object,
priority?: number,
): this;
remove(
types: string[][] | string[] | string,
callback: (event: object | IEvent) => void,
context?: object,
priority?: number,
): this;
removeAll(): this;
getLength(): number;
}
class Manager<TargetGeometry extends {} = {}> implements IEventManager<TargetGeometry> {
constructor(
params?: {
context?: object | undefined;
controllers?: IEventWorkflowController[] | undefined;
parent?: IEventManager | undefined;
},
);
add<K extends keyof EventMap>(
types: K,
callback: (event: IEvent<EventMap[K], TargetGeometry>) => void,
context?: object,
priority?: number,
): this;
add(
types: string[][] | string[] | string,
callback: (event: IEvent<{}, TargetGeometry>) => void,
context?: object,
priority?: number,
): this;
getParent(): IEventManager | null;
group(): IEventGroup;
remove(
types: string[][] | string[] | string,
callback: (event: object | IEvent) => void,
context?: object,
priority?: number,
): this;
setParent(parent: IEventManager | null): this;
fire(type: string, eventObject: object | IEvent): this;
createEventObject(type: string, event: object, target: object): Event;
once(
types: string[][] | string[] | string,
callback: (event: IEvent) => any,
context?: object,
priority?: number,
): this;
}
class Mapper implements IEventTrigger {
constructor(
targetEventManager: IEventManager,
mappingTable: Record<string, ((event: IEvent) => IEvent | null) | boolean>,
);
fire(type: string, eventObject?: object | IEvent): this;
}
}
namespace geometry {
namespace base {
class LineString implements IBaseLineStringGeometry {
events: IEventManager;
static fromEncodedCoordinates(encodedCoordinates: string): geometry.LineString;
static toEncodedCoordinates(geometry: geometry.LineString): string;
getBounds(): number[][] | null;
getType(): string;
get(index: number): number[];
getChildGeometry(index: number): IPointGeometryAccess;
getClosest(anchorPosition: number[]): object;
getCoordinates(): number[][];
getLength(): number;
insert(index: number, coordinates: number[][]): ILineStringGeometryAccess;
remove(index: number): number[];
remove(
types: string[][] | string[] | string,
callback: (event: object | IEvent) => void,
context?: object,
priority?: number,
): this;
set(index: number, coordinates: number[]): ILineStringGeometryAccess;
setCoordinates(coordinates: number[][]): ILineStringGeometryAccess;
splice(index: number, length: number): number[][];
freeze(): IFreezable;
isFrozen(): boolean;
unfreeze(): IFreezable;
add(
types: string[][] | string[] | string,
callback: (event: object | IEvent) => void,
context?: object,
priority?: number,
): this;
getParent(): object | null;
group(): IEventGroup;
setParent(parent: IEventManager | null): this;
fire(type: string, eventObject: object | IEvent): this;
}
class Point implements IBasePointGeometry {
events: IEventManager;
getBounds(): number[][] | null;
getType(): string;
getCoordinates(): number[] | null;
setCoordinates(coordinates: number[] | null): this;
}
class Polygon implements IBasePointGeometry {
constructor(coordinates?: number[][][], fillRule?: "evenOdd" | "nonZero");
events: IEventManager;
static fromEncodedCoordinates(encodedCoordinates: string): Polygon;
static toEncodedCoordinates(geometry: Polygon): string;
contains(position: number[]): boolean;
freeze(): IFreezable;
get(index: number): number[][];
getBounds(): number[][] | null;
getChildGeometry(index: number): ILinearRingGeometryAccess;
getClosest(anchorPosition: number[]): object;
getCoordinates(): number[] | null;
getFillRule(): "evenOdd" | "nonZero";
getLength(): number;
getType(): string;
insert(index: number, path: number[][]): IPolygonGeometryAccess;
isFrozen(): boolean;
remove(index: number): ILinearRingGeometryAccess;
set(index: number, path: number[][]): IPolygonGeometryAccess;
setCoordinates(coordinates: number[] | null): this;
setFillRule(fillRule: "evenOdd" | "nonZero"): IPolygonGeometryAccess;
splice(index: number, number: number): ILinearRingGeometryAccess[];
unfreeze(): IFreezable;
}
}
class LineString implements ILineStringGeometry {
constructor(coordinates?: number[][], options?: {
coordRendering?: "shortestPath" | "straightPath" | undefined;
geodesic?: boolean | undefined;
pixelRendering?: "jumpy" | "static" | undefined;
projection?: IProjection | undefined;
simplification?: boolean | undefined;
});
events: IEventManager;
options: IOptionManager;
static fromEncodedCoordinates(encodedCoordinates: string): LineString;
static toEncodedCoordinates(geometry: LineString): string;
getMap(): Map | null;
getPixelGeometry(options?: object): IPixelGeometry;
setMap(map: Map): void;
getBounds(): number[][] | null;
getType(): string;
get(index: number): number[];
getChildGeometry(index: number): IPointGeometryAccess;
getClosest(anchorPosition: number[]): object;
getCoordinates(): number[][];
getLength(): number;
insert(index: number, coordinates: number[][]): ILineStringGeometryAccess;
remove(index: number): number[];
remove(
types: string[][] | string[] | string,
callback: (event: object | IEvent) => void,
context?: object,
priority?: number,
): this;
set(index: number, coordinates: number[]): ILineStringGeometryAccess;
setCoordinates(coordinates: number[][]): ILineStringGeometryAccess;
splice(index: number, length: number): number[][];
freeze(): IFreezable;
isFrozen(): boolean;
unfreeze(): IFreezable;
add(
types: string[][] | string[] | string,
callback: (event: object | IEvent) => void,
context?: object,
priority?: number,
): this;
getParent(): object | null;
group(): IEventGroup;
setParent(parent: IEventManager | null): this;
fire(type: string, eventObject: object | IEvent): this;
}
class Point implements IPointGeometry {
constructor(coordinates?: number[] | null);
options: IOptionManager;
events: IEventManager;
getMap(): Map | null;
getPixelGeometry(options?: object): IPixelGeometry;
setMap(map: Map): void;
getBounds(): number[][] | null;
getType(): string;
getCoordinates(): number[] | null;
setCoordinates(coordinates: number[] | null): this;
}
class Polygon implements IPolygonGeometry {
constructor(coordinates?: number[][][], fillRule?: "evenOdd" | "nonZero", options?: object);
events: IEventManager;
options: IOptionManager;
static fromEncodedCoordinates(encodedCoordinates: string): Polygon;
static toEncodedCoordinates(geometry: Polygon): string;
add(
types: string[][] | string[] | string,
callback: (event: object | IEvent) => void,
context?: object,
priority?: number,
): this;
contains(position: number[]): boolean;
fire(type: string, eventObject: object | IEvent): this;
freeze(): IFreezable;
get(index: number): number[][];
getBounds(): number[][] | null;
getChildGeometry(index: number): ILinearRingGeometryAccess;
getClosest(anchorPosition: number[]): object;
getCoordinates(): number[][][];
getFillRule(): "evenOdd" | "nonZero";
getLength(): number;
getMap(): Map | null;
getParent(): object | null;
getPixelGeometry(options?: object): IPixelGeometry;
getType(): string;
group(): IEventGroup;
insert(index: number, path: number[][]): IPolygonGeometryAccess;
isFrozen(): boolean;
remove(index: number): ILinearRingGeometryAccess;
set(index: number, path: number[][]): IPolygonGeometryAccess;
setCoordinates(coordinates: number[][][]): IPolygonGeometryAccess;
setFillRule(fillRule: "evenOdd" | "nonZero"): IPolygonGeometryAccess;
setMap(map: Map): void;
setParent(parent: object | null): this;
splice(index: number, number: number): ILinearRingGeometryAccess[];
unfreeze(): IFreezable;
}
namespace pixel {
class Circle implements IPixelCircleGeometry {
constructor(
coordinates: number[] | null,
radius: number,
metaData?: object,
);
events: IEventManager;
equals(geometry: IPixelGeometry): boolean;
getBounds(): number[][] | null;
getCoordinates(): number[];
getMetaData(): object;
getRadius(): number;
getType(): string;
scale(factor: number): IPixelGeometry;
shift(offset: number[]): IPixelGeometry;
}
class LineString implements IPixelLineStringGeometry {
constructor(coordinates: number[][], metaData?: object);
events: IEventManager;
equals(geometry: IPixelGeometry): boolean;
getBounds(): number[][] | null;
getClosest(anchorPosition: number[]): object;
getCoordinates(): number[][];
getLength(): number;
getMetaData(): object;
getType(): string;
scale(factor: number): IPixelGeometry;
shift(offset: number[]): IPixelGeometry;
}
class MultiLineString implements IPixelMultiLineGeometry {
constructor(coordinates: number[][][], metaData?: object);
events: IEventManager;
equals(geometry: IPixelGeometry): boolean;
getBounds(): number[][] | null;
getClosest(anchorPosition: number[]): object;
getCoordinates(): number[][][];
getLength(): number;
getMetaData(): object;
getType(): string;
scale(factor: number): IPixelGeometry;
shift(offset: number[]): IPixelGeometry;
}
class MultiPolygon implements IPixelMultiPolygonGeometry {
constructor(
coordinates: number[][][][],
fillRule: "evenOdd" | "nonZero",
metaData?: object,
);
events: IEventManager;
contains(position: number[]): boolean;
equals(geometry: IPixelGeometry): boolean;
getBounds(): number[][] | null;
getClosest(anchorPosition: number[]): object;
getCoordinates(): number[][][][];
getFillRule(): "evenOdd" | "nonZero";
getLength(): number;
getMetaData(): object;
getType(): string;
scale(factor: number): IPixelGeometry;
shift(offset: number[]): IPixelGeometry;
}
class Point implements IPixelPointGeometry {
constructor(position: number[] | null, metaData?: object);
events: IEventManager;
equals(geometry: IPixelGeometry): boolean;
getBounds(): number[][] | null;
getCoordinates(): number[];
getMetaData(): object;
getType(): string;
scale(factor: number): IPixelGeometry;
shift(offset: number[]): IPixelGeometry;
}
class Polygon implements IPixelPolygonGeometry {
constructor(
coordinates: number[][][],
fillRule: "evenOdd" | "nonZero",
metaData?: object,