1 |
|
2 | /**
|
3 | * @fileoverview Externs for GeoJSON.
|
4 | * @see http://geojson.org/geojson-spec.html
|
5 | * @externs
|
6 | */
|
7 |
|
8 |
|
9 |
|
10 | /**
|
11 | * @constructor
|
12 | */
|
13 | var GeoJSONObject = function() {};
|
14 |
|
15 |
|
16 | /**
|
17 | * @type {!Array.<number>|undefined}
|
18 | */
|
19 | GeoJSONObject.prototype.bbox;
|
20 |
|
21 |
|
22 | /**
|
23 | * @type {string}
|
24 | */
|
25 | GeoJSONObject.prototype.type;
|
26 |
|
27 |
|
28 | /**
|
29 | * @type {!GeoJSONCRS|undefined}
|
30 | */
|
31 | GeoJSONObject.prototype.crs;
|
32 |
|
33 |
|
34 |
|
35 | /**
|
36 | * @constructor
|
37 | */
|
38 | var GeoJSONCRS = function() {};
|
39 |
|
40 |
|
41 | /**
|
42 | * CRS type. One of `link` or `name`.
|
43 | * @type {string}
|
44 | */
|
45 | GeoJSONCRS.prototype.type;
|
46 |
|
47 |
|
48 | /**
|
49 | * @type {!GeoJSONCRSName|!GeoJSONLink}
|
50 | */
|
51 | GeoJSONCRS.prototype.properties;
|
52 |
|
53 |
|
54 | /**
|
55 | * @constructor
|
56 | */
|
57 | var GeoJSONCRSName = function() {};
|
58 |
|
59 |
|
60 | /**
|
61 | * @type {string}
|
62 | */
|
63 | GeoJSONCRSName.prototype.name;
|
64 |
|
65 |
|
66 |
|
67 | /**
|
68 | * @constructor
|
69 | * @extends {GeoJSONObject}
|
70 | */
|
71 | var GeoJSONGeometry = function() {};
|
72 |
|
73 |
|
74 | /**
|
75 | * @type {!Array.<number>|!Array.<!Array.<number>>|
|
76 | * !Array.<!Array.<!Array.<number>>>}
|
77 | */
|
78 | GeoJSONGeometry.prototype.coordinates;
|
79 |
|
80 |
|
81 |
|
82 | /**
|
83 | * @constructor
|
84 | * @extends {GeoJSONObject}
|
85 | */
|
86 | var GeoJSONGeometryCollection = function() {};
|
87 |
|
88 |
|
89 | /**
|
90 | * @type {!Array.<GeoJSONGeometry>}
|
91 | */
|
92 | GeoJSONGeometryCollection.prototype.geometries;
|
93 |
|
94 |
|
95 |
|
96 | /**
|
97 | * @constructor
|
98 | * @extends {GeoJSONObject}
|
99 | */
|
100 | var GeoJSONFeature = function() {};
|
101 |
|
102 |
|
103 | /**
|
104 | * @type {GeoJSONGeometry|GeoJSONGeometryCollection}
|
105 | */
|
106 | GeoJSONFeature.prototype.geometry;
|
107 |
|
108 |
|
109 | /**
|
110 | * @type {number|string|undefined}
|
111 | */
|
112 | GeoJSONFeature.prototype.id;
|
113 |
|
114 |
|
115 | /**
|
116 | * @type {Object.<string, *>}
|
117 | */
|
118 | GeoJSONFeature.prototype.properties;
|
119 |
|
120 |
|
121 | /**
|
122 | * @type {string|undefined}
|
123 | */
|
124 | GeoJSONFeature.prototype.geometry_name;
|
125 |
|
126 |
|
127 | /**
|
128 | * @constructor
|
129 | * @extends {GeoJSONObject}
|
130 | */
|
131 | var GeoJSONFeatureCollection = function() {};
|
132 |
|
133 |
|
134 | /**
|
135 | * @type {!Array.<GeoJSONFeature>}
|
136 | */
|
137 | GeoJSONFeatureCollection.prototype.features;
|
138 |
|
139 |
|
140 |
|
141 | /**
|
142 | * @constructor
|
143 | */
|
144 | var GeoJSONLink = function() {};
|
145 |
|
146 |
|
147 | /**
|
148 | * @type {string}
|
149 | */
|
150 | GeoJSONLink.prototype.href;
|
151 |
|
152 | /**
|
153 | * @type {string}
|
154 | */
|
155 | GeoJSONLink.prototype.type;
|