devextreme-angular
Version:
Angular UI and visualization components based on DevExtreme widgets
493 lines (395 loc) • 18.8 kB
TypeScript
/*!
* devextreme-angular
* Version: 24.2.6
* Build date: Mon Mar 17 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* https://github.com/DevExpress/devextreme-angular
*/
import { TransferState, ElementRef, NgZone, OnDestroy, EventEmitter, OnChanges, DoCheck, SimpleChanges, QueryList } from '@angular/core';
import { ClickEvent, DisposingEvent, InitializedEvent, MarkerAddedEvent, MarkerRemovedEvent, OptionChangedEvent, ReadyEvent, RouteAddedEvent, RouteRemovedEvent, MapProvider, RouteMode, MapType } from 'devextreme/ui/map';
import DxMap from 'devextreme/ui/map';
import { DxComponent, DxTemplateHost, NestedOptionHost, IterableDifferHelper, WatcherHelper } from 'devextreme-angular/core';
import { DxiCenterComponent } from 'devextreme-angular/ui/nested';
import { DxiMarkerComponent } from 'devextreme-angular/ui/nested';
import { DxiRouteComponent } from 'devextreme-angular/ui/nested';
import { DxiMapMarkerComponent } from 'devextreme-angular/ui/map/nested';
import { DxiMapRouteComponent } from 'devextreme-angular/ui/map/nested';
import type * as DxMapTypes from "devextreme/ui/map_types";
import * as i0 from "@angular/core";
import * as i1 from "devextreme-angular/ui/nested";
import * as i2 from "devextreme-angular/ui/map/nested";
import * as i3 from "devextreme-angular/core";
/**
* The Map is an interactive UI component that displays a geographic map with markers and routes.
*/
export declare class DxMapComponent extends DxComponent implements OnDestroy, OnChanges, DoCheck {
private _watcherHelper;
private _idh;
instance: DxMap;
/**
* Specifies the shortcut key that sets focus on the UI component.
*/
get accessKey(): string | undefined;
set accessKey(value: string | undefined);
/**
* Specifies whether the UI component changes its visual state as a result of user interaction.
*/
get activeStateEnabled(): boolean;
set activeStateEnabled(value: boolean);
/**
* Keys to authenticate the component within map providers.
*/
get apiKey(): string | {
azure?: string;
bing?: string;
google?: string;
googleStatic?: string;
};
set apiKey(value: string | {
azure?: string;
bing?: string;
google?: string;
googleStatic?: string;
});
/**
* Specifies whether the UI component automatically adjusts center and zoom property values when adding a new marker or route, or if a new UI component contains markers or routes by default.
*/
get autoAdjust(): boolean;
set autoAdjust(value: boolean);
/**
* An object, a string, or an array specifying which part of the map is displayed at the UI component's center using coordinates. The UI component can change this value if autoAdjust is enabled.
*/
get center(): Array<number> | string | {
lat?: number;
lng?: number;
}[];
set center(value: Array<number> | string | {
lat?: number;
lng?: number;
}[]);
/**
* Specifies whether or not map UI component controls are available.
*/
get controls(): boolean;
set controls(value: boolean);
/**
* Specifies whether the UI component responds to user interaction.
*/
get disabled(): boolean;
set disabled(value: boolean);
/**
* Specifies the global attributes to be attached to the UI component's container element.
*/
get elementAttr(): Record<string, any>;
set elementAttr(value: Record<string, any>);
/**
* Specifies whether the UI component can be focused using keyboard navigation.
*/
get focusStateEnabled(): boolean;
set focusStateEnabled(value: boolean);
/**
* Specifies the UI component's height.
*/
get height(): (() => number | string) | number | string;
set height(value: (() => number | string) | number | string);
/**
* Specifies text for a hint that appears when a user pauses on the UI component.
*/
get hint(): string | undefined;
set hint(value: string | undefined);
/**
* Specifies whether the UI component changes its state when a user pauses on it.
*/
get hoverStateEnabled(): boolean;
set hoverStateEnabled(value: boolean);
/**
* A URL pointing to the custom icon to be used for map markers.
*/
get markerIconSrc(): string;
set markerIconSrc(value: string);
/**
* An array of markers displayed on a map.
*/
get markers(): {
iconSrc?: string;
location?: Array<number> | string | {
lat?: number;
lng?: number;
}[];
onClick?: Function;
tooltip?: string | {
isShown?: boolean;
text?: string;
};
}[];
set markers(value: {
iconSrc?: string;
location?: Array<number> | string | {
lat?: number;
lng?: number;
}[];
onClick?: Function;
tooltip?: string | {
isShown?: boolean;
text?: string;
};
}[]);
/**
* The name of the current map data provider.
*/
get provider(): MapProvider;
set provider(value: MapProvider);
/**
* A provider configuration object.
*/
get providerConfig(): {
mapId?: string;
useAdvancedMarkers?: boolean;
};
set providerConfig(value: {
mapId?: string;
useAdvancedMarkers?: boolean;
});
/**
* An array of routes shown on the map.
*/
get routes(): {
color?: string;
locations?: {
lat?: number;
lng?: number;
}[];
mode?: RouteMode;
opacity?: number;
weight?: number;
}[];
set routes(value: {
color?: string;
locations?: {
lat?: number;
lng?: number;
}[];
mode?: RouteMode;
opacity?: number;
weight?: number;
}[]);
/**
* Switches the UI component to a right-to-left representation.
*/
get rtlEnabled(): boolean;
set rtlEnabled(value: boolean);
/**
* Specifies the number of the element when the Tab key is used for navigating.
*/
get tabIndex(): number;
set tabIndex(value: number);
/**
* The type of a map to display.
*/
get type(): MapType;
set type(value: MapType);
/**
* Specifies whether the UI component is visible.
*/
get visible(): boolean;
set visible(value: boolean);
/**
* Specifies the UI component's width.
*/
get width(): (() => number | string) | number | string;
set width(value: (() => number | string) | number | string);
/**
* The map's zoom level. The UI component can change this value if autoAdjust is enabled.
*/
get zoom(): number;
set zoom(value: number);
/**
* A function that is executed when any location on the map is clicked or tapped.
*/
onClick: EventEmitter<ClickEvent>;
/**
* A function that is executed before the UI component is disposed of.
*/
onDisposing: EventEmitter<DisposingEvent>;
/**
* A function used in JavaScript frameworks to save the UI component instance.
*/
onInitialized: EventEmitter<InitializedEvent>;
/**
* A function that is executed when a marker is created on the map.
*/
onMarkerAdded: EventEmitter<MarkerAddedEvent>;
/**
* A function that is executed when a marker is removed from the map.
*/
onMarkerRemoved: EventEmitter<MarkerRemovedEvent>;
/**
* A function that is executed after a UI component property is changed.
*/
onOptionChanged: EventEmitter<OptionChangedEvent>;
/**
* A function that is executed when the map is ready.
*/
onReady: EventEmitter<ReadyEvent>;
/**
* A function that is executed when a route is created on the map.
*/
onRouteAdded: EventEmitter<RouteAddedEvent>;
/**
* A function that is executed when a route is removed from the map.
*/
onRouteRemoved: EventEmitter<RouteRemovedEvent>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
accessKeyChange: EventEmitter<string | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
activeStateEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
apiKeyChange: EventEmitter<string | {
azure?: string;
bing?: string;
google?: string;
googleStatic?: string;
}>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
autoAdjustChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
centerChange: EventEmitter<Array<number> | string | {
lat?: number;
lng?: number;
}[]>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
controlsChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
disabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
elementAttrChange: EventEmitter<Record<string, any>>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
focusStateEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
heightChange: EventEmitter<(() => number | string) | number | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hintChange: EventEmitter<string | undefined>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
hoverStateEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
markerIconSrcChange: EventEmitter<string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
markersChange: EventEmitter<{
iconSrc?: string;
location?: Array<number> | string | {
lat?: number;
lng?: number;
}[];
onClick?: Function;
tooltip?: string | {
isShown?: boolean;
text?: string;
};
}[]>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
providerChange: EventEmitter<MapProvider>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
providerConfigChange: EventEmitter<{
mapId?: string;
useAdvancedMarkers?: boolean;
}>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
routesChange: EventEmitter<{
color?: string;
locations?: {
lat?: number;
lng?: number;
}[];
mode?: RouteMode;
opacity?: number;
weight?: number;
}[]>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
rtlEnabledChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
tabIndexChange: EventEmitter<number>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
typeChange: EventEmitter<MapType>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
visibleChange: EventEmitter<boolean>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
widthChange: EventEmitter<(() => number | string) | number | string>;
/**
* This member supports the internal infrastructure and is not intended to be used directly from your code.
*/
zoomChange: EventEmitter<number>;
get markersChildren(): QueryList<DxiMapMarkerComponent>;
set markersChildren(value: QueryList<DxiMapMarkerComponent>);
get routesChildren(): QueryList<DxiMapRouteComponent>;
set routesChildren(value: QueryList<DxiMapRouteComponent>);
get centerLegacyChildren(): QueryList<DxiCenterComponent>;
set centerLegacyChildren(value: QueryList<DxiCenterComponent>);
get markersLegacyChildren(): QueryList<DxiMarkerComponent>;
set markersLegacyChildren(value: QueryList<DxiMarkerComponent>);
get routesLegacyChildren(): QueryList<DxiRouteComponent>;
set routesLegacyChildren(value: QueryList<DxiRouteComponent>);
constructor(elementRef: ElementRef, ngZone: NgZone, templateHost: DxTemplateHost, _watcherHelper: WatcherHelper, _idh: IterableDifferHelper, optionHost: NestedOptionHost, transferState: TransferState, platformId: any);
protected _createInstance(element: any, options: any): DxMap;
ngOnDestroy(): void;
ngOnChanges(changes: SimpleChanges): void;
setupChanges(prop: string, changes: SimpleChanges): void;
ngDoCheck(): void;
_setOption(name: string, value: any): void;
static ɵfac: i0.ɵɵFactoryDeclaration<DxMapComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<DxMapComponent, "dx-map", never, { "accessKey": { "alias": "accessKey"; "required": false; }; "activeStateEnabled": { "alias": "activeStateEnabled"; "required": false; }; "apiKey": { "alias": "apiKey"; "required": false; }; "autoAdjust": { "alias": "autoAdjust"; "required": false; }; "center": { "alias": "center"; "required": false; }; "controls": { "alias": "controls"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "elementAttr": { "alias": "elementAttr"; "required": false; }; "focusStateEnabled": { "alias": "focusStateEnabled"; "required": false; }; "height": { "alias": "height"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "hoverStateEnabled": { "alias": "hoverStateEnabled"; "required": false; }; "markerIconSrc": { "alias": "markerIconSrc"; "required": false; }; "markers": { "alias": "markers"; "required": false; }; "provider": { "alias": "provider"; "required": false; }; "providerConfig": { "alias": "providerConfig"; "required": false; }; "routes": { "alias": "routes"; "required": false; }; "rtlEnabled": { "alias": "rtlEnabled"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "type": { "alias": "type"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "width": { "alias": "width"; "required": false; }; "zoom": { "alias": "zoom"; "required": false; }; }, { "onClick": "onClick"; "onDisposing": "onDisposing"; "onInitialized": "onInitialized"; "onMarkerAdded": "onMarkerAdded"; "onMarkerRemoved": "onMarkerRemoved"; "onOptionChanged": "onOptionChanged"; "onReady": "onReady"; "onRouteAdded": "onRouteAdded"; "onRouteRemoved": "onRouteRemoved"; "accessKeyChange": "accessKeyChange"; "activeStateEnabledChange": "activeStateEnabledChange"; "apiKeyChange": "apiKeyChange"; "autoAdjustChange": "autoAdjustChange"; "centerChange": "centerChange"; "controlsChange": "controlsChange"; "disabledChange": "disabledChange"; "elementAttrChange": "elementAttrChange"; "focusStateEnabledChange": "focusStateEnabledChange"; "heightChange": "heightChange"; "hintChange": "hintChange"; "hoverStateEnabledChange": "hoverStateEnabledChange"; "markerIconSrcChange": "markerIconSrcChange"; "markersChange": "markersChange"; "providerChange": "providerChange"; "providerConfigChange": "providerConfigChange"; "routesChange": "routesChange"; "rtlEnabledChange": "rtlEnabledChange"; "tabIndexChange": "tabIndexChange"; "typeChange": "typeChange"; "visibleChange": "visibleChange"; "widthChange": "widthChange"; "zoomChange": "zoomChange"; }, ["markersChildren", "routesChildren", "centerLegacyChildren", "markersLegacyChildren", "routesLegacyChildren"], never, false, never>;
}
export declare class DxMapModule {
static ɵfac: i0.ɵɵFactoryDeclaration<DxMapModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<DxMapModule, [typeof DxMapComponent], [typeof i1.DxoApiKeyModule, typeof i1.DxiCenterModule, typeof i1.DxiMarkerModule, typeof i1.DxiLocationModule, typeof i1.DxoTooltipModule, typeof i1.DxoProviderConfigModule, typeof i1.DxiRouteModule, typeof i2.DxoMapApiKeyModule, typeof i2.DxoMapCenterModule, typeof i2.DxoMapLocationModule, typeof i2.DxiMapMarkerModule, typeof i2.DxoMapProviderConfigModule, typeof i2.DxiMapRouteModule, typeof i2.DxoMapTooltipModule, typeof i2.DxiMapLocationModule, typeof i3.DxIntegrationModule, typeof i3.DxTemplateModule], [typeof DxMapComponent, typeof i1.DxoApiKeyModule, typeof i1.DxiCenterModule, typeof i1.DxiMarkerModule, typeof i1.DxiLocationModule, typeof i1.DxoTooltipModule, typeof i1.DxoProviderConfigModule, typeof i1.DxiRouteModule, typeof i2.DxoMapApiKeyModule, typeof i2.DxoMapCenterModule, typeof i2.DxoMapLocationModule, typeof i2.DxiMapMarkerModule, typeof i2.DxoMapProviderConfigModule, typeof i2.DxiMapRouteModule, typeof i2.DxoMapTooltipModule, typeof i2.DxiMapLocationModule, typeof i3.DxTemplateModule]>;
static ɵinj: i0.ɵɵInjectorDeclaration<DxMapModule>;
}
export { DxMapTypes };