forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Microsoft.Maps.VenueMaps.d.ts
138 lines (113 loc) · 3.5 KB
/
Microsoft.Maps.VenueMaps.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
// Type definitions for Microsoft.Maps.VenueMaps 7.0
// Project: http://msdn.microsoft.com/en-us/library/hh312797.aspx
// Definitions by: Eric Todd <https://github.com/ericrtodd>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="Microsoft.Maps.d.ts"/>
declare module Microsoft.Maps.VenueMaps {
export interface MouseResponse {
eventArgs: MouseEventArgs;
}
export interface PrimitiveResponse {
eventArgs: Primitive;
}
export interface Directory {
addToDOM(div: HTMLElement, sortOrder: DirectorySortOrder, to_group_or_not: DirectoryGrouping): void;
createUIElements(): void;
handleMouseClick(e: (response: MouseResponse) => void): void;
handleMouseClick(e: (response: PrimitiveResponse) => void): void;
handleMouseOut(e: (response: MouseResponse) => void): void;
handleMouseOut(e: (response: PrimitiveResponse) => void): void;
handleMouseOver(e: (response: MouseResponse) => void): void;
handleMouseOver(e: (response: PrimitiveResponse) => void): void;
isInDOM(): boolean;
removeFromDOM(): void;
setHeight(height: number): void;
}
export enum DirectoryGrouping {
byCategory,
none,
}
export enum DirectorySortOrder {
alphabetical,
byFloor,
}
export interface Floor {
name: string;
primitives: Array<Primitive>;
zoomRange: Array<number>;
}
export interface Footprint {
polygons: Array<Polygon>;
zoomRange: Array<number>;
}
export interface Metadata {
CenterLatitude: number;
CenterLongitude: number;
DefaultFloor: string;
FloorHeader: string;
Floors: Array<Floor>;
Footprint: Footprint;
MapId: string;
MapType: string;
Name: string;
YpId: string;
}
export interface NearbyVenue {
distance: number;
metadata: Metadata;
}
export interface NearbyVenueOptions {
callback?: (maps: Array<VenueMap>) => any;
location?: Location;
map?: Map;
radius?: number;
}
export interface Polygon {
bounds: LocationRect;
center: Location;
locations: Array<Location>;
}
export interface Primitive {
bounds: LocationRect;
businessId: string;
categoryId: string;
categoryName: string;
center: Location;
floor: Floor;
id: string;
locations: Array<Location>;
name: string;
highlight(): void;
unhighlight(): void;
}
export interface VenueMap {
address: string;
bestMapView: ViewOptions;
businessId: string;
center: Location;
defaultFloor: string;
directory: Directory;
floorHeader: string;
floors: Array<Floor>;
footprint: Footprint;
id: string;
name: string;
phoneNumber: string;
type: string;
dispose(): void;
getActiveFloor(): string;
hide(): void;
setActiveFloor(floor: string): void;
show(): void;
}
export interface VenueMapCreationOptions {
error: (errorCode: number, args: any) => any;
success: (venueMap: VenueMap, args: any) => any;
venueMapId: string;
}
export class VenueMapFactory {
constructor(map: Map);
create(options: VenueMapCreationOptions): void;
getNearbyVenues(options: NearbyVenueOptions): void;
}
}