-
Notifications
You must be signed in to change notification settings - Fork 18
/
atlas.source.DataSource.yml
347 lines (334 loc) · 12.7 KB
/
atlas.source.DataSource.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
### YamlMime:TSType
name: DataSource
uid: azure-maps-control.atlas.source.DataSource
package: azure-maps-control
summary: >-
A data source class that makes it easy to manage shapes data that will be
displayed on the map.
A data source must be added to a layer before it is visible on the map.
The DataSource class may be used with the SymbolLayer, LineLayer,
PolygonLayer, BubbleLayer, and HeatMapLayer.
fullName: DataSource
remarks: ''
isDeprecated: false
type: class
constructors:
- name: 'DataSource(string, DataSourceOptions)'
uid: azure-maps-control.atlas.source.DataSource.constructor
package: azure-maps-control
summary: >-
A data source class that makes it easy to manage shapes data that will be
displayed on the map.
A data source must be added to a layer before it is visible on the map.
The `DataSource` class may be used with the `SymbolLayer`, `LineLayer`,
`PolygonLayer`, `BubbleLayer`, and `HeatMapLayer`.
remarks: ''
isDeprecated: false
syntax:
content: 'new DataSource(id?: string, options?: DataSourceOptions)'
parameters:
- id: id
type: string
description: >-
a unique id that the user assigns to the data source. If this is not
specified, then the data source will automatically be assigned an
id.
- id: options
type: <xref uid="azure-maps-control.atlas.DataSourceOptions" />
description: |
the options for the data source.
inheritedMethods:
- name: getId()
uid: azure-maps-control.atlas.source.DataSource.getId
package: azure-maps-control
summary: Gets the id of the data source
remarks: ''
isDeprecated: false
syntax:
content: 'function getId(): string'
return:
description: ''
type: string
inheritanceDescription: >-
<b>Inherited From</b>
[Source.getId](xref:azure-maps-control.atlas.source.Source.getId)
methods:
- name: >-
add(FeatureCollection | Feature<atlas.data.Geometry, any> |
atlas.data.Geometry | GeometryCollection | Shape |
Array<Feature<atlas.data.Geometry, any> | atlas.data.Geometry | Shape>,
number)
uid: azure-maps-control.atlas.source.DataSource.add
package: azure-maps-control
summary: >-
Adds shapes to the data source.
GeoJSON objects will be wrapped within a Shape class to make them easier
to manage.
Optionally specify an index to insert the feature between other
shapes/features in the layers.
remarks: ''
isDeprecated: false
syntax:
content: >-
function add(data: FeatureCollection | Feature<atlas.data.Geometry, any>
| atlas.data.Geometry | GeometryCollection | Shape |
Array<Feature<atlas.data.Geometry, any> | atlas.data.Geometry | Shape>,
index?: number)
parameters:
- id: data
type: >-
<xref uid="azure-maps-control.atlas.data.FeatureCollection" /> |
<xref uid="azure-maps-control.atlas.data.Feature" /><<xref
uid="azure-maps-control.atlas.data.Geometry" />, any> | <xref
uid="azure-maps-control.atlas.data.Geometry" /> | <xref
uid="azure-maps-control.atlas.data.GeometryCollection" /> | <xref
uid="azure-maps-control.atlas.Shape" /> | Array<<xref
uid="azure-maps-control.atlas.data.Feature" /><<xref
uid="azure-maps-control.atlas.data.Geometry" />, any> | <xref
uid="azure-maps-control.atlas.data.Geometry" /> | <xref
uid="azure-maps-control.atlas.Shape" />>
description: ''
- id: index
type: number
description: |+
- name: clear()
uid: azure-maps-control.atlas.source.DataSource.clear
package: azure-maps-control
summary: Removes all data in the data source.
remarks: ''
isDeprecated: false
syntax:
content: function clear()
- name: dispose()
uid: azure-maps-control.atlas.source.DataSource.dispose
package: azure-maps-control
summary: Cleans up any resources this object is consuming.
remarks: ''
isDeprecated: false
syntax:
content: function dispose()
- name: getClusterChildren(number)
uid: azure-maps-control.atlas.source.DataSource.getClusterChildren
package: azure-maps-control
summary: >-
Retrieves the children of the given cluster on the next zoom level. This
may be a combination of shapes and sub-clusters.
The sub-clusters will be features with properties matching
ClusteredProperties.
remarks: ''
isDeprecated: false
syntax:
content: >-
function getClusterChildren(clusterId: number):
Promise<Array<Feature<atlas.data.Geometry, ClusteredProperties | any> |
Shape>>
parameters:
- id: clusterId
type: number
description: |+
return:
description: ''
type: >-
Promise<Array<<xref uid="azure-maps-control.atlas.data.Feature"
/><<xref uid="azure-maps-control.atlas.data.Geometry" />, <xref
uid="azure-maps-control.atlas.ClusteredProperties" /> | any> |
<xref uid="azure-maps-control.atlas.Shape" />>>
- name: getClusterExpansionZoom(number)
uid: azure-maps-control.atlas.source.DataSource.getClusterExpansionZoom
package: azure-maps-control
summary: >-
Calculates a zoom level at which the cluster will start expanding or break
apart.
remarks: ''
isDeprecated: false
syntax:
content: 'function getClusterExpansionZoom(clusterId: number): Promise<number>'
parameters:
- id: clusterId
type: number
description: |+
return:
description: ''
type: Promise<number>
- name: 'getClusterLeaves(number, number, number)'
uid: azure-maps-control.atlas.source.DataSource.getClusterLeaves
package: azure-maps-control
summary: Retrieves shapes that are within the cluster.
remarks: ''
isDeprecated: false
syntax:
content: >-
function getClusterLeaves(clusterId: number, limit: number, offset:
number): Promise<Array<Feature<atlas.data.Geometry, any> | Shape>>
parameters:
- id: clusterId
type: number
description: ''
- id: limit
type: number
description: >-
The maximum number of features to return. Set to Infinity to return
all shapes.
- id: offset
type: number
description: >
The number of shapes to skip. Allows you to page through the shapes
in the cluster.
return:
description: ''
type: >-
Promise<Array<<xref uid="azure-maps-control.atlas.data.Feature"
/><<xref uid="azure-maps-control.atlas.data.Geometry" />, any> |
<xref uid="azure-maps-control.atlas.Shape" />>>
- name: getOptions()
uid: azure-maps-control.atlas.source.DataSource.getOptions
package: azure-maps-control
summary: Gets the options used by the data source.
remarks: ''
isDeprecated: false
syntax:
content: 'function getOptions(): DataSourceOptions'
return:
description: ''
type: <xref uid="azure-maps-control.atlas.DataSourceOptions" />
- name: getShapeById(string | number)
uid: azure-maps-control.atlas.source.DataSource.getShapeById
package: azure-maps-control
summary: >-
Retrieves a shape with the specified id.
If no shape with the specified id is contained in the data source, null
will be return.
remarks: ''
isDeprecated: false
syntax:
content: 'function getShapeById(id: string | number): Shape'
parameters:
- id: id
type: string | number
description: |
The id of the shape to return.
return:
description: ''
type: <xref uid="azure-maps-control.atlas.Shape" />
- name: getShapes()
uid: azure-maps-control.atlas.source.DataSource.getShapes
package: azure-maps-control
summary: Returns all shapes that are in the DataSource.
remarks: ''
isDeprecated: false
syntax:
content: 'function getShapes(): Shape[]'
return:
description: ''
type: '<xref uid="azure-maps-control.atlas.Shape" />[]'
- name: importDataFromUrl(string)
uid: azure-maps-control.atlas.source.DataSource.importDataFromUrl
package: azure-maps-control
summary: |-
Downloads a GeoJSON document and imports its data into the data source.
The GeoJSON document must be on the same domain or accessible using CORS.
remarks: ''
isDeprecated: false
syntax:
content: 'function importDataFromUrl(url: string): Promise<void>'
parameters:
- id: url
type: string
description: |+
return:
description: ''
type: Promise<void>
- name: >-
remove(number | string | Shape | Feature<atlas.data.Geometry, any> |
Array<number | string | Shape | Feature<atlas.data.Geometry, any>>)
uid: azure-maps-control.atlas.source.DataSource.remove
package: azure-maps-control
summary: |-
Removes one or more shapes from the data source.
If a string is passed in, it is assumed to be an id.
If a number is passed in, removes the shape at that index.
remarks: ''
isDeprecated: false
syntax:
content: >-
function remove(shape: number | string | Shape |
Feature<atlas.data.Geometry, any> | Array<number | string | Shape |
Feature<atlas.data.Geometry, any>>)
parameters:
- id: shape
type: >-
number | string | <xref uid="azure-maps-control.atlas.Shape" /> |
<xref uid="azure-maps-control.atlas.data.Feature" /><<xref
uid="azure-maps-control.atlas.data.Geometry" />, any> |
Array<number | string | <xref
uid="azure-maps-control.atlas.Shape" /> | <xref
uid="azure-maps-control.atlas.data.Feature" /><<xref
uid="azure-maps-control.atlas.data.Geometry" />, any>>
description: |
The shape(s), shape id(s), or feature(s) to be removed
- name: removeById(number | string | Array<number | string>)
uid: azure-maps-control.atlas.source.DataSource.removeById
package: azure-maps-control
summary: Removes one or more shapes from the datasource based on its id.
remarks: ''
isDeprecated: false
syntax:
content: 'function removeById(id: number | string | Array<number | string>)'
parameters:
- id: id
type: number | string | Array<number | string>
description: ''
- name: setOptions(DataSourceOptions)
uid: azure-maps-control.atlas.source.DataSource.setOptions
package: azure-maps-control
summary: >-
Sets the data source options.
The data source will retain its current values for any option not
specified in the supplied options.
remarks: ''
isDeprecated: false
syntax:
content: 'function setOptions(options: DataSourceOptions)'
parameters:
- id: options
type: <xref uid="azure-maps-control.atlas.DataSourceOptions" />
description: |
the DataSourceOptions to be set
- name: >-
setShapes(FeatureCollection | Array<Feature<atlas.data.Geometry, any> |
atlas.data.Geometry | Shape>)
uid: azure-maps-control.atlas.source.DataSource.setShapes
package: azure-maps-control
summary: Overwrites all shapes in the data source with the new array of shapes.
remarks: ''
isDeprecated: false
syntax:
content: >-
function setShapes(shape: FeatureCollection |
Array<Feature<atlas.data.Geometry, any> | atlas.data.Geometry | Shape>)
parameters:
- id: shape
type: >-
<xref uid="azure-maps-control.atlas.data.FeatureCollection" /> |
Array<<xref uid="azure-maps-control.atlas.data.Feature"
/><<xref uid="azure-maps-control.atlas.data.Geometry" />, any>
| <xref uid="azure-maps-control.atlas.data.Geometry" /> | <xref
uid="azure-maps-control.atlas.Shape" />>
description: |
the new shapes to update
- name: toJson()
uid: azure-maps-control.atlas.source.DataSource.toJson
package: azure-maps-control
summary: >-
Returns a GeoJSON FeatureCollection which contains all the shape data that
is in the data source.
remarks: ''
isDeprecated: false
syntax:
content: 'function toJson(): FeatureCollection'
return:
description: ''
type: <xref uid="azure-maps-control.atlas.data.FeatureCollection" />
extends: >-
<xref uid="azure-maps-control.atlas.source.Source" /><<xref
uid="azure-maps-control.atlas.source.DataSourceEvents" />>