MapDataSource
Interface
Interface for map related data sources. It contains a JS API Map instance.
Properties
Property | Type |
---|---|
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[]> |
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
type: DataSourceTypes