declare namespace atlas { function getLanguage(): string; function getSessionId(): string; function getSubscriptionKey(): string; function getUserRegion(): string; function getVersion(): string; function isSupported(failIfMajorPreformanceCaveat?: boolean): boolean; function setLanguage(language: string): void; function setSessionId(id: string): void; function setSubscriptionKey(key: string): void; function setUserRegion(userRegion: string): void; function _hasSetSubscriptionKey(); function _hasSetSessionId(); function _hasSetLanguage(); function _hasSetUserRegion(); class Map { controls: ControlManager; events; imageSprite; layers; markers; sources; constructor(container: string, options: ServiceOptions & CameraOptions & StyleOptions & UserInteractionOptions); areTilesLoaded(): boolean; // Returns a boolean indicating if all tiles in the current viewport for all sources have loaded or not. clear(): void; // Removes all user added sources, layers, markers, and popups from the map. User added images are preserved. dispose(): void; // Clean up the map's resources. Map will not function correctly after calling this method. getCamera(): CameraOptions & CameraBoundsOptions; // Returns the camera's current properties. getCanvas(): HTMLCanvasElement; // Returns the HTMLCanvasElement that the map is drawn to. getCanvasContainer(): HTMLElement; // Returns the HTMLElement that contains the map's HTMLCanvasElement. The map's events (e.g. panning and zooming) are attached to this element. getMapContainer(): HTMLElement; // Returns the HTMLElement that contains the map. getServiceOptions(): ServiceOptions; // Returns the service options with which the map control was initialized. getStyle(): StyleOptions; // Returns the map control's current style settings. getTraffic(): TrafficOptions; // Return the map control's current traffic settings. getUserInteraction(): UserInteractionOptions; // Return the map control's current user interaction handler settings. pixelsToPositions(e: Pixel[]): Position[]; // Converts an array of Pixel objects to an array of geographic Positions objects on the map. positionsToPixels(e: Position[]): Pixel[]; // Converts an array of Positions objects to an array of Pixel objects relative to the map container. resize(eventData?: any): any; // Resize the map according to the dimensions of its container element. resize(height: number | string, width: number | string, eventData?: any): any; // Resize the map according to the dimensions of its container element. setCamera(options?: CameraOptions & AnimationOptions): void; // Set the camera of the map control with an animated transition. Any options not specified will default to their current values. setServiceOptions(options: ServiceOptions); // Set the service options. setStyle(options?: StyleOptions): void; // Set the map control's style options. Any options not specified will default to their current values. setTraffic(options?: TrafficOptions): void // Set the traffic options for the map. Any options not specified will default to their current values. setUserInteraction(options?: UserInteractionOptions): void; // Set the map control's user interaction handlers. Any options not specified will default to their current values. stop(): void; // Stops any animated transition that is currently underway. } class HtmlMarker { constructor(options: HtmlMarkerOptions); getOptions(): HtmlMarkerOptions; setOptions(options: HtmlMarkerOptions): void; togglePopup(): void; } class Shape { properties?: any; data: data.Feature | data.Geometry; constructor(data: data.Feature); constructor(data: data.Geometry, id?: string, properties?: any); addProperty(key: string, value: any): void; getBoundS(): data.BoundingBox; getCoordinates(): Position | Position[] | Position[][] | Position[][][]; getId(): string; getType(): string; isCircle(): boolean; setCoordinates(coords: Position | Position[] | Position[][] | Position[][][]): void; setProperties(properties: any): void; toJson(): data.Feature; } class Pixel extends Array { constructor(x: number, y: number); fromData(dta: object): Pixel; getX(pixel: Pixel): number; getY(pixel: Pixel): number; } class Popup { options?: PopupOptions; constructor(options?: PopupOptions); attach(map: Map): void; close(): void; isOpen(): boolean; open(map: Map): void; remove(): void; getOptions(): PopupOptions; setOptions(options?: PopupOptions): void; } class Polygon { bbox?: atlas.data.BoundingBox; getCoordinates: Position[][] type: string; static TYPE: string; constructor(coordinates: Position[][] | Position[], bbox?: atlas.data.BoundingBox); } namespace math { function boundingBoxToPolygon(bounds: atlas.data.BoundingBox): Polygon; function convertDistance(distance: number, fromUnits: string, toUnits: string, decimals?: number): number; function getCardinalSpline(positions: Position[], tension?: number, nodeSize?: number, close?: boolean): Position[]; function getDestination(origin: Position, heading: number, distance: number, units?: string): Position; function getDistanceTo(origin: Position, destination: Position, units?: string): number; function getEarthRadius(units?: string): number; function getGeodesicPath(path: atlas.data.LineString | Position[], nodeSize?: number): Position[]; function getHeading(origin: Position, destination: Position): number; function getLengthOfPath(path: atlas.data.LineString | Position[], units?: string): number; function getPixelHeading(origin: Position, destination: Position): number; function getPositionAlongPath(path: atlas.data.LineString | Position[], distance: number, units?: string): Position; function getRegularPolygonPath(origin: Position, radius: number, numberOfPositions: number, units?: string, offset?: number): Position[]; function interpolate(origin: Position, destination: Position, fraction?: number): Position; function mercatorPixelsToPositions(pixels: Pixel[], zoom: number): Position[]; function mercatorPositionsToPixels(positions: Position[], zoom: number): Pixel[]; function normalizeLatitude(lat: number): number; function normalizeLongitude(lng: number): number; function rotatePositions(positions: Position[], origin: Position, angle: number): Position[]; } namespace source { class Source { constructor(id?: string); getId(): string; } class DataSource extends Source { constructor(id?: string, options?: DataSourceOptions); add(data: atlas.data.FeatureCollection | atlas.data.Feature | atlas.data.Geometry | atlas.data.GeometryCollection | Shape | Array | atlas.data.Geometry | Shape>, index?: number): void; clear(): void; dispose(): void; getClusterChildren(clusterId: number): Promise | atlas.Shape>; getClusterExpansionZoom(clusterId: number): Promise; getClusterLeaves(clusterId: number, limit: number, offset: number): Promise | atlas.Shape>; getOptions(): DataSourceOptions; getShapeById(id: string): Shape; getShapes(filter?: Expression): Shape[]; importDataFromUrl(url: string): Promise; remove(shape: number | string | Shape | atlas.data.Feature); setOptions(options: DataSourceOptions): void; setShapes(shape: atlas.data.FeatureCollection | Array | atlas.data.Geometry | Shape>): any; toJson(): atlas.data.FeatureCollection; } class VectorTileSource { constructor(id?: string, options?: VectorTileSourceOptions); getOptions(): VectorTileSourceOptions; getShape(sourceLayer: string, filter?: Expression): Array>; } } namespace layer { class Layer { metadata?: any; constructor(id?: string); getId(): string; } class BubbleLayer extends Layer { constructor(source: string | SourceBuffer, id?: string, options?: BubbleLayerOptions); getOptions(): BubbleLayerOptions; getSource(): string | atlas.source.Source; setOptions(options: BubbleLayerOptions): void; } class ImageLayer extends Layer { constructor(options: ImageLayerOptions, id?: string); getOptions(): ImageLayerOptions; setOptions(options: ImageLayerOptions): void; getCoorinatesFromEdges(north: number, south: number, east: number, west: number, rotation?: number): Position[]; } class SymbolLayer extends Layer { constructor(source: string | atlas.source.Source, id?: string, options?: SymbolLayerOptions); getOptions(): SymbolLayerOptions; getSource(): string | atlas.source.Source; setOptions(options: SymbolLayerOptions): void; } class HeatMapLayer extends Layer { constructor(source: string | atlas.source.Source, id?: string, options?: HeatMapLayerOptions); getOptions(): HeatMapLayerOptions; getSource(): string | atlas.source.Source; setOptions(options: HeatMapLayerOptions): void; } class LineLayer extends Layer { constructor(source: string | atlas.source.Source, id?: string, options?: LineLayerOptions); getOptions(): LineLayerOptions; getSource(): string | atlas.source.Source; } class PolygonLayer extends Layer { constructor(source: string | atlas.source.Source, id?: string, options?: PolygonLayerOptions); getOptions(): PolygonLayerOptions; getSource(): string | atlas.source.Source; setOptions(options: PolygonLayerOptions): void; } class TileLayer extends Layer { constructor(source: string | atlas.source.Source, id?: string, options?: TileLayerOptions); getOptions(): TileLayerOptions; setOptions(options: TileLayerOptions): void; } } namespace controls { class CompassControl { constructor(options?: CompassControlOptions); onAdd(map: Map, options: ControlOptions): HTMLElement; onRemove(); } class PitchControl { constructor(options?: PitchControlOptions); onAdd(map: Map, options: ControlOptions): HTMLElement; onRemove(); } class StyleControl { constructor(options?: StyleControlOptions); onAdd(map: Map, options: ControlOptions): HTMLElement; onRemove(); } class ZoomControl { constructor(options?: ZoomControlOptions); onAdd(map: Map, options: ControlOptions): HTMLElement; onRemove(); } } namespace data { type G = any; type P = any; class BoundingBox { constructor(positions: number[]); constructor(southwestPosition: Position, northeastPosition: Position); containsPosition(bounds: BoundingBox, position: Position): boolean; crossesAntimeridian(bounds: BoundingBox): boolean; fromBoundingBox(boundingBox: BoundingBox): BoundingBox; fromData(data: FeatureCollection | Feature | Geometry | Shape | Array | Geometry>): BoundingBox; fromDimensions(center: Position, width: number, height: number): BoundingBox; fromEdges(west: number, south: number, east: number, north: number): BoundingBox; fromLatLngs(latLngs: Array): BoundingBox; fromPositions(positions: Position[]): BoundingBox; getCenter(bounds: BoundingBox): Point; getEast(bounds: BoundingBox): number; getHeight(bounds: BoundingBox): number; getNorth(bounds: BoundingBox): number; getNorthEast(bounds: BoundingBox): Position; getNorthWest(bounds: BoundingBox): Position; getSound(bounds: BoundingBox): number; getSouthEast(bounds: BoundingBox): Position; getSouthWest(bounds: BoundingBox): Position; getWest(bounds: BoundingBox): number; getWidth(bounds: BoundingBox): number; intersect(bounds1: BoundingBox, bounds2: BoundingBox): boolean; merge(bounds1: BoundingBox, bounds2: BoundingBox): BoundingBox; splitOnAntimeridian(bounds: BoundingBox): BoundingBox[]; } class Feature { properties?: P; id?: string; geometry: any; type: string; static TYPE: string; constructor(geometry: G, properties?: P, id?: string) } class FeatureCollection { features: Feature[]; type: string; static TYPE: string; constructor(features: Array>); } class GeometryCollection { geometries: Geometry[]; type: string; static TYPE: string; constructor(geometries: Geometry[]); } class LineString { bbox?: BoundingBox; coordinates: Position; type: string; static TYPE: string; constructor(coordinates: Position, bbox?: BoundingBox); } class MultiLineString { bbox?: BoundingBox; coordinates: Position[][]; type: string; static TYPE: string; constructor(coordinates: Position[][], bbox?: BoundingBox); } class MultiPoint { public bbox?: BoundingBox; public coordinates?: Position[]; public type: string; public static TYPE: string; constructor(coordinates: Position[], bbox?: BoundingBox); } class MultiPolygon { bbox?: BoundingBox; coordinates: Position[][][]; type: string; static TYPE: string; constructor(coordinates: Position[][][], bbox?: BoundingBox); } class Point { coordinates: Position; type: string; static TYPE: string; constructor(coordinates: Position); } class Polygon { bbox?: BoundingBox; coordinages?: Position[][]; type: string; static TYPE: string; constructor(coordinates: Position[][] | Position[], bbox?: BoundingBox); } class Position { constructor(longitude: number, latitude: number, elevation?: number); areEqual(pos1: Position, pos2: Position, precision?: number): boolean; fromLatLng(latLng: object): Position; fromLatLng(lat: number, lng: number, elv?: number): Position; fromLatLng(latLng: number[]): Position; fromLatLngs(latLngs: Array): Position[]; fromPosition(position: Position): Position; } type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon; } // interfaces interface Options { } interface ServiceOptions extends Options { disableTelemetry?: boolean; enableAccessibility?: boolean; sessionId?: string; subscriptionKey?: string; } interface CameraOptions extends Options { bearing?: number; center?: Position; centerOffset?: atlas.Pixel; maxZoom?: number; minZoom?: number; pitch?: number; zoom?: number; } interface CameraBoundsOptions extends Options { bounds?: atlas.data.BoundingBox; maxZoom?: number; offset?: atlas.Pixel; padding?: Padding | number; } interface Padding extends Options { bottom: number; left: number; right: number; top: number; } interface ImageLayerOptions extends Options { coordinates?: Position[]; url?: string; } interface StyleOptions extends Options { autoResize?: boolean; language?: string; style?: string; userRegion?: string; } interface UserInteractionOptions extends Options { boxZoomInteraction?: boolean; dblClickZoomInteraction?: boolean; dragPanInteraction?: boolean; dragRotationInteraction?: boolean; interactive?: boolean; keyboardInteraction?: boolean; scrollZoomInteraction?: boolean; touchInteraction?: boolean; } interface PopupOptions extends Options { closeButton?: boolean; content?: string | HTMLElement; pixelOffset?: atlas.Pixel | number[]; position?: Position | number[]; } interface HtmlMarkerOptions extends Options { color?: string; dragable?: boolean; htmlContent?: string | HTMLElement; pixelOffset?: atlas.Pixel; popup?: atlas.Popup; positon?: Position; text?: string; visible?: boolean; } interface VectorTileSourceOptions extends Options { bounds?: atlas.data.BoundingBox; isTMS?: boolean; maxZoom?: number; minZoom?: number; tileSize?: number; tiles?: string[] url?: string } interface TrafficOptions extends Options { flow?: "none" | "relative" | "absolute" | "relative-delay"; incidents?: boolean; } interface AnimationOptions extends Options { duration?: number; type?: "jump" | "ease" | "fly"; } interface Expression extends Array { } interface StyleFunction { base?: number; colorSpace?: "rgb" | "lab" | "hcl"; default?: any; property?: string; stops?: any[][]; type?: "identity" | "exponential" | "interval" | "categorical"; } interface BubbleLayerOptions extends Options { blur?: number | Expression | StyleFunction; color?: number | Expression | StyleFunction; opacity?: number | Expression | StyleFunction; radius?: number | Expression | StyleFunction; source: string | atlas.source.Source; sourceLayer?: string; strokeColor?: number | Expression | StyleFunction; strokeOpacity?: number | Expression | StyleFunction; strokeWidth?: number | Expression | StyleFunction; } interface IconOptions extends Options { allowOverlap?: boolean; anchor?: "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right"; ignorePlacement?: boolean; image?: string | Expression | StyleFunction; offset?: atlas.Pixel | Expression | StyleFunction; opacity?: number | Expression | StyleFunction; optional?: boolean; rotation?: number | Expression | StyleFunction; rotationAlignment?: "auto" | "map" | "viewport"; size?: number | Expression | StyleFunction; } interface TextOptions extends Options { allowOverlap?: boolean; anchor?: "center" | "left" | "right" | "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right"; color?: string | Expression | StyleFunction; font?: string[] | Expression; haloBlur?: number | Expression | StyleFunction; haloColor?: string | Expression | StyleFunction; haloWidth?: number | Expression | StyleFunction; ignorePlacement?: boolean; offset?: atlas.Pixel | Expression; opacity?: number | Expression | StyleFunction; optional?: boolean; size?: number | Expression | StyleFunction; textField?: string | Expression | StyleFunction; } interface SymbolLayerOptions extends Options { iconOptions?: IconOptions; lineSpacing?: number | Expression; placement?: "point" | "line"; source: string | atlas.source.Source; sourceLayer?: string; textOptions?: TextOptions; } interface HeatMapLayerOptions extends Options { color?: Expression; intensity: number | Expression; opacity: number | Expression; radius?: number | Expression; source: string | source.Source sourceLayer?: string weight?: number | Expression | StyleFunction; } interface LineLayerOptions extends Options { blur?: number | Expression | StyleFunction; lineCap?: "butt" | "round" | "square"; lineJoin?: "bevel" | "round" | "miter"; offset?: number | Expression | StyleFunction; source: string | source.Source; sourceLayer?: string; strokeColor?: string | Expression | StyleFunction; strokeDashArray?: number[]; strokeGradient?: string | Expression | StyleFunction; strokeOpacity?: number | Expression | StyleFunction; strokeWidth?: number | Expression | StyleFunction; } interface PolygonLayerOptions extends Options { fillColor: string | Expression | StyleFunction; fillOpacity?: string | Expression | StyleFunction; fillPattern?: string; source: string | source.Source; sourceLayer?: string; } interface TileLayerOptions extends Options { bounds?: data.BoundingBox; isTMS?: boolean; maxSourceZoom?: number; minSourceZoom?: number; subdomains?: string[]; tileSize?: number; tileUrl?: string; } interface DataSourceOptions extends Options { cluster?: boolean; clusterMaxZoom?: number; clusterRadius?: number; lineMetrics?: boolean; maxZoom?: number; tolerance?: number; } interface Control { onAdd(map: atlas.Map, options: ControlOptions): HTMLElement; onRemove(); } enum ControlPosition { BottomLeft = 0, BottomRight, NonFixed, TopLeft, TopRight, } interface ControlOptions { position?: ControlPosition; } enum ControlStyle { dark = 0, lignt } interface ControlManager { add(control: Control | Control[], options?: ControlOptions): void; remove(options?: ControlOptions): void; } interface CompassControlOptions extends Options { rotationDegreesDelta: number; style: ControlStyle; } interface PitchControlOptions extends Options { pitchDegreesDelta: number; style: ControlStyle; } interface StyleControlOptions extends Options { style: ControlStyle; } interface ZoomControlOptions extends Options { style: ControlStyle; zoomDelta: number; } }