|
1 | | -declare namespace OpenLocationCode { |
| 1 | +/** |
| 2 | + * Coordinates of a decoded Open Location Code. |
| 3 | + * |
| 4 | + * The coordinates include the latitude and longitude of the lower left and |
| 5 | + * upper right corners and the center of the bounding box for the area the |
| 6 | + * code represents. |
| 7 | + * |
| 8 | + * {@label CodeArea} |
| 9 | + */ |
| 10 | +export interface CodeArea { |
2 | 11 | /** |
3 | | - * Coordinates of a decoded Open Location Code. |
4 | | - * |
5 | | - * The coordinates include the latitude and longitude of the lower left and |
6 | | - * upper right corners and the center of the bounding box for the area the |
7 | | - * code represents. |
8 | | - * |
9 | | - * {@label CodeArea} |
10 | | - */ |
11 | | - interface CodeArea { |
12 | | - /** |
13 | | - * The latitude of the SW corner. |
14 | | - */ |
15 | | - latitudeLo: number; |
16 | | - |
17 | | - /** |
18 | | - * The longitude of the SW corner in degrees. |
19 | | - */ |
20 | | - longitudeLo: number; |
21 | | - |
22 | | - /** |
23 | | - * The latitude of the NE corner in degrees. |
24 | | - */ |
25 | | - latitudeHi: number; |
26 | | - |
27 | | - /** |
28 | | - * The longitude of the NE corner in degrees. |
29 | | - */ |
30 | | - longitudeHi: number; |
31 | | - |
32 | | - /** |
33 | | - * The number of digits in the code. |
34 | | - */ |
35 | | - codeLength: number; |
36 | | - |
37 | | - /** |
38 | | - * The latitude of the center in degrees. |
39 | | - */ |
40 | | - latitudeCenter: number; |
41 | | - |
42 | | - /** |
43 | | - * The longitude of the center in degrees. |
44 | | - */ |
45 | | - longitudeCenter: number; |
46 | | - } |
| 12 | + * The latitude of the SW corner. |
| 13 | + */ |
| 14 | + latitudeLo: number; |
| 15 | + |
| 16 | + /** |
| 17 | + * The longitude of the SW corner in degrees. |
| 18 | + */ |
| 19 | + longitudeLo: number; |
| 20 | + |
| 21 | + /** |
| 22 | + * The latitude of the NE corner in degrees. |
| 23 | + */ |
| 24 | + latitudeHi: number; |
| 25 | + |
| 26 | + /** |
| 27 | + * The longitude of the NE corner in degrees. |
| 28 | + */ |
| 29 | + longitudeHi: number; |
| 30 | + |
| 31 | + /** |
| 32 | + * The number of digits in the code. |
| 33 | + */ |
| 34 | + codeLength: number; |
| 35 | + |
| 36 | + /** |
| 37 | + * The latitude of the center in degrees. |
| 38 | + */ |
| 39 | + latitudeCenter: number; |
| 40 | + |
| 41 | + /** |
| 42 | + * The longitude of the center in degrees. |
| 43 | + */ |
| 44 | + longitudeCenter: number; |
47 | 45 | } |
48 | 46 |
|
49 | | -declare class OpenLocationCode { |
| 47 | +export class OpenLocationCode { |
50 | 48 | /** |
51 | 49 | * Provides a normal precision code, approximately 14x14 meters. |
52 | 50 | */ |
@@ -118,7 +116,7 @@ declare class OpenLocationCode { |
118 | 116 | * area of the code. |
119 | 117 | * @throws {@link Exception} If the code is not valid. |
120 | 118 | */ |
121 | | - static decode(code: string): OpenLocationCode.CodeArea; |
| 119 | + static decode(code: string): CodeArea; |
122 | 120 |
|
123 | 121 | /** |
124 | 122 | * Recover the nearest matching code to a specified location. |
@@ -155,5 +153,3 @@ declare class OpenLocationCode { |
155 | 153 | */ |
156 | 154 | static shorten(code: string, latitude: number, longitude: number): string; |
157 | 155 | } |
158 | | - |
159 | | -export = OpenLocationCode; |
0 commit comments