UNPKG

2.33 kBTypeScriptView Raw
1declare namespace google.maps {
2 interface MapType {
3 getTile(tileCoord: Point, zoom: number, ownerDocument: Document): Element;
4 releaseTile(tile: Element): void;
5 alt?: string;
6 maxZoom?: number;
7 minZoom?: number;
8 name?: string;
9 projection?: Projection;
10 radius?: number;
11 tileSize?: Size;
12 }
13
14 interface Projection {
15 fromLatLngToPoint(latLng: LatLng, point?: Point): Point;
16 fromPointToLatLng(pixel: Point, noWrap?: boolean): LatLng;
17 }
18
19 class ImageMapType extends MVCObject implements MapType {
20 constructor(opts: ImageMapTypeOptions);
21 getOpacity(): number;
22 getTile(tileCoord: Point, zoom: number, ownerDocument: Document): Element;
23 releaseTile(tile: Element): void;
24 setOpacity(opacity: number): void;
25 alt: string;
26 maxZoom: number;
27 minZoom: number;
28 name: string;
29 projection: Projection;
30 radius: number;
31 tileSize: Size;
32 }
33
34 interface ImageMapTypeOptions {
35 alt?: string;
36 getTileUrl(tileCoord: Point, zoom: number): string;
37 maxZoom?: number;
38 minZoom?: number;
39 name?: string;
40 opacity?: number;
41 tileSize: Size;
42 }
43
44 class GroundOverlay extends MVCObject {
45 constructor(url: string, bounds: LatLngBounds | LatLngBoundsLiteral, opts?: GroundOverlayOptions);
46 getBounds(): LatLngBounds;
47 getMap(): Map;
48 getOpacity(): number;
49 getUrl(): string;
50 setMap(map: Map | null): void;
51 setOpacity(opacity: number): void;
52 }
53
54 interface GroundOverlayOptions {
55 clickable?: boolean;
56 map?: Map;
57 opacity?: number;
58 }
59
60 class StyledMapType extends MVCObject implements MapType {
61 constructor(styles: MapTypeStyle[], options?: StyledMapTypeOptions);
62 getTile(tileCoord: Point, zoom: number, ownerDocument: Document): Element;
63 releaseTile(tile: Element): void;
64 alt: string;
65 maxZoom: number;
66 minZoom: number;
67 name: string;
68 projection: Projection;
69 radius: number;
70 tileSize: Size;
71 }
72
73 interface StyledMapTypeOptions {
74 alt?: string;
75 maxZoom?: number;
76 minZoom?: number;
77 name?: string;
78 }
79}