1 |
|
2 | import { NgZone } from '@angular/core';
|
3 | import { Observable } from 'rxjs';
|
4 | import { MapsAPILoader } from './maps-api-loader/maps-api-loader';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export declare class GoogleMapsAPIWrapper {
|
10 | private _loader;
|
11 | private _zone;
|
12 | private _map;
|
13 | private _mapResolver;
|
14 | constructor(_loader: MapsAPILoader, _zone: NgZone);
|
15 | createMap(el: HTMLElement, mapOptions: google.maps.MapOptions): Promise<void>;
|
16 | setMapOptions(options: google.maps.MapOptions): void;
|
17 | /**
|
18 | * Creates a google map marker with the map context
|
19 | */
|
20 | createMarker(options?: google.maps.MarkerOptions, addToMap?: boolean): Promise<google.maps.Marker>;
|
21 | createInfoWindow(options?: google.maps.InfoWindowOptions): Promise<google.maps.InfoWindow>;
|
22 | /**
|
23 | * Creates a google.map.Circle for the current map.
|
24 | */
|
25 | createCircle(options: google.maps.CircleOptions): Promise<google.maps.Circle>;
|
26 | /**
|
27 | * Creates a google.map.Rectangle for the current map.
|
28 | */
|
29 | createRectangle(options: google.maps.RectangleOptions): Promise<google.maps.Rectangle>;
|
30 | createPolyline(options: google.maps.PolylineOptions): Promise<google.maps.Polyline>;
|
31 | createPolygon(options: google.maps.PolygonOptions): Promise<google.maps.Polygon>;
|
32 | /**
|
33 | * Creates a new google.map.Data layer for the current map
|
34 | */
|
35 | createDataLayer(options?: google.maps.Data.DataOptions): Promise<google.maps.Data>;
|
36 | /**
|
37 | * Creates a TransitLayer instance for a map
|
38 | * @returns a new transit layer object
|
39 | */
|
40 | createTransitLayer(): Promise<google.maps.TransitLayer>;
|
41 | /**
|
42 | * Creates a BicyclingLayer instance for a map
|
43 | * @returns a new bicycling layer object
|
44 | */
|
45 | createBicyclingLayer(): Promise<google.maps.BicyclingLayer>;
|
46 | /**
|
47 | * Determines if given coordinates are insite a Polygon path.
|
48 | */
|
49 | containsLocation(latLng: google.maps.LatLng, polygon: google.maps.Polygon): Promise<boolean>;
|
50 | subscribeToMapEvent<N extends keyof google.maps.MapHandlerMap>(eventName: N): Observable<google.maps.MapHandlerMap[N]>;
|
51 | clearInstanceListeners(): void;
|
52 | setCenter(latLng: google.maps.LatLngLiteral): Promise<void>;
|
53 | getZoom(): Promise<number>;
|
54 | getBounds(): Promise<google.maps.LatLngBounds>;
|
55 | getMapTypeId(): Promise<google.maps.MapTypeId>;
|
56 | setZoom(zoom: number): Promise<void>;
|
57 | getCenter(): Promise<google.maps.LatLng>;
|
58 | panTo(latLng: google.maps.LatLng | google.maps.LatLngLiteral): Promise<void>;
|
59 | panBy(x: number, y: number): Promise<void>;
|
60 | fitBounds(latLng: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding): Promise<void>;
|
61 | panToBounds(latLng: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral, padding?: number | google.maps.Padding): Promise<void>;
|
62 | /**
|
63 | * Returns the native Google Maps Map instance. Be careful when using this instance directly.
|
64 | */
|
65 | getNativeMap(): Promise<google.maps.Map>;
|
66 | /**
|
67 | * Triggers the given event name on the map instance.
|
68 | */
|
69 | triggerMapEvent(eventName: string): Promise<void>;
|
70 | }
|