UNPKG

2.7 kBJavaScriptView Raw
1
2/**
3 * @fileoverview Externs for EsriJSON.
4 * @see http://resources.arcgis.com/en/help/rest/apiref/geometry.html
5 * @externs
6 */
7
8
9
10/**
11 * @constructor
12 */
13var EsriJSONObject = function() {};
14
15
16/**
17 * @type {!EsriJSONCRS}
18 */
19EsriJSONObject.prototype.spatialReference;
20
21
22
23/**
24 * @constructor
25 */
26var EsriJSONCRS = function() {};
27
28
29/**
30 * CRS well know identifier.
31 * @type {number}
32 */
33EsriJSONCRS.prototype.wkid;
34
35
36
37/**
38 * @constructor
39 * @extends {EsriJSONObject}
40 */
41var EsriJSONPoint = function() {};
42
43
44/**
45 * M value of point.
46 * @type {number}
47 */
48EsriJSONPoint.prototype.m;
49
50
51/**
52 * X coordinate of point.
53 * @type {number}
54 */
55EsriJSONPoint.prototype.x;
56
57
58
59/**
60 * Y coordinate of point.
61 * @type {number}
62 */
63EsriJSONPoint.prototype.y;
64
65
66/**
67 * Z coordinate of point.
68 * @type {number|undefined}
69 */
70EsriJSONPoint.prototype.z;
71
72
73/**
74 * @constructor
75 * @extends {EsriJSONObject}
76 */
77var EsriJSONMultipoint = function() {};
78
79
80/**
81 * Does Multipoint have M values?
82 * @type {boolean|undefined}
83 */
84EsriJSONMultipoint.prototype.hasM;
85
86
87/**
88 * Does Multipoint have Z values?
89 * @type {boolean|undefined}
90 */
91EsriJSONMultipoint.prototype.hasZ;
92
93
94/**
95 * @type {!Array.<!Array.<number>>}
96 */
97EsriJSONMultipoint.prototype.points;
98
99
100/**
101 * @constructor
102 * @extends {EsriJSONObject}
103 */
104var EsriJSONPolyline = function() {};
105
106
107/**
108 * Does Polyline have M values?
109 * @type {boolean|undefined}
110 */
111EsriJSONPolyline.prototype.hasM;
112
113
114/**
115 * Does Polyline have Z values?
116 * @type {boolean|undefined}
117 */
118EsriJSONPolyline.prototype.hasZ;
119
120
121/**
122 * @type {!Array.<!Array.<!Array.<number>>>}
123 */
124EsriJSONPolyline.prototype.paths;
125
126
127/**
128 * @constructor
129 * @extends {EsriJSONObject}
130 */
131var EsriJSONPolygon = function() {};
132
133
134/**
135 * Does Polygon have M values?
136 * @type {boolean|undefined}
137 */
138EsriJSONPolygon.prototype.hasM;
139
140
141/**
142 * Does Polygon have Z values?
143 * @type {boolean|undefined}
144 */
145EsriJSONPolygon.prototype.hasZ;
146
147
148/**
149 * @type {!Array.<!Array.<!Array.<number>>>}
150 */
151EsriJSONPolygon.prototype.rings;
152
153
154/**
155 * @typedef {(EsriJSONPoint|EsriJSONMultipoint|EsriJSONPolyline|
156 EsriJSONPolygon)}
157 */
158var EsriJSONGeometry;
159
160
161/**
162 * @constructor
163 * @extends {EsriJSONObject}
164 */
165var EsriJSONFeature = function() {};
166
167
168/**
169 * @type {EsriJSONGeometry}
170 */
171EsriJSONFeature.prototype.geometry;
172
173
174/**
175 * @type {Object.<string, *>}
176 */
177EsriJSONFeature.prototype.attributes;
178
179
180
181/**
182 * @constructor
183 * @extends {EsriJSONObject}
184 */
185var EsriJSONFeatureCollection = function() {};
186
187
188/**
189 * @type {!Array.<EsriJSONFeature>}
190 */
191EsriJSONFeatureCollection.prototype.features;
192
193
194/**
195 * The name of the attribute that contains ids.
196 * @type {string}
197 */
198EsriJSONFeatureCollection.prototype.objectIdFieldName;