UNPKG

1.94 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 * @type {!GeoJSONCRSName|!GeoJSONLink}
50 */
51GeoJSONCRS.prototype.properties;
52
53
54/**
55 * @constructor
56 */
57var GeoJSONCRSName = function() {};
58
59
60/**
61 * @type {string}
62 */
63GeoJSONCRSName.prototype.name;
64
65
66
67/**
68 * @constructor
69 * @extends {GeoJSONObject}
70 */
71var GeoJSONGeometry = function() {};
72
73
74/**
75 * @type {!Array.<number>|!Array.<!Array.<number>>|
76 * !Array.<!Array.<!Array.<number>>>}
77 */
78GeoJSONGeometry.prototype.coordinates;
79
80
81
82/**
83 * @constructor
84 * @extends {GeoJSONObject}
85 */
86var GeoJSONGeometryCollection = function() {};
87
88
89/**
90 * @type {!Array.<GeoJSONGeometry>}
91 */
92GeoJSONGeometryCollection.prototype.geometries;
93
94
95
96/**
97 * @constructor
98 * @extends {GeoJSONObject}
99 */
100var GeoJSONFeature = function() {};
101
102
103/**
104 * @type {GeoJSONGeometry|GeoJSONGeometryCollection}
105 */
106GeoJSONFeature.prototype.geometry;
107
108
109/**
110 * @type {number|string|undefined}
111 */
112GeoJSONFeature.prototype.id;
113
114
115/**
116 * @type {Object.<string, *>}
117 */
118GeoJSONFeature.prototype.properties;
119
120
121/**
122 * @type {string|undefined}
123 */
124GeoJSONFeature.prototype.geometry_name;
125
126
127/**
128 * @constructor
129 * @extends {GeoJSONObject}
130 */
131var GeoJSONFeatureCollection = function() {};
132
133
134/**
135 * @type {!Array.<GeoJSONFeature>}
136 */
137GeoJSONFeatureCollection.prototype.features;
138
139
140
141/**
142 * @constructor
143 */
144var GeoJSONLink = function() {};
145
146
147/**
148 * @type {string}
149 */
150GeoJSONLink.prototype.href;
151
152/**
153 * @type {string}
154 */
155GeoJSONLink.prototype.type;