WebSceneDataSource
Interface
Web scene data source is created from a webscene. It may have child data sources (such as feature layer data source, scene layer data source and so on).
Properties
Property | Type |
---|---|
WebScene |
Methods
Method | Returns | Notes |
---|---|---|
| Promise<IMDataSourceSchema> | |
| Find data source with a specific layer. The specific layer can be direct child layer of the map or descendant layer of the map. | |
| Promise<MapChildDataSource[]> |
fetchSchema
fetchSchema(): Promise<IMDataSourceSchema>
Returns
Promise<IMDataSourceSchema>
getDataSourceByLayer
getDataSourceByLayer(layerId: string | number, layerOfSubLayerId?: string): DataSource
Find data source with a specific layer. The specific layer can be direct child layer of the map or descendant layer of the map.
Parameters
Parameter | Type | Notes |
---|---|---|
layer | string | number | layer id of the specific layer, the specific layer may be a layer or a sublayer |
layer | string | if the specific layer is sublayer, should passed in id of the sublayer's layer. For example, we have a map which has a map service layer A and we want to get the data source with feature layer B (B is a sublayer of the map service layer),
we should call The reason why need to pass in For example, we have a JSAPI map with the following structure:
|
Returns
DataSource
ready
ready(): Promise<MapChildDataSource[]>
Returns
Promise<MapChildDataSource[]>
type: WebScene