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 | * TODO: remove GeoJSONCRSCode when http://jira.codehaus.org/browse/GEOS-5996
|
50 | * is fixed and widely deployed.
|
51 | * @type {!GeoJSONCRSCode|!GeoJSONCRSName|!GeoJSONLink}
|
52 | */
|
53 | GeoJSONCRS.prototype.properties;
|
54 |
|
55 |
|
56 |
|
57 | /**
|
58 | * `GeoJSONCRSCode` is not part of the GeoJSON specification, but is generated
|
59 | * by GeoServer.
|
60 | * TODO: remove GeoJSONCRSCode when http://jira.codehaus.org/browse/GEOS-5996
|
61 | * is fixed and widely deployed.
|
62 | * @constructor
|
63 | */
|
64 | var GeoJSONCRSCode = function() {};
|
65 |
|
66 |
|
67 | /**
|
68 | * TODO: remove this when http://jira.codehaus.org/browse/GEOS-5996 is fixed
|
69 | * and widely deployed.
|
70 | * @type {string}
|
71 | */
|
72 | GeoJSONCRSCode.prototype.code;
|
73 |
|
74 |
|
75 |
|
76 | /**
|
77 | * @constructor
|
78 | */
|
79 | var GeoJSONCRSName = function() {};
|
80 |
|
81 |
|
82 | /**
|
83 | * @type {string}
|
84 | */
|
85 | GeoJSONCRSName.prototype.name;
|
86 |
|
87 |
|
88 |
|
89 | /**
|
90 | * @constructor
|
91 | * @extends {GeoJSONObject}
|
92 | */
|
93 | var GeoJSONGeometry = function() {};
|
94 |
|
95 |
|
96 | /**
|
97 | * @type {!Array.<number>|!Array.<!Array.<number>>|
|
98 | * !Array.<!Array.<!Array.<number>>>}
|
99 | */
|
100 | GeoJSONGeometry.prototype.coordinates;
|
101 |
|
102 |
|
103 |
|
104 | /**
|
105 | * @constructor
|
106 | * @extends {GeoJSONObject}
|
107 | */
|
108 | var GeoJSONGeometryCollection = function() {};
|
109 |
|
110 |
|
111 | /**
|
112 | * @type {!Array.<GeoJSONGeometry>}
|
113 | */
|
114 | GeoJSONGeometryCollection.prototype.geometries;
|
115 |
|
116 |
|
117 |
|
118 | /**
|
119 | * @constructor
|
120 | * @extends {GeoJSONObject}
|
121 | */
|
122 | var GeoJSONFeature = function() {};
|
123 |
|
124 |
|
125 | /**
|
126 | * @type {GeoJSONGeometry|GeoJSONGeometryCollection}
|
127 | */
|
128 | GeoJSONFeature.prototype.geometry;
|
129 |
|
130 |
|
131 | /**
|
132 | * @type {number|string|undefined}
|
133 | */
|
134 | GeoJSONFeature.prototype.id;
|
135 |
|
136 |
|
137 | /**
|
138 | * @type {Object.<string, *>}
|
139 | */
|
140 | GeoJSONFeature.prototype.properties;
|
141 |
|
142 |
|
143 |
|
144 | /**
|
145 | * @constructor
|
146 | * @extends {GeoJSONObject}
|
147 | */
|
148 | var GeoJSONFeatureCollection = function() {};
|
149 |
|
150 |
|
151 | /**
|
152 | * @type {!Array.<GeoJSONFeature>}
|
153 | */
|
154 | GeoJSONFeatureCollection.prototype.features;
|
155 |
|
156 |
|
157 |
|
158 | /**
|
159 | * @constructor
|
160 | */
|
161 | var GeoJSONLink = function() {};
|
162 |
|
163 |
|
164 | /**
|
165 | * @type {string}
|
166 | */
|
167 | GeoJSONLink.prototype.href;
|
168 |
|
169 | /**
|
170 | * @type {string}
|
171 | */
|
172 | GeoJSONLink.prototype.type;
|