diff --git a/bingmaps/Microsoft.Maps.AdvancedShapes.d.ts b/bingmaps/Microsoft.Maps.AdvancedShapes.d.ts new file mode 100644 index 0000000000..c7446f19fd --- /dev/null +++ b/bingmaps/Microsoft.Maps.AdvancedShapes.d.ts @@ -0,0 +1,50 @@ +declare module Microsoft.Maps.AdvancedShapes { + + export class EntityCollection { + + constructor(options: EntityCollectionOptions); + + clear(): void; + get(index: number): Entity; + getLength(): number; + getVisible(): boolean; + getZIndex(): number; + indexOf(entity: Entity): number; + insert(entity: Entity, index: number): void; + pop(): Entity; + push(entity: Entity); + remove(entity: Entity): Entity; + removeAt(index: number): Entity; + setOptions(options: EntityCollectionOptions): void; + toString(): string; + + entityAdded: (args: EntityChangeArgs) => any; + entityChanged: (args: EntityChangeArgs) => any; + entityRemoved: (args: EntityChangeArgs) => any; + } + + export class Polygon implements Entity { + + constructor(locations: Array, options?: PolygonOptions); + + getFillColor(): Color; + getLocations(): Array; + getStrokeColor(): Color; + getStrokeDashArray(): string; + getStrokeThickness(): number; + getVisible(): boolean; + setLocations(locations: Location[]): void; + setOptions(options: PolylineOptions): void; + toString(): string; + + click: (eventArgs: MouseEventArgs) => void; + dbclick: (eventArgs: MouseEventArgs) => void; + entitychanged: (entity: Entity) => void; + mousedown: (eventArgs: MouseEventArgs) => void; + mouseout: (eventArgs: MouseEventArgs) => void; + mouseover: (eventArgs: MouseEventArgs) => void; + mouseup: (eventArgs: MouseEventArgs) => void; + rightclick: (eventArgs: MouseEventArgs) => void; + } + +} \ No newline at end of file diff --git a/bingmaps/Microsoft.Maps.Directions.d.ts b/bingmaps/Microsoft.Maps.Directions.d.ts new file mode 100644 index 0000000000..b55262c97c --- /dev/null +++ b/bingmaps/Microsoft.Maps.Directions.d.ts @@ -0,0 +1,454 @@ +declare module Microsoft.Maps.Directions { + + export interface BusinessDetails { + + businessName?: string; + entityId?: string; + phoneNumber?: string; + website?: string; + } + + export interface WaypointOptions { + + address?: string; + businessDetails?: BusinessDetails; + disambiguationContainer?: HTMLElement; + exactLocation?: string; + isViapoint?: boolean; + location?: Location; + pushpin?: Pushpin; + shortAddress?: string; + } + + export interface BusinessDisambiguationSuggestion { + + address?: string; + distance?: number; + entityId?: number; + index?: number; + isApproximate?: boolean; + location?: Location; + name?: string; + phoneNumber?: string; + photoUrl?: string; + rooftopLocation?: Location; + website?: string; + } + + export interface LocationDisambiguationSuggestion { + + formattedSuggestion?: string; + location?: Location; + rooftopLocation?: Location; + suggestion?: string; + } + + export interface Disambiguation { + + businessSuggestions?: Array; + hasMoreSuggestions?: boolean; + headerText?: string; + locationSuggestions?: Array; + } + + export interface WaypointEventArgs { + + waypoint: Waypoint; + } + + export class Waypoint { + + constructor(options: WaypointOptions); + + clear(): void; + dispose(): void; + getAddress(): string; + getBusinessDetails(): BusinessDetails; + getDisambiguationContainer(): HTMLElement; + getDisambiguationResult(): Disambiguation; + getLocation(): Location; + getPushpin(): Pushpin; + getShortAddress(): string; + isExactLocation(): boolean; + isViapoint(): boolean; + setOptions(options: WaypointOptions); + + changed: (args: WaypointEventArgs) => void; + geocoded: (args: WaypointEventArgs) => void; + reverseGeocoded: (args: WaypointEventArgs) => void; + } + + export interface DirectionsRenderOptions { + + autoDisplayDisambiguation?: boolean; + autoUpdateMapView?: boolean; + disambiguationPushpinOptions?: PushpinOptions; + displayDisclaimer?: boolean; + displayManeuverIcons?: boolean; + displayPostItineraryItemHints?: boolean; + displayPreItineraryItemHints?: boolean; + displayRouteSelector?: boolean; + displayStepWarnings?: boolean; + displayTrafficAvoidanceOption?: boolean; + displayWalkingWarning?: boolean; + drivingPolylineOptions?: PolylineOptions; + itineraryContainer?: HTMLElement; + lastWaypointIcon?: string; + middleWaypointIcon?: string; + stepPushpinOptions?: PushpinOptions; + transitPolylineOptions?: PolylineOptions; + viapointPushpinsOptions?: PushpinOptions; + walkingPolylineOptions?: PolylineOptions; + waypointPushpinOptions?: PushpinOptions; + } + + export enum DistanceUnit { + kilometers= 0, + miles= 1 + } + + export enum RouteAvoidance { + none= 0, + minimizeLimitedAccessHighway= 1, + minimizeToll= 2, + avoidLimitedAccessHighway= 4, + avoidToll= 8, + avoidExpressTrain= 16, + avoidAirline= 32, + avoidBulletTrain= 64 + } + + export enum RouteMode { + driving, + transit, + walking + } + + export enum RouteOptimization { + shortestTime= 0, + shortestDistance= 1, + minimizeMoney= 3, + minimizeTransfers= 4, + minimizeWalking= 5 + } + + export enum TimeType { + arrival, + departure, + lastAvailable + } + + export interface TransitOptions { + timeType?: TimeType; + transitTime?: Date; + } + + export interface DirectionsRequestOptions { + + avoidTraffic?: boolean; + distanceUnit?: DistanceUnit; + maxRoutes?: number; + routeAvoidance?: Array; + routeDraggable?: boolean; + routeIndex?: boolean; + routeMode?: RouteMode; + routeOptimization?: RouteOptimization; + transitOptions?: TransitOptions; + } + + export class DirectionsManager { + + constructor(map: Microsoft.Maps.Map); + + resetDirections(): void; + addWaypoint(waypoint: Waypoint, index?: number) : void; + calculateDirections(): void; + clearDisplay(): void; + dispose(): void; + getAllWaypoints(): Array; + getMap(): Map; + getNearbyMajorRoads(location: Location, callback: any, errorCallback: any, userData: any) : void; + getRenderOptions(): DirectionsRenderOptions; + getRequestOptions(): DirectionsRequestOptions; + getRouteResult(): Array; + removeWaypoint(waypoint: Waypoint) : void; + removeWaypoint(index: number) : void; + resetDirections(options: ResetDirectionsOptions) : void; + reverseGeocode(location: Location, callback: any, errorCallback: any, userData: any); + setMapView(): void; + setRenderOptions(options: DirectionsRenderOptions): void; + setRequestOptions(options: DirectionsRequestOptions):void; + + afterRouteSelectorRender: (args:RouteSelectorRenderEventArgs) => void; + afterStepRender: (args:DirectionsStepRenderEventArgs) => void; + afterSummaryRender: (args:RouteSummaryRenderEventArgs) => void; + afterWaypointRender: (args:WaypointRenderEventArgs) => void; + beforeDisambiguationRender: (args:DisambiguationRenderEventArgs) => void; + beforeRouteSelectorRender: (args:RouteSelectorRenderEventArgs) => void; + beforeStepRender: (args:DirectionsStepRenderEventArgs) => void; + beforeSummaryRender: (args:RouteSummaryRenderEventArgs) => void; + beforeWaypointRender: (args:WaypointRenderEventArgs) => void; + directionsError: (args:DirectionsErrorEventArgs) => void; + directionsUpdated: (args:DirectionsEventArgs) => void; + dragDropCompleted: () => void; + itineraryStepClicked: (args:DirectionsStepEventArgs) => void; + mouseEnterRouteSelector: (args:RouteSelectorEventArgs) => void; + mouseEnterStep: (args:DirectionsStepEventArgs) => void; + mouseLeaveRouteSelector: (args:RouteSelectorEventArgs) => void; + mouseLeaveStep: (args:DirectionsStepEventArgs) => void; + routeSelectorClicked: (args:RouteSelectorEventArgs) => void; + waypointAdded: (args:WaypointEventArgs) => void; + waypointRemoved: (args:WaypointEventArgs) => void; + } + + export interface DirectionsStepEventArgs { + handled: boolean; + location: Location; + routeIndex: number; + routeLegIndex: number; + step: DirectionsStep; + stepIndex: number; + stepNumber: number; + } + + export interface DirectionsErrorEventArgs { + responseCode: RouteResponseCode; + message: string; + } + + export interface DirectionsEventArgs { + routeSummary: Array; + route: Array; + } + + export interface DisambiguationRenderEventArgs { + containerElement: HTMLElement; + handled: boolean; + waypoint: Waypoint; + } + + export interface DirectionsStepRenderEventArgs { + containerElement: HTMLElement; + handled: boolean; + lastStep: boolean; + routeIndex: number; + routeLegIndex: number; + step: DirectionsStep; + stepIndex: number; + } + + export interface RouteSummaryRenderEventArgs { + containerElement: HTMLElement; + handled: boolean; + routeLegIndex: number; + summary: RouteSummary; + } + + export interface WaypointRenderEventArgs { + containerElement: HTMLElement; + handled: boolean; + waypoint: Waypoint; + } + + export interface DirectionsStep { + + childItineraryItems: Array; + coordinate: Location; + distance: string; + durationInSeconds: number; + formattedText: string; + iconType: IconType; + isImageRoadShield: boolean; + maneuver: Maneuver; + maneuverImageName: string; + monetaryCost: number; + postIntersectionHints: Array; + preIntersectionHings: Array; + startStopName: string; + transitLine: TransitLine; + transitStepIcon: string; + transitStopId: string; + transitTerminus: string; + warnings: Array; + } + + export enum IconType { + none, + other, + auto, + ferry, + walk, + bus, + train, + airline + } + + export enum Maneuver { + none= 0, + unknown= 1, + departStart= 2, + departIntermediateStop= 3, + departIntermediateStopReturning= 4, + arriveFinish= 5, + arriveIntermediateStop= 6, + turnLeft= 7, + turnRight= 8, + turnBack= 9, + uTurn= 10, + turnToStayLeft= 11, + turnToStayRight= 12, + bearLeft= 13, + bearRight= 14, + keepToStayLeft= 15, + keepToStayRight= 16, + keepToStayStraight= 17, + keepLeft= 18, + keepRight= 19, + keepStraight= 20, + take= 21, + takeRampLeft= 22, + takeRampRight= 23, + takeRampStraight= 24, + keepOnRampLeft= 25, + keepOnRampRight= 26, + keepOnRampStraight= 27, + merge= 28, + continueRoute= 29, + roadNameChange= 30, + enterRoundabout= 31, + exitRoundabout= 32, + turnRightThenTurnRight= 33, + turnRightThenTurnLeft= 34, + turnRightThenBearRight= 35, + turnRightThenBearLeft= 36, + turnLeftThenTurnLeft= 37, + turnLeftThenTurnRight= 38, + turnLeftThenBearLeft= 39, + turnLeftThenBearRight= 40, + bearRightThenTurnRight= 41, + bearRightThenTurnLeft= 42, + bearRightThenBearRight= 43, + bearRightThenBearLeft= 44, + bearLeftThenTurnLeft= 45, + bearLeftThenTurnRight= 46, + bearLeftThenBearRight= 47, + bearLeftThenBearLeft= 48, + rampThenHighwayRight= 49, + rampThenHighwayLeft= 50, + rampToHighwayStraight= 51, + enterThenExitRoundabout= 52, + bearThenMerge= 53, + turnThenMerge= 54, + bearThenKeep= 55, + transfer= 56, + wait = 57, + takeTransit= 58, + walk = 59, + transitDepart = 60, + transitArrive= 61, + } + + export interface TransitLine { + abbreviatedName: string; + agencyId: number; + agencyName: string; + agencyUrl: string; + lineColor: Color; + lineTextColor: Color; + providerInfo: string; + verboseName: string; + } + + export interface DirectionsStepWarning { + style: StepWarningStyle; + text: string; + } + + export enum StepWarningStyle { + info= 0, + minor= 1, + moderate= 2, + major= 3, + ccZoneEnter= 4, + ccZoneExit= 5 + } + + export interface ResetDirectionsOptions { + removeAllWaypoints?: boolean; + resetRenderOptions?: boolean; + resetRequestOptions?: boolean; + } + + export interface Route { + routeLegs: Array; + } + + export interface RouteLeg { + endTime: Date; + endWaypointLocation: Location; + itineraryItems: Array; + originalRouteIndex: number; + startTime: Date; + startWaypointLocation: Location; + subLegs: Array; + summary: RouteSummary; + } + + export interface RouteSubLeg { + actualEnd: Location; + actualStart: Location; + endDescription: string; + routePath: RoutePath; + startDescription: string; + summary: RouteSummary; + } + + export interface RoutePath { + decodedLatitudes: Array; + decodedLongitudes: Array; + decodedRegions: Array; + } + + export interface RouteSummary { + distance: number; + monetaryCost: number; + northEast: Location; + southWest: Location; + time: number; + timeWithTraffic: number; + } + + export enum RouteResponseCode { + success= 0, + unknownError= 1, + cannotFindNearbyRoad= 2, + tooFar= 3, + noSolution= 4, + dataSourceNotFound= 5, + noAvailableTransitTrip= 7, + transitStopsTooClose= 8, + walkingBestAlternative= 9, + outOfTransitBounds= 10, + timeout= 11, + waypointDisambiguation= 12, + hasEmptyWaypoint= 13, + exceedMaxWaypointLimit= 14, + atleastTwoWaypointRequired= 15, + firstOrLastStoppointsIsVia= 16, + searchServiceFailed= 17, + invalidCredentials= 18 + } + + export interface RouteSelectorEventArgs { + handled: boolean; + routeIndex: number; + } + + export interface RouteSelectorRenderEventArgs { + containerElement: HTMLElement; + handled: boolean; + routeIndex: number; + routeLeg: RouteLeg; + } + +} \ No newline at end of file diff --git a/bingmaps/Microsoft.Maps.Search.d.ts b/bingmaps/Microsoft.Maps.Search.d.ts new file mode 100644 index 0000000000..b1ef8be5ae --- /dev/null +++ b/bingmaps/Microsoft.Maps.Search.d.ts @@ -0,0 +1,145 @@ + declare module Microsoft.Maps.Search { + + export interface Address { + addressLine: string; + adminDistrict: string; + countryRegion: string; + district: string; + formattedAddress: string; + locality: string; + postalCode: string; + postalTown:string; + } + + export interface GeocodeLocation { + location: Location; + name: string; + precision:LocationPrecision; + } + + export interface GeocodeRequestOptions { + bounds: LocationRect; + callback: (result: GeocodeResult, userData: any) => any; + count: number; + errorCallback: (options: GeocodeRequestOptions) => any; + timeout: number; + userData: any; + where:string; + } + + export interface GeocodeResult { + parsedAddress: Address; + parsedKeyword: string; + parsedSeparator: string; + results:Array; + } + + export enum LocationPrecision { + interpolated, + rooftop, + } + + export enum MatchCode { + none, + good, + ambiguous, + upHierarchy, + modified, + } + + export enum MatchConfidence { + high, + medium, + low, + unknown, + } + + export interface PlaceResult { + bestView: LocationRect; + location: GeocodeLocation; + locations: Array; + matchCode: MatchCode; + matchConfidence: MatchConfidence; + name:string; + } + + export interface ReverseGeocodeRequestOptions { + callback: (result: PlaceResult, userData: any) => any; + errorCallback: (options: ReverseGeocodeRequestOptions) => any; + location: Location; + timeout: number; + userData:any; + } + + export class SearchManager { + + constructor(map: Map); + + geocode(request: GeocodeRequestOptions): void; + reverseGeocode(request: ReverseGeocodeRequestOptions): void; + search(request:SearchRequestOptions):void; + } + + export interface SearchParseResult { + keyword: string; + location: GeocodeLocation; + matchConfidence:MatchConfidence; + } + + export interface SearchRegion { + address: Address; + geocodeLocations: Array; + explicitLocation: GeocodeLocation; + mapBounds: LocationRect; + matchCode: MatchCode; + matchConfidence: MatchConfidence; + source:string; + } + + export interface SearchRequestOptions { + callback:(result: SearchResponse, userData: any)=>any; + count: number; + errorCallback:(options: SearchRequestOptions)=>any; + query: string; + startIndex: number; + timeout: number; + entityType: string; + userData: any; + what: string; + where:string; + } + + export interface SearchResponse { + alternateSearchRegions: Array; + hasMore: boolean; + parseResults: Array; + responseSummary: SearchResponseSummary; + searchRegion: SearchRegion; + searchResults:Array; + } + + export interface SearchResponseSummary { + authResultCode: number; + copyright: string; + errorMessage: string; + statusCode: number; + traceId:number; + } + + export interface SearchResult { + address: Address; + city: string; + country: string; + entityType: string; + hoursOfOperation: string; + id: number; + location: Location; + name: string; + phone: string; + postalCode: string; + reviewCount: number; + userRating: number; + website:string; + } + + } \ No newline at end of file diff --git a/bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts b/bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts new file mode 100644 index 0000000000..6d45c78f73 --- /dev/null +++ b/bingmaps/Microsoft.Maps.Themes.BingTheme.d.ts @@ -0,0 +1,7 @@ +declare module Microsoft.Maps.Themes { + + export class BingTheme { + constructor(); + } + +} \ No newline at end of file diff --git a/bingmaps/Microsoft.Maps.Traffic.d.ts b/bingmaps/Microsoft.Maps.Traffic.d.ts new file mode 100644 index 0000000000..5978483e0f --- /dev/null +++ b/bingmaps/Microsoft.Maps.Traffic.d.ts @@ -0,0 +1,17 @@ +declare module Microsoft.Maps.Traffic { + + export class TrafficManager { + + constructor(map: Map); + + hide(): void; + hideFlow(): void; + hideIncidents(): void; + hideLegend(): void; + show(): void; + showFlow(): void; + showIncidents(): void; + showLegend():void; + } + +} \ No newline at end of file diff --git a/bingmaps/Microsoft.Maps.VenueMaps.d.ts b/bingmaps/Microsoft.Maps.VenueMaps.d.ts new file mode 100644 index 0000000000..2d690a7b99 --- /dev/null +++ b/bingmaps/Microsoft.Maps.VenueMaps.d.ts @@ -0,0 +1,134 @@ +declare module Microsoft.Maps.VenueMaps { + + export interface MouseResponse { + eventArgs: MouseEventArgs; + } + + export interface Directory { + + addToDOM(div: HTMLElement, sortOrder: DirectorySortOrder, to_group_or_not: DirectoryGrouping): void; + createUIElements(): void; + handleMouseClick(response: MouseResponse): void; + handleMouseOut(response: MouseResponse): void; + handleMouseOver(response: MouseResponse): void; + isInDOM(): boolean; + removeFromDOM(): void; + setHeight(height: number); + + click: (eventArgs: MouseEventArgs) => any; + mouseOut: (eventArgs: MouseEventArgs) => any; + mouseOver: (eventArgs: MouseEventArgs) => any; + } + + export enum DirectoryGrouping { + byCategory, + none, + } + + export enum DirectorySortOrder { + alphabetical, + byFloor, + } + + export interface Floor { + name: string; + primitives: Array; + zoomRange: Array; + } + + export interface Footprint { + polygons: Array; + zoomRange: Array; + } + + export interface Metadata { + CenterLatitude: number; + CenterLongitude: number; + DefaultFloor: string; + FloorHeader: string; + Floors: Array; + Footprint: Footprint; + MapId: string; + MapType: string; + Name: string; + YpId: string; + } + + export interface NearbyVenue { + distance: number; + metadata: Metadata; + } + + export interface NearbyVenueOptions { + callback: (maps: Array) => any; + location: Location; + map: Map; + radius: number; + } + + export interface Polygon { + bounds: LocationRect; + center: Location; + locations: Array; + } + + export interface Primitive { + + bounds: LocationRect; + businessId: string; + categoryId: string; + categoryName: string; + center: Location; + floor: Floor; + id: string; + locations: Array; + 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; + footprint: Footprint; + id: string; + name: string; + phoneNumber: string; + type: string; + + dispose(): void; + getActiveFloor(): string; + hide(): void; + setActiveFloor(floor: string): void; + show(): void; + + click: (eventArgs: Primitive) => any; + close: () => any; + footprintclick: (eventArgs: Primitive) => any; + mouseout: (eventArgs: Primitive) => any; + mouseover: (eventArgs: Primitive) => any; + } + + 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; + } + +} \ No newline at end of file diff --git a/bingmaps/Microsoft.Maps.d.ts b/bingmaps/Microsoft.Maps.d.ts new file mode 100644 index 0000000000..fd9b244d5a --- /dev/null +++ b/bingmaps/Microsoft.Maps.d.ts @@ -0,0 +1,568 @@ +declare module Microsoft.Maps { + + export enum AltitudeReference { + ground, + ellipsoid + } + + export class Location { + + constructor(latitude: number, longitude: number, altitude?: number, altitudeReference?: AltitudeReference); + + altitude: number; + altitudeReference: AltitudeReference; + latitude: number; + longitude: number; + + static areEqual(location1: Location, location2: Location); + static normalizeLongitude(longitude: number); + + clone(): Location; + toString(): string; + } + + export class LocationRect { + + constructor(center: Location, width: number, height: number); + + center: Location; + height: number; + width: number; + + static fromCorners(northwest: Location, southeast: Location): LocationRect; + static fromEdges(north: number, west: number, south: number, east: number, altitude: number, altitudeReference: AltitudeReference): LocationRect; + static fromLocations(locations: Array): LocationRect; + static fromString(value: string); + + clone(): LocationRect; + contains(location: Location): boolean; + getEast(): number; + getNorth(): number; + getNorthwest(): Location; + getSouth(): number; + getSouthEast(): Location; + getWest(): number; + intersects(rect: LocationRect): boolean; + toString(): string; + } + + export class Point { + + constructor(x: number, y: number); + + x: number; + y: number; + + static areEqual(p1: Point, p2: Point): boolean; + static clone(p: Point): Point; + + clone(): Point; + toString(): string; + } + + export class Events { + + static addHandler(target: any, eventName: string, handler: () => void): any; + static addThrottledHandler(target: any, eventName: string, handler: () => void, throttleInterval: number): any; + static hasHandler(target: any, eventName: string): boolean; + static invoke(target: any, eventName: string, args: any); + static removeHandler(handlerId: any); + } + + export interface KeyEventArgs { + altKey: boolean; + ctrlKey: boolean; + eventName: boolean; + handled: boolean; + keyCode: string; + originalEvent: any; + shiftKey: boolean; + } + + export enum LabelOverlay { + hidden, + visible + } + + export interface ZoomRange { + min: number; + max: number; + } + + export class Map { + + constructor(containerElement: HTMLElement, options: MapOptions); + + entities: EntityCollection; + + static getVersion(): string; + + blur(): void; + dispose(): void; + focus(): void; + getBounds(): LocationRect; + getCenter(): Location; + getCopyrights(callback: (copyrights: Array) => void): void; + getCredentials(callback: (credentials: Array) => void): void; + getHeading(): string; + getHeight(): number; + getImageryId: string; + getMapTypeId(): string; + getMetersPerPixel(): number; + getMode(): MapMode; + getModeLayer(): HTMLElement; + getOptions(): MapOptions; + getPageX(): number; + getPageY(): number; + getRootElement(): HTMLElement; + getTargetBounds(): LocationRect; + getTargetCenter(): Location; + getTargetHeading(): number; + getTargetMetersPerPixel(): number; + getTargetZoom(): number; + getUserLayer(): HTMLElement; + getViewportX(): number; + getViewportY(): number; + getWidth(): number; + getZoom(): number; + getZoomRange(): ZoomRange; + isDownloadingTiles(): boolean; + isMercator(): boolean; + isRotationEnabled(): boolean; + setMapType(mapTypeId: MapTypeId); + setOptions(options: MapOptions); + setView(options: ViewOptions); + tryLocationToPixel(locations: Array, reference?: PixelReference); + tryPixelToLocation(points: Array, reference?: PixelReference); + + click: (eventArgs: MouseEventArgs) => void; + copyrightchanged: () => void; + dblclick: (eventArgs: MouseEventArgs) => void; + imagerychanged: () => void; + keydown: (eventArgs: KeyEventArgs) => void; + keypress: (eventArgs: KeyEventArgs) => void; + keyup: (eventArgs: KeyEventArgs) => void; + maptypechanged: () => void; + mousedown: (eventArgs: MouseEventArgs) => void; + mousemove: (eventArgs: MouseEventArgs) => void; + mouseout: (eventArgs: MouseEventArgs) => void; + mouseover: (eventArgs: MouseEventArgs) => void; + mouseup: (eventArgs: MouseEventArgs) => void; + mousewheel: (eventArgs: MouseEventArgs) => void; + rightlick: (eventArgs: MouseEventArgs) => void; + targetviewchanged: () => void; + tiledownloadcomplete: () => void; + viewchange: () => void; + viewchangeend: () => void; + viewchangestart: () => void; + } + + export class MapMode { + + getDrawShapesInSingleLayer(): boolean; + getShouldClipPolygons(): boolean; + setOptions(options: MapOptions): void; + setViewChangeEndDelay(delay: number): void; + } + + export interface MapOptions { + + backgroundColor?: Color; + credentials?: string; + customizeOverlays?: boolean; + disableBirdseye?: boolean; + disableKeyboardInput?: boolean; + disableMouseInput?: boolean; + disablePanning?: boolean; + disableTouchInput?: boolean; + disableUserInput?: boolean; + disableZooming?: boolean; + enableClickableLogo?: boolean; + enableSearchLogo?: boolean; + fixedMapPosition?: boolean; + height?: number; + inertiaIntensity?: number; + showBreadcrumb?: boolean; + showCopyright?: boolean; + showDashboard?: boolean; + showMapTypeSelector?: boolean; + showScalebar?: boolean; + theme?: any; + tileBuffer?: number; + useInertia?: boolean; + width?: number; + center?: Location; + zoom?: number; + mapTypeId?: MapTypeId; + } + + export enum MapTypeId { + aerial, + auto, + birdseye, + collinsBart, + mercator, + ordnanceSurvey, + road + } + + export class MouseEventArgs { + + eventName: string; + handled: boolean; + isPrimary: boolean; + isSecondary: boolean; + isTouchEvent: boolean; + originalEvent: any; + pageX: number; + pageY: number; + target: any; + targetType: string; + wheelDelta: number; + + getX(): number; + getY(): number; + } + + export enum PixelReference { + control, + page, + viewport + } + + export interface ViewOptions { + + animate?: boolean; + bounds?: LocationRect; + center?: Location; + centerOffset?: Point; + heading?: number; + labelOverlay?: LabelOverlay; + mapTypeId?: string; + padding?: number; + zoom?: number; + } + + export class Color { + + constructor(alpha: number, red: number, green: number, blue: number); + + a: number; + r: number; + g: number; + b: number; + + static clone(color: Color): Color; + static fromHex(hex: string): Color; + + clone(): Color; + getOpacity(): number; + toHex(): string; + toString(): string; + } + + export interface EntityChangeArgs { + collection: EntityCollection; + entity: Entity; + } + + export interface EntityCollectionOptions { + bubble: boolean; + visible: boolean; + zIndex: number; + } + + export class EntityCollection { + + constructor(options: EntityCollectionOptions); + + clear(): void; + get(index: number): Entity; + getLength(): number; + getVisible(): boolean; + getZIndex(): number; + indexOf(entity: Entity): number; + insert(entity: Entity, index: number): void; + pop(): Entity; + push(entity: Entity); + remove(entity: Entity): Entity; + removeAt(index: number): Entity; + setOptions(options: EntityCollectionOptions): void; + toString(): string; + + entityAdded: (args: EntityChangeArgs) => any; + entityChanged: (args: EntityChangeArgs) => any; + entityRemoved: (args: EntityChangeArgs) => any; + } + + export class Infobox { + + constructor(location: Location, options?: InfoboxOptions); + + getActions(): any; + getAnchor(): Point; + getDescription(): string; + getHeight(): number; + getHtmlContent(): string; + getId(): string; + getLocation(): Location; + getOffset(): Point; + getOptions(): InfoboxOptions; + getShowCloseButton(): boolean; + getShowPointer(): boolean; + getTitle(): string; + getTitleAction(): any; + getTitleClickHandler(): () => void; + getVisible(): boolean; + getWidth(): number; + getZIndex(): number; + setHtmlContent(content: string): void; + setLocation(location: Location): void; + setOptions(options: InfoboxOptions): void; + toString(): string; + + click: (eventArgs: MouseEventArgs) => void; + entitychanged: (entity: Entity) => void; + mouseenter: (eventArgs: MouseEventArgs) => void; + mouseleave: (eventArgs: MouseEventArgs) => void; + } + + export interface Action { + label?: string; + icon?: string; + eventHandler: (args?:any) => void; + } + + export interface InfoboxOptions { + + actions?: Array; + description?: string; + htmlContent?: string; + id?: string; + location?: Location; + offset?: Point; + showCloseButton?: boolean; + showPointer?: boolean; + pushpin?: Pushpin; + title?: string; + titleAction?: { label?: string; eventHandler: () => void; }; + titleClickHandler?: () => void; + typeName?: InfoboxType; + visible?: boolean; + width?: number; + height?: number; + } + + export enum InfoboxType { + mini, + standard + } + + export interface Entity { + } + + export class Polyline implements Entity { + + constructor(locations: Array, options?: PolylineOptions); + + getLocations(): Array; + getStrokeColor(): Color; + getStrokeDashArray(): string; + getStrokeThickness(): number; + getVisible(): boolean; + setLocations(locations: Array): void; + setOptions(options: PolylineOptions): void; + toString(): string; + + click: (eventArgs: MouseEventArgs) => void; + dblclick: (eventArgs: MouseEventArgs) => void; + entitychanged: (entity: Entity) => void; + mousedown: (eventArgs: MouseEventArgs) => void; + mouseout: (eventArgs: MouseEventArgs) => void; + mouseover: (eventArgs: MouseEventArgs) => void; + mouseup: (eventArgs: MouseEventArgs) => void; + rightclick: (eventArgs: MouseEventArgs) => void; + } + + export interface PolylineOptions { + + strokeColor: Color; + strokeDashArray: string; + strokeThickness: number; + visible: boolean; + } + + export class Polygon implements Entity { + + constructor(locations: Array, options?: PolygonOptions); + + getFillColor(): Color; + getLocations(): Array; + getStrokeColor(): Color; + getStrokeDashArray(): string; + getStrokeThickness(): number; + getVisible(): boolean; + setLocations(locations: Location[]): void; + setOptions(options: PolylineOptions): void; + toString(): string; + + click: (eventArgs: MouseEventArgs) => void; + dbclick: (eventArgs: MouseEventArgs) => void; + entitychanged: (entity: Entity) => void; + mousedown: (eventArgs: MouseEventArgs) => void; + mouseout: (eventArgs: MouseEventArgs) => void; + mouseover: (eventArgs: MouseEventArgs) => void; + mouseup: (eventArgs: MouseEventArgs) => void; + rightclick: (eventArgs: MouseEventArgs) => void; + } + + export interface PolygonOptions { + + strokeColor: Color; + strokeDashArray: string; + strokeThickness: number; + visible: boolean; + } + + export class Pushpin implements Entity { + + constructor(location: Location, options?: PushpinOptions); + + getAnchor(): Point; + getIcon(): string; + getHeight(): number; + getLocation(): Location; + getText(): string; + getTextOffset(): Point; + getTypeName(): string; + getVisible(): boolean; + getWidth(): number; + getZIndex(): number; + setLocation(location: Location): void; + setOptions(options: PushpinOptions): void; + toString(): string; + + click: (eventArgs: MouseEventArgs) => void; + dblclick: (eventArgs: MouseEventArgs) => void; + drag: (object: Pushpin) => any; + dragend: (eventArgs: MouseEventArgs) => void; + dragstart: (eventArgs: MouseEventArgs) => void; + entitychanged: (object: { entity: Entity; }) => any; + mousedown: (eventArgs: MouseEventArgs) => void; + mouseout: (eventArgs: MouseEventArgs) => void; + mouseover: (eventArgs: MouseEventArgs) => void; + mouseup: (eventArgs: MouseEventArgs) => void; + rightclick: (eventArgs: MouseEventArgs) => void; + } + + export enum EntityState { + highlighted, + none, + selected + } + + export interface PushpinOptions { + + anchor?: Point; + draggable?: boolean; + height?: number; + htmlContent?: string; + icon?: string; + infobox?: Infobox; + state?: EntityState; + text?: string; + textOffset?: Point; + typeName?: string; + visible?: boolean; + width?: number; + zIndex?: number; + } + + export class TileLayer implements Entity { + + constructor(options: TileLayerOptions); + + getOpacty(): number; + getTileSource(projection: string): TileSource; + getZIndex(): number; + setOptions(options: TileLayerOptions): void; + toString(): string; + + tiledownloadcomplete: () => void; + } + + export class TileSource { + + constructor(options: TileSourceOptions); + + getHeight(): number; + getUriConstructor(): string; + getWidth(): string; + toString(): string; + } + + export interface TileSourceOptions { + + height?: number; + uriConstructor: string; + width?: number; + } + + + export interface TileLayerOptions { + + animationDisplay?: AnimationVisibility; + downloadTimeout?: number; + mercator?: TileSource; + opacity?: number; + visible?: boolean; + zIndex?: number; + } + + export enum AnimationVisibility { + auto, + hide, + show + } + + export class Coordinates { + + accuracy: number; + altitude: number; + altitudeAccuracy: number; + heading: number; + latitude: number; + longitude: number; + } + + export class GeoLocationProvider { + + constructor(map: Map); + + addAccuracyCircle(center: Location, radiusInMeters: number, segments: number, options: PositionCircleOptions): void; + cancelCurrentRequest(): void; + getCurrentPosition(options?: PositionOptions): void; + removeAccuracyCircle(): void; + } + + export interface PositionCircleOptions { + polygonOptions: PolygonOptions; + showOnMap: boolean; + } + + export class PositionError { + errorCode: number; + internalError: string; + } + + export interface ModuleOptions { + callback?: () => void; + styleURLS?: Array; + culture?: string; + homeRegion?: string; + } + + export function loadModule(moduleKey: string, options: ModuleOptions): void; + export function moduleLoaded(moduleKey: string): void; + export function registerModule(moduleKey: string, scriptUrl: string, options?: ModuleOptions); +} \ No newline at end of file