UNPKG

3.76 kBTypeScriptView Raw
1declare namespace google.maps {
2 class OverlayView extends MVCObject {
3 draw(): void;
4 getMap(): Map | StreetViewPanorama;
5 getPanes(): MapPanes;
6 getProjection(): MapCanvasProjection;
7 onAdd(): void;
8 onRemove(): void;
9 setMap(map: Map | StreetViewPanorama | null): void;
10 /**
11 * Stops click, tap, drag, and wheel events on the element from bubbling up to the map. Use this to prevent map dragging and zooming, as well as map "click" events.
12 * @see {@link https://developers.google.com/maps/documentation/javascript/reference/overlay-view#OverlayView.preventMapHitsAndGesturesFrom Maps JavaScript API}
13 */
14 static preventMapHitsAndGesturesFrom(element: Element): void;
15 /**
16 * Stops click or tap on the element from bubbling up to the map. Use this to prevent the map from triggering "click" events.
17 * @see {@link https://developers.google.com/maps/documentation/javascript/reference/overlay-view#OverlayView.preventMapHitsFrom Maps JavaScript API}
18 */
19 static preventMapHitsFrom(element: Element): void;
20 }
21
22 /** @see {@link https://developers.google.com/maps/documentation/javascript/reference/overlay-view#MapPanes Maps JavaScript API} */
23 interface MapPanes {
24 /**
25 * This pane contains the info window. (Pane 4).
26 * It is above all map overlays.
27 * @see {@link overlayMouseTarget pane below}
28 * @see {@link https://developers.google.com/maps/documentation/javascript/reference/overlay-view#MapPanes.floatPane Maps JavaScript API}
29 */
30 readonly floatPane: Element;
31
32 /**
33 * This pane is the lowest pane and is above the tiles. (Pane 0).
34 * It may not receive DOM events.
35 * @see {@link overlayLayer pane above}
36 * @see {@link https://developers.google.com/maps/documentation/javascript/reference/overlay-view#MapPanes.mapPane Maps JavaScript API}
37 */
38 readonly mapPane: Element;
39
40 /**
41 * This pane contains markers. (Pane 2).
42 * It may not receive DOM events.
43 * @see {@link floatPane pane above}
44 * @see {@link overlayLayer pane below}
45 * @see {@link https://developers.google.com/maps/documentation/javascript/reference/overlay-view#MapPanes.markerLayer Maps JavaScript API}
46 */
47 readonly markerLayer: Element;
48
49 /**
50 * This pane contains polylines, polygons, ground overlays and tile layer overlays. (Pane 1).
51 * It may not receive DOM events.
52 * @see {@link markerLayer pane above}
53 * @see {@link mapPane pane below}
54 * @see {@link https://developers.google.com/maps/documentation/javascript/reference/overlay-view#MapPanes.overlayLayer Maps JavaScript API}
55 */
56 readonly overlayLayer: Element;
57
58 /**
59 * This pane contains elements that receive DOM events. (Pane 3).
60 * @see {@link floatPane pane above}
61 * @see {@link markerLayer pane below}
62 * @see {@link https://developers.google.com/maps/documentation/javascript/reference/overlay-view#MapPanes.overlayMouseTarget Maps JavaScript API}
63 */
64 readonly overlayMouseTarget: Element;
65 }
66
67 // TODO: replace to interface https://developers.google.com/maps/documentation/javascript/reference/overlay-view#MapCanvasProjection
68 class MapCanvasProjection extends MVCObject {
69 fromContainerPixelToLatLng(pixel: Point, nowrap?: boolean): LatLng;
70 fromDivPixelToLatLng(pixel: Point, nowrap?: boolean): LatLng;
71 fromLatLngToContainerPixel(latLng: LatLng): Point;
72 fromLatLngToDivPixel(latLng: LatLng): Point;
73 getWorldWidth(): number;
74 }
75}