UNPKG

2.42 kBJavaScriptView Raw
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 */
13var GeoJSONObject = function() {};
14
15
16/**
17 * @type {!Array.<number>|undefined}
18 */
19GeoJSONObject.prototype.bbox;
20
21
22/**
23 * @type {string}
24 */
25GeoJSONObject.prototype.type;
26
27
28/**
29 * @type {!GeoJSONCRS|undefined}
30 */
31GeoJSONObject.prototype.crs;
32
33
34
35/**
36 * @constructor
37 */
38var GeoJSONCRS = function() {};
39
40
41/**
42 * CRS type. One of `link` or `name`.
43 * @type {string}
44 */
45GeoJSONCRS.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 */
53GeoJSONCRS.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 */
64var 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 */
72GeoJSONCRSCode.prototype.code;
73
74
75
76/**
77 * @constructor
78 */
79var GeoJSONCRSName = function() {};
80
81
82/**
83 * @type {string}
84 */
85GeoJSONCRSName.prototype.name;
86
87
88
89/**
90 * @constructor
91 * @extends {GeoJSONObject}
92 */
93var GeoJSONGeometry = function() {};
94
95
96/**
97 * @type {!Array.<number>|!Array.<!Array.<number>>|
98 * !Array.<!Array.<!Array.<number>>>}
99 */
100GeoJSONGeometry.prototype.coordinates;
101
102
103
104/**
105 * @constructor
106 * @extends {GeoJSONObject}
107 */
108var GeoJSONGeometryCollection = function() {};
109
110
111/**
112 * @type {!Array.<GeoJSONGeometry>}
113 */
114GeoJSONGeometryCollection.prototype.geometries;
115
116
117
118/**
119 * @constructor
120 * @extends {GeoJSONObject}
121 */
122var GeoJSONFeature = function() {};
123
124
125/**
126 * @type {GeoJSONGeometry|GeoJSONGeometryCollection}
127 */
128GeoJSONFeature.prototype.geometry;
129
130
131/**
132 * @type {number|string|undefined}
133 */
134GeoJSONFeature.prototype.id;
135
136
137/**
138 * @type {Object.<string, *>}
139 */
140GeoJSONFeature.prototype.properties;
141
142
143
144/**
145 * @constructor
146 * @extends {GeoJSONObject}
147 */
148var GeoJSONFeatureCollection = function() {};
149
150
151/**
152 * @type {!Array.<GeoJSONFeature>}
153 */
154GeoJSONFeatureCollection.prototype.features;
155
156
157
158/**
159 * @constructor
160 */
161var GeoJSONLink = function() {};
162
163
164/**
165 * @type {string}
166 */
167GeoJSONLink.prototype.href;
168
169/**
170 * @type {string}
171 */
172GeoJSONLink.prototype.type;