@h21-map-types/yandex-map
Version:
TypeScript definitions for Yandex Map
1,449 lines (1,331 loc) • 77.2 kB
TypeScript
// Type definitions for yandex-maps 2.1
// Project: https://github.com/Delagen/typings-yandex-maps
// Definitions by: Delagen <https://github.com/Delagen>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
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 PresetKey = string;
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;
duration?: number;
}
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;
cursor?: string;
inertia?: boolean;
inertiaDuration?: number;
tremor?: number;
}
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;
cursor?: string;
duration?: number;
}
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;
}
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;
duration?: number;
}
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 DrawingManager {
}
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;
}
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;
speed?: number;
}
const storage: util.Storage;
}
namespace clusterer {
class Balloon implements IBalloonManager<Clusterer> { //tslint:disable-line no-shadowed-variable
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;
float?: "none" | "left" | "right";
floatIndex?: number;
layout?: IClassConstructor<ISelectableControlLayout> | string;
maxWidth?: number[][] | number[] | number;
position?: {
bottom?: number | string;
left?: number | string;
right?: number | string;
top?: number | string;
};
visible?: boolean;
}
interface IButtonParameters {
data?: {
content?: string;
image?: string;
title?: string;
};
options?: IBaseButtonParametersOptions & {
selectOnClick?: boolean;
size?: "auto" | "small" | "medium" | "large";
};
state?: {
enabled?: boolean;
selected?: boolean;
};
}
class FullscreenControl extends Button {
constructor(parameters?: IFullscreenControlParameters);
enterFullscreen(): void;
exitFullscreen(): void;
}
interface IFullscreenControlParameters {
data?: {
title?: string;
};
options?: IBaseButtonParametersOptions & {
collapseOnBlur?: boolean;
expandOnClick?: boolean;
popupFloat?: "left" | "right";
};
state?: {
expanded?: boolean;
};
}
class GeolocationControl extends Button {
constructor(parameters?: IGeolocationControlParameters);
}
interface IGeolocationControlParameters extends IButtonParameters {
data?: {
image?: string;
title?: string;
};
options?: IBaseButtonParametersOptions;
}
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;
};
}
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;
};
options?: {
layout?: string | IClassConstructor<ISelectableControlLayout>;
selectableLayout?: string | IClassConstructor<ISelectableControlLayout>;
selectOnClick?: boolean;
separatorLayout?: string | IClassConstructor<ISelectableControlLayout>;
type?: "selectable" | "separator";
visible?: boolean;
};
state?: {
selected?: boolean;
};
}
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;
pane?: IPane;
states?: string[];
}
interface IManagerControlOptions {
float?: "none" | "left" | "right";
floatIndex?: number;
position?: {
bottom?: number | string;
left?: number | string;
right?: number | string;
top?: number | string;
};
}
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;
collapseOnBlur?: boolean;
float?: "none" | "left" | "right";
floatIndex?: number;
popupAnimate?: boolean;
popupFloat?: "auto" | "left" | "right";
popupWidth?: string;
position?: {
bottom?: number | string;
left?: number | string;
right?: number | string;
top?: number | string;
};
size?: "auto" | "small" | "medium" | "large";
visible?: boolean;
};
state?: {
expanded?: boolean;
};
}
class RouteEditor extends Button {
constructor(parameters?: IRouteEditorParameters);
getRoute(): router.Route;
}
interface IRouteEditorParameters {
data?: {
image?: string;
title?: string;
};
options?: IBaseButtonParametersOptions;
state?: {};
}
class RulerControl extends Button {
constructor(parameters?: IRulerControlParameters);
}
interface IRulerControlParameters {
data?: {};
options?: {
adjustMapMargin?: boolean;
position?: {
bottom?: number | string;
left?: number | string;
right?: number | string;
top?: number | string;
};
scaleLine?: boolean;
visible?: boolean;
};
state?: {};
}
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(): any[];
getResultsCount(): number;
getSelectedIndex(): number;
hideResult(): void;
search(request: string): Promise<void>;
showResult(index: number): this;
}
interface ISearchControlParameters {
data?: {};
options?: {
adjustMapMargin?: boolean;
boundedBy?: number[][];
fitMaxWidth?: boolean;
float?: "none" | "left" | "right";
floatIndex?: number;
formLayout?: string | IClassConstructor<ILayout>;
kind?: "house" | "street" | "metro" | "district" | "locality";
layout?: string | IClassConstructor<ISearchControlLayout>;
maxWidth?: number[][] | number[] | number;
noCentering?: boolean;
noPlacemark?: boolean;
noPopup?: boolean;
noSelect?: boolean;
noSuggestPanel?: boolean;
placeholderContent?: string;
popupItemLayout?: string | IClassConstructor<ILayout>;
popupLayout?: string | IClassConstructor<ILayout>;
position?: {
bottom?: number | string;
left?: number | string;
right?: number | string;
top?: number | string;
};
provider?: IGeocodeProvider | "yandex#map" | "yandex#search";
searchCoordOrder?: "latlong" | "longlat";
size?: "auto" | "small" | "medium" | "large";
strictBounds?: boolean;
suppressYandexSearch?: boolean;
useMapBounds?: boolean;
zoomMargin?: number;
visible?: boolean;
};
state?: {};
}
}
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): 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 event {
class Manager implements IEventManager {
constructor(params?: { context?: object; controllers?: IEventWorkflowController[]; parent?: IEventManager });
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;
createEventobject(type: string, event: object, target: object): Event;
once(types: string[][] | string[] | string, callback: (event: IEvent) => any, context?: object, priority?: number): this;
}
}
namespace geometry {
namespace base {
class LineString implements IBaseLineStringGeometry { //tslint:disable-line no-shadowed-variable
static fromEncodedCoordinates(encodedCoordinates: string): geometry.LineString; //tslint:disable-line function-name
static toEncodedCoordinates(geometry: geometry.LineString): string; //tslint:disable-line function-name
events: IEventManager;
getBounds(): number[][] | null;
getType(): string;
get(index: number): number[];
getChildGeometry(index: number): IPointGeometryAccess;
getClosest(anchorPosition: number[]): object;
getCoordinates(): any;
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: any | null): this;
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 { //tslint:disable-line no-shadowed-variable
events: IEventManager;
getBounds(): number[][] | null;
getType(): string;
getCoordinates(): any;
setCoordinates(coordinates: any | null): this;
}
}
class LineString implements ILineStringGeometry {
constructor(coordinates?: number[][], options?: {
coordRendering?: "shortestPath" | "straightPath";
geodesic?: boolean;
pixelRendering?: "jumpy" | "static";
projection?: IProjection;
simplification?: boolean;
});
static fromEncodedCoordinates(encodedCoordinates: string): LineString; //tslint:disable-line function-name
static toEncodedCoordinates(geometry: LineString): string; //tslint:disable-line function-name
events: IEventManager;
options: IOptionManager;
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(): any;
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: any | null): this;
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(): any;
setCoordinates(coordinates: any | null): this;
}
}
namespace geoObject {
class Balloon implements IBalloonManager<GeoObject> { //tslint:disable-line no-shadowed-variable
constructor(geoObject: GeoObject);
events: IEventManager;
autoPan(): Promise<GeoObject>;
close(force?: boolean): Promise<GeoObject>;
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<GeoObject>;
setData(data: object | string | HTMLElement): Promise<GeoObject>;
setOptions(options: object): Promise<GeoObject>;
setPosition(position: number[]): Promise<GeoObject>;
}
class Hint implements IHintManager<GeoObject> {
constructor(geoObject: GeoObject);
events: IEventManager;
close(force?: boolean): Promise<GeoObject>;
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<GeoObject>;
setData(data: object | string | HTMLElement): Promise<GeoObject>;
setOptions(options: object): Promise<GeoObject>;
setPosition(position: number[]): Promise<GeoObject>;
}
class Sequence implements IGeoObject, IGeoObjectSequence {
constructor(geoObject: GeoObject);
geometry: IGeometry | null;
properties: IDataManager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
getMap(): Map;
each(callback: (geoObject: IGeoObject) => void, context?: object): void;
get(index: number): IGeoObject;
getBounds(): number[][] | null;
getIterator(): IIterator;
getLength(): number;
getPixelBounds(): number[][] | null;
indexOf(geoObject: IGeoObject): number;
}
}
namespace layout {
namespace templateBased {
class Base implements ILayout {
constructor(data: object);
events: IEventManager;
destroy(): void;
getData(): object;
getParentElement(): HTMLElement;
getShape(): IShape | null;
isEmpty(): boolean;
setData(data: object): void;
setParentElement(parent: HTMLElement | null): this;
build(): void;
clear(): void;
onSublayoutSizeChange(sublayoutInfo: object, nodeSizeByContent: object): void;
rebuild(): void;
}
}
}
namespace map {
namespace action {
class Manager implements IEventEmitter {
constructor(map: Map);
events: IEventManager;
breakTick(): void;
execute(action: IMapAction): void;
getCurrentState(): object;
getMap(): Map;
setCorrection(userFunction: () => void): void;
stop(): void;
}
}
namespace behavior {
class Manager implements ICustomizable, IEventEmitter, IParentOnMap {
constructor(map: Map, behaviors?: string[][] | string[], options?: object);
options: IOptionManager;
events: IEventManager;
getMap(): Map;
disable(behaviors: string[][] | string[] | string): this;
enable(behaviors: string[][] | string[] | string): this;
get(behaviorName: string): IBehavior;
isEnabled(behaviorName: string): boolean;
}
}
namespace layer {
class Manager implements ILayer, IMapObjectCollection {
constructor(map: Map, options?: {
trafficImageZIndex?: number;
trafficInfoZIndex?: number;
trafficJamZIndex?: number;
});
events: IEventManager;
options: IOptionManager;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
add(object: object): this;
getIterator(): IIterator;
remove(object: object): this;
getMap(): Map;
}
}
namespace margin {
class Accessor {
constructor(screenArea: object);
getArea(): object;
remove(): this;
setArea(screenArea: object): this;
}
class Manager {
constructor(map: Map);
addArea(screenArea: object): Accessor;
destroy(): this;
getMargin(): number[];
getOffset(): number[];
setDefaultMargin(margin: number[][] | number[] | number): void;
}
}
namespace pane {
class Manager {
constructor(map: Map);
append(key: string, pane: IPane): void;
destroy(): void;
get(key: string): IPane | null;
getLower(): string;
getUpper(): string;
insertBefore(key: string, pane: IPane, referenceKey: string): void;
remove(pane: IPane): void;
}
}
class Balloon implements IBalloonManager<Balloon>/*, IBalloonSharingManager*/ { //tslint:disable-line no-shadowed-variable
constructor(map: Map);
events: IEventManager;
autoPan(): Promise<Balloon>;
close(force?: boolean): Promise<Balloon>;
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<Balloon>;
setData(data: object | string | HTMLElement): Promise<Balloon>;
setOptions(options: object): Promise<Balloon>;
setPosition(position: number[]): Promise<Balloon>;
}
class Container implements IDomEventEmitter {
constructor(parentElement: string | HTMLElement);
events: IEventManager;
enterFullscreen(): void;
exitFullscreen(): void;
fitToViewport(preservePixelPosition?: boolean): void;
getElement(): HTMLElement;
getOffset(): number[];
getParentElement(): HTMLElement;
getSize(): number[];
isFullscreen(): boolean;
}
class Converter {
constructor(map: Map);
globalToPage(globalPixelPoint: number[]): number[];
pageToGlobal(pagePixelPoint: number[]): number[];
}
class Copyrights {
constructor(map: Map);
add(customCopyrights: string | HTMLElement | Array<string | HTMLElement>): ICopyrightsAccessor;
addProvider(provider: ICopyrightsProvider): this;
get(point?: number[], zoom?: number): Promise<Array<string | HTMLElement>>;
getPromoLink(): string;
removeProvider(provider: ICopyrightsProvider): this;
}
class GeoObjects implements IGeoObjectCollection {
constructor(map: Map, options?: object);
options: IOptionManager;
events: IEventManager;
add(child: IGeoObject, index?: number): this;
each(callback: (object: IGeoObject) => void, context: object): void;
get(index: number): IGeoObject;
getBounds(): number[][] | null;
getIterator(): IIterator;
getLength(): number;
getPixelBounds(): number[][] | null;
indexOf(object: IGeoObject): number;
remove(child: IGeoObject): this;
removeAll(): this;
set(index: number, child: IGeoObject): this;
splice(index: number, length: number): this;
getMap(): Map;
}
class Hint implements IHintManager<Hint>/*, IHintSharingManager*/ {
constructor(map: Map);
events: IEventManager;
close(force?: boolean): Promise<Hint>;
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<Hint>;
setData(data: object | string | HTMLElement): Promise<Hint>;
setOptions(options: object): Promise<Hint>;
setPosition(position: number[]): Promise<Hint>;
}
class ZoomRange implements IEventEmitter {
constructor(map: Map, constraints: number[]);
events: IEventManager;
get(coords?: number[]): Promise<number[]>;
getCurrent(): number[];
}
}
namespace multiRouter {
namespace driving {
class Path implements IGeoObject {
geometry: IGeometry | null;
properties: data.Manager;
state: IDataManager;
model: PathModel;
events: IEventManager;
options: IOptionManager;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
getSegments(): GeoObjectCollection;
}
class PathModel implements IEventEmitter {
events: IEventManager;
properties: data.Manager;
route: RouteModel;
destroy(): void;
getSegments(): SegmentModel[];
getType(): string;
update(pathJson: object): void;
}
class Route implements IGeoObject {
geometry: IGeometry | null;
properties: IDataManager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
getPaths(): GeoObjectCollection;
}
class RouteModel implements IEventEmitter {
events: IEventManager;
multiRoute: MultiRouteModel;
properties: data.Manager;
destroy(): void;
getPaths(): PathModel[];
update(routeJson: object): void;
getType(): string;
}
class Segment implements IGeoObject {
geometry: IGeometry | null;
properties: data.Manager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
}
class SegmentModel implements IEventEmitter {
events: IEventManager;
geometry: geometry.base.LineString;
path: PathModel;
destroy(): void;
getType(): string;
getViaPoints(): ViaPointModel[];
update(segmentJson: object): void;
}
}
namespace masstransit {
class Path implements IGeoObject {
geometry: IGeometry | null;
properties: data.Manager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
model: PathModel;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
getSegmentMarkers(): GeoObjectCollection;
getSegments(): GeoObjectCollection;
}
class PathModel implements IEventEmitter {
events: IEventManager;
properties: data.Manager;
route: RouteModel;
destroy(): void;
getSegments(): Array<TransferSegmentModel | TransportSegmentModel | WalkSegmentModel>;
getType(): string;
update(pathJson: object): void;
}
class Route implements IGeoObject {
geometry: IGeometry | null;
properties: data.Manager;
model: RouteModel;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
getPaths(): GeoObjectCollection;
}
class RouteModel implements IEventEmitter {
events: IEventManager;
multiRoute: MultiRouteModel;
properties: data.Manager;
destroy(): void;
getPaths(): PathModel[];
getType(): string;
update(routeJson: object): void;
}
class StopModel implements IEventEmitter {
events: IEventManager;
geometry: geometry.base.Point;
properties: data.Manager;
segment: TransportSegmentModel;
update(stopJson: object): void;
}
class TransferSegment implements IGeoObject {
geometry: IGeometry | null;
properties: data.Manager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
model: TransferSegmentModel;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
}
class TransferSegmentModel implements IEventEmitter {
events: IEventManager;
geometry: geometry.base.LineString;
path: PathModel;
properties: data.Manager;
destroy(segmentJson: object): void;
getType(): string;
}
class TransportSegment implements IGeoObject {
geometry: IGeometry | null;
properties: data.Manager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
model: TransportSegmentModel;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
}
class TransportSegmentModel implements IEventEmitter {
events: IEventManager;
geometry: geometry.base.LineString;
path: PathModel;
properties: data.Manager;
destroy(): void;
getStops(): StopModel[];
getType(): string;
update(segmentJson: object): void;
}
class WalkSegment implements IGeoObject {
geometry: IGeometry | null;
properties: data.Manager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
model: WalkSegmentModel;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
}
class WalkSegmentModel implements IEventEmitter {
events: IEventManager;
geometry: geometry.base.LineString;
path: PathModel;
properties: data.Manager;
destroy(): void;
getType(): string;
}
}
class EditorAddon implements ICustomizable, IEventEmitter {
options: IOptionManager;
events: IEventManager;
state: data.Manager;
isActive(): boolean;
start(state: object): void;
stop(): void;
}
class MultiRoute implements IGeoObject {
constructor(model: MultiRouteModel | IMultiRouteModelJson, options?: {
activeRouteAutoSelection?: boolean;
boundsAutoApply?: boolean;
dragUpdateInterval?: string | number;
preventDragUpdate?: boolean;
useMapMargin?: boolean;
zoomMargin?: number[][] | number[] | number;
[index: string]: any;
});
editor: EditorAddon;
model: MultiRouteModel;
geometry: IGeometry | null;
properties: IDataManager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
getActiveRoute(): driving.Route | masstransit.Route | null;
getBounds(): number[][] | null;
getPixelBounds(): number[][] | null;
getRoutes(): GeoObjectCollection;
getViaPoints(): GeoObjectCollection;
getWayPoints(): GeoObjectCollection;
setActiveRoute(route: driving.Route | masstransit.Route | null): void;
}
class MultiRouteModel implements IEventEmitter {
constructor(referencePoints: IMultiRouteReferencePoint[], params?: IMultiRouteParams);
events: IEventManager;
properties: data.Manager;
destroy(): void;
getAllPoints(): Array<WayPointModel | ViaPointModel>;
getJson(): object;
getParams(): IMultiRouteParams;
getPoints(): Array<WayPointModel | ViaPointModel>;
getReferencePointIndexes(): object;
getReferencePoints(): IMultiRouteReferencePoint[];
getRoutes(): driving.RouteModel[] | masstransit.RouteModel[];
getViaPoints(): ViaPointModel[];
getWayPoints(): WayPointModel[];
setParams(params: IMultiRouteParams, extend?: boolean, clearRequests?: boolean): void;
setReferencePoints(referencePoints: IMultiRouteReferencePoint[], viaIndexes?: number[], clearRequests?: boolean): void;
}
class ViaPoint implements IGeoObject {
geometry: IGeometry | null;
properties: data.Manager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
}
class ViaPointModel implements IEventEmitter {
events: IEventManager;
geometry: geometry.base.Point;
multiRoute: MultiRouteModel;
properties: data.Manager;
destroy(): void;
getReferencePoint(): object;
getReferencePointIndex(): number;
setReferencePoint(referencePoint: object): void;
update(viaPointJson: object): void;
}
class WayPoint implements IGeoObject {
geometry: IGeometry | null;
properties: data.Manager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
model: WayPointModel;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): object | null;
setParent(parent: object): this;
getMap(): Map;
}
class WayPointModel implements IEventEmitter {
events: IEventManager;
geometry: geometry.base.Point;
multiRoute: MultiRouteModel;
properties: data.Manager;
destroy(): void;
getReferencePoint(): object;
getReferencePointIndex(): number;
setReferencePoint(referencePoint: object): void;
update(wayPointJson: object): void;
}
}
namespace option {
class Manager implements IOptionManager {
constructor(options?: object, parent?: IOptionManager, name?: string);
events: IEventManager;
get(key: string, defaultValue: object): object;
getAll(): object;
getName(): string;
getNative(key: string): object;
resolve(key: string, name?: string): object;
set(key: object | string, value?: object): this;
unset(keys: string[][] | string[] | string): this;
unsetAll(): this;
setName(name: string): void;
getParent(): null | IOptionManager;
setParent(parent: IOptionManager): this;
freeze(): IFreezable;
isFrozen(): boolean;
unfreeze(): IFreezable;
add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this;
group(): IEventGroup;
remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this;
fire(type: string, eventobject: object | IEvent): this;
}
}
namespace panorama {
class Manager implements IEventEmitter {
events: IEventManager;
closePlayer(): void;
disableLookup(): void;
enableLookup(): void;
getPlayer(): Player;
isLookupEnabled(): boolean;
openPlayer(panorama: IPanorama[] | number): Promise<void>;
}
class Player implements IEventEmitter {
constructor(element: HTMLElement | string, panorama: IPanorama, options?: {
autoFitToViewport?: "none" | "ifNull" | "always";
controls?: string[];
direction?: number[] | string;
hotkeysEnabled?: boolean;
scrollZoomBehavior?: boolean;
span?: number[] | string;
suppressMapOpenBlock?: boolean;
})
events: IEventManager;
destroy(): void;
fitToViewport(): void;
getDirection(): number[];
getPanorama(): IPanorama;
getSpan(): number[];
lookAt(point: number[]): this;
moveTo(point: number[], options?: {
direction?: number[] | string;
layer?: "yandex#panorama" | "yandex#airPanorama";
span?: number[] | string;
}): Promise<void>;
setDirection(direction: number[] | string): this;
setPanorama(panorama: IPanorama): this;
setSpan(span: number[] | string): this;
}
}
namespace router {
class Editor implements ICustomizable, IEventEmitter {
options: IOptionManager;
events: IEventManager;
start(options?: {
addViaPoints?: boolean;
addWayPoints?: boolean;
editViaPoints?: boolean;
editWayPoints?: boolean;
removeViaPoints?: boolean;
removeWayPoints?: boolean;
}): void;
stop(): void;
}
abstract class Route implements IGeoObject {
geometry: IGeometry | null;
properties: IDataManager;
state: IDataManager;
events: IEventManager;
options: IOptionManager;
editor: Editor;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
getMap(): Map;
getHumanJamsTime(): string;
getHumanLength(): string;
getHumanTime(): string;
getJamsTime(): number;
getLength(): number;
getPaths(): GeoObjectCollection;
getTime(): number;
getViaPoints(): GeoObjectCollection;
getWayPoints(): GeoObjectCollection;
}
}
class Balloon extends Popup<Balloon> implements IBaloon<Balloon> {
constructor(map: Map, options?: IBalloonOptions);
getData(): object;
close(force?: boolean): Promise<Balloon>;
getParent(): Balloon | null;
setParent(parent: Balloon): this;
autoPan(): Promise<Balloon>;
freeze(): IFreezable;
isFrozen(): boolean;
unfreeze(): IFreezable;
add(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this;
group(): IEventGroup;
remove(types: string[][] | string[] | string, callback: (event: (object | IEvent)) => void, context?: object, priority?: number): this;
fire(type: string, eventobject: object | IEvent): this;
}
class DrawingManager {
constructor(map: Map, options?: any);
}
interface IBalloonOptions {
autoPan?: boolean;
autoPanCheckZoomRange?: boolean;
autoPanDuration?: number;
autoPanMargin?: number[][] | number[] | number;
autoPanUseMapMargin?: boolean;
closeButton?: boolean;
contentLayout?: IClassConstructor<ILayout> | string;
layout?: IClassConstructor<ILayout> | string;
maxHeight?: number;
maxWidth?: number;
minHeight?: number;
minWidth?: number;
offset?: number[];
pane?: string;
panelContentLayout?: IClassConstructor<ILayout> | string;
panelMaxHeightRatio?: number;
panelMaxMapArea?: number;
shadow?: boolean;
shadowLayout?: IClassConstructor<ILayout> | string;
shadowOffset?: number[];
}
class Circle implements GeoObject {
constructor(geometry: ICircleGeometry[][][][] | number[][] | object, properties?: object | IDataManager, options?: ICircleOptions)
balloon: geoObject.Balloon;
editor: IGeometryEditor;
hint: geoObject.Hint;
events: event.Manager;
options: option.Manager;
properties: data.Manager;
state: data.Manager;
geometry: IGeometry | null;
indices: ArrayBuffer;
vertices: ArrayBuffer;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
getMap(): Map;
}
interface ICircleOptions {
circleOverlay?: string | ((geometry: IPixelCircleGeometry, data: object, options: object) => Promise<IOverlay>);
cursor?: string;
draggable?: boolean;
fill?: boolean;
fillColor?: string;
fillImageHref?: string;
fillMethod?: "stretch" | "tile";
fillOpacity?: number;
hasBalloon?: boolean;
hasHint?: boolean;
hideIconOnBalloonOpen?: boolean;
interactiveZIndex?: boolean;
interactivityModel?: InteractivityModelKey;
opacity?: number;
openBalloonOnClick?: boolean;
openEmptyBalloon?: boolean;
openEmptyHint?: boolean;
openHintOnHover?: boolean;
outline?: boolean;
pane?: string;
strokeColor?: string[][] | string[] | string;
strokeOpacity?: number[][] | number[] | number;
strokeStyle?: string[][][] | object[][] | string[] | object[] | string | object;
strokeWidth?: number[][] | number[] | number;
syncOverlayInit?: boolean;
useMapMarginInDragging?: boolean;
visible?: boolean;
zIndex?: number;
zIndexActive?: number;
zIndexDrag?: number;
zIndexHover?: number;
}
class Clusterer implements IChildOnMap, ICustomizable, IEventEmitter, IParentOnMap {
[x: string]: any;
constructor(options?: IClustererOptions);
events: IEventManager;
options: IOptionManager;
balloon: clusterer.Balloon;
hint: clusterer.Hint;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
getMap(): Map;
}
interface IClustererOptions {
gridSize?: number;
groupByCoordinates?: boolean;
hasBalloon?: boolean;
hasHint?: boolean;
margin?: number[][] | number[] | number;
maxZoom?: number[] | number;
minClusterSize?: number;
preset?: PresetKey;
showInAlphabeticalOrder?: boolean;
useMapMargin?: boolean;
viewportMargin?: number[][] | number[] | number;
zoomMargin?: number[][] | number[] | number;
}
class ClusterPlacemark implements IGeoObject, collection.Item {
constructor(geometry: number[] | object | IPointGeometry, properties: IClusterPlacemarkProperties, options?: IClusterPlacemarkOptions);
geometry: IGeometry | null;
properties: IDataManager;
events: IEventManager;
options: IOptionManager;
state: data.Manager;
getOverlay(): Promise<IOverlay | null>;
getOverlaySync(): IOverlay | null;
getParent(): null | IControlParent;
setParent(parent: IControlParent): this;
getMap(): Map;
onAddToMap(map: Map): void;
onRemoveFromMap(oldMap: Map): void;
getBounds(): number[][] | null;
getGeoObjects(): IGeoObject[];
}
interface IClusterPlacemarkProperties extends IDataManager {
geoObjects: IGeoObject[];
}
int