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