GroupLayerDataSource

Interface

GroupLayerDataSource is created from a group layer of map service or webmap/webscene.

Inheritance: GroupLayerDataSourceAbstractArcGISLayerFolderDataSource

Properties

Hide inherited properties
PropertyTypeNotes
() => void

When current data source is created from an array of records, it will be saved in sourceRecords . Add the version of sourceRecords .setSourceRecords will add the version by default.

addVersion
inherited
() => void

Update data source version.

() => boolean

Return whether all child data sources (including descendant data sources) are created. Data source has this method only if it is data source set ( dataSource.isDataSourceSet is true).

The data source which this data source derives from.

buildRecord
inherited
(dataany) => DataRecord

Builds a data record only -- does not add the record into data source.

(gdbVersionstring) => void

Change the GDB version for all layers in the service.

() => Promise<DataSource[]>

All child data sources (including descendant data sources) are ready for use. Data source has this method only if it is data source set ( dataSource.isDataSourceSet is true).

clearRecords
inherited
() => void

This function will clear the loaded records and won't clear the sourceRecords. Once the loaded records are cleared, the version in the data source info will be updated.

() => void

Clear both sourceRecords and loaded records. Both source version and version in data source info will be updated.

count
inherited
number

The total records count depends on the current query

(dataSourceIdstring) => Promise<DataSource>

Create a child or a descendant data source by id. Data source has this method only if it is data source set ( dataSource.isDataSourceSet is true).

(dataSource?DataSource, useDataSourceQueryParams?boolean, throwError?boolean) => Promise<Layer>

Default dataSource is the current data source. Default useDataSourceQueryParams is true, that is to say apply the data source's query params to the created ArcGIS Maps SDK for JavaScript layer by default. Default throwError is false, that is to say the method won't throw error and will return undefined if the creation fail.

The data source manager, which is used to manage the data source, including create/get/destroy the data source instance.

dataViewId
inherited
string

The data view ID configured in JSON.

destroy
inherited
() => void

Destroy the data source.

fetchSchema
inherited
() => Promise<IMDataSourceSchema>

Fetch the data schema from an actual data source. If it's a statistic data source, the schema will not be fetched.

() => DataSource[]

Return all child data sources of a parent data source, includes the grandchildren

() => DataSource[]

Return the derived data views and local data sources.

(jimuChildIdstring) => DataSource

Get child data source by jimuChildId . You can get jimuChildId by getJimuChildId() .

() => DataSource[]

Return child data sources of a parent data source.

Return data source count status.

() => IMDataSourceJson

The data source JSON object in app config.

getDataView
inherited
(dataViewIdstring) => DataSource

Get data view by data view ID.

() => IMDataViewJson

Return the config of the current data source.

getDataViews
inherited
() => DataSource[]

Return all data views created from a main data source.

getGDBVersion
inherited
() => string

Get the service GDB version.

getIdField
inherited
() => string

Return the data source ID field.

getInfo
inherited
() => IMDataSourceInfo

Return the data source info in redux store.

getLabel
inherited
() => string

Return data source label.

() => boolean

Return whether listen selection.

(localIdstring) => DataSource

Get local data source by local ID.

() => DataSource[]

Return all local data sources created from a main data source or data view.

Return the main data source.

getRecord
inherited
(indexnumber) => DataRecord

Get record by index

getRecordById
inherited
(idstring) => DataRecord

Get record by ID

getRecords
inherited
() => DataRecord[]

Get records

() => DataRecord[]

If selected records are not loaded in the current data source, they will be concatenated to the end of records array. For example, record 1 is selected in data view 1 and it is not loaded in data view 2 (record 1 actually matches query params of data view 2), dataView2.getRecordsWithSelection() will return all loaded records in data view 2 and record 1.

Return the root data source.

getSchema
inherited

The schema returned here is the merged result of the configured schema and the fetched schema. The configured schema is the user's changes, such as a new data source name. The fetched schema is the original schema from AGOL/portal item or a remote database, such as the service name, the fields and the filters.

() => string[]

Get selected record IDs

() => number[]

Get selected record indexes

() => DataRecord[]

Get selected records

() => DataRecord[]

Return the source records

() => number

When current data source is created from an array of records, it will be saved in sourceRecords . Return the version of sourceRecords .

getStatus
inherited

Return data source status.

getVersion
inherited
() => number

Return data source version.

id
inherited
string

The data source ID.

boolean

Whether a data source contains child data sources. A set data source won't create all its child data sources when ready is resolved. To make sure all child data sources are created, please use childDataSourcesReady .

isDataView
inherited
boolean

True means the data source is a data view. For local data source, this is false even the local data source is created from a data view.

isInAppConfig
inherited
() => boolean

Return whether the data source is added in builder and is saved in app config.

isLocal
inherited
boolean

True means the data source is a local data source.

Sublayer | GroupLayer

When add a map service directly, there is no layer instance created. When add a webmap that contains map service, the folder in the map service will be created as __esri.Sublayer layer. When add a webmap that contains group layer created in MapViewer, the group will be created as __esri.GroupLayer layer.

localId
inherited
string

The local ID of the data source.

order
inherited
number

Order in the parent data source.

The parent data source of this data source, mull means it's a root data source.

ready
inherited
() => Promise<any>

Ready is resolved means the data source instance is ready for use. Please note that can not make sure all child data sources are created if a set data source is ready. To make sure all child data sources are created, please use childDataSourcesReady .

(idstring, record?DataRecord) => void

Select a record by ID. When select record by ID, we can pass in the record. So when the selected record is not loaded, we can add it in.

selectRecords
inherited
(optionsSelectOptions) => Promise<Pick<QueryResult"records">>

Select records.

(idsstring[], records?DataRecord[]) => void

Select records by IDs. When select records by IDs, we can pass in the records. So when the selected records are not loaded, we can add them in.

(statusDataSourceStatus) => void

Update data source count status.

(dsJsonIMDataSourceJson) => void

Update data source JSON in data source instance

(listenboolean) => void

Whether listen selected records from other data sources which are derived from the same main data source. If true, will update selected record IDs of current data source info when selecting records via other derived data sources. Will also update selected record IDs when selecting records via current data source itself. If false, won't change selected record IDs when selecting records via other derived data sources. Will update selected record IDs only when selecting records via current data source itself.

setRecords
inherited
(recordsDataRecord[]) => void

Update the records in the data source object only, does not update the source data.

(recordsDataRecord[]) => void

When current data source is created from an array of records, will save it in sourceRecords . These two methods are used to update or get the source data.

setStatus
inherited
(statusDataSourceStatus) => void

Update data source status.

(optionsSelectOptions, triggerDataSourceDataSource, forceCheck?boolean) => void

Update selected records in data source info if the current data source listens selection change (see setListenSelection ) or the current data source is the trigger data source (that is to say, select via it).

addSourceVersion

inherited
Interface Property
addSourceVersion: () => void

When current data source is created from an array of records, it will be saved in sourceRecords . Add the version of sourceRecords .setSourceRecords will add the version by default.

Type declaration
    function(): void
    Returns 
    void

addVersion

optionalinherited
Interface Property
addVersion: () => void

Update data source version.

Type declaration
    function(): void
    Returns 
    void

areChildDataSourcesCreated

optionalinherited
Interface Property
areChildDataSourcesCreated: () => boolean

Return whether all child data sources (including descendant data sources) are created. Data source has this method only if it is data source set ( dataSource.isDataSourceSet is true).

Type declaration
    function(): boolean
    Returns 
    boolean

belongToDataSource

optionalinherited
Interface Property
belongToDataSource: DataSource

The data source which this data source derives from.

buildRecord

inherited
Interface Property
buildRecord: (dataany) => DataRecord

Builds a data record only -- does not add the record into data source.

Type declaration

changeGDBVersion

inherited
Interface Property
changeGDBVersion: (gdbVersionstring) => void

Change the GDB version for all layers in the service.

Type declaration
    function(gdbVersionstring): void
    Parameters
    ParameterType
    gdbVersion
    string
    Returns 
    void

childDataSourcesReady

optionalinherited
Interface Property
childDataSourcesReady: () => Promise<DataSource[]>

All child data sources (including descendant data sources) are ready for use. Data source has this method only if it is data source set ( dataSource.isDataSourceSet is true).

Type declaration

clearRecords

optionalinherited
Interface Property
clearRecords: () => void

This function will clear the loaded records and won't clear the sourceRecords. Once the loaded records are cleared, the version in the data source info will be updated.

Type declaration
    function(): void
    Returns 
    void

clearSourceRecords

inherited
Interface Property
clearSourceRecords: () => void

Clear both sourceRecords and loaded records. Both source version and version in data source info will be updated.

Type declaration
    function(): void
    Returns 
    void

count

optionalinherited
Interface Property
count: number

The total records count depends on the current query

createDataSourceById

optionalinherited
Interface Property
createDataSourceById: (dataSourceIdstring) => Promise<DataSource>

Create a child or a descendant data source by id. Data source has this method only if it is data source set ( dataSource.isDataSourceSet is true).

Please note will only create the specific data source, won't create descendant data sources of it.

Type declaration
    function(dataSourceIdstring): Promise<DataSource>
    Parameters
    ParameterType
    dataSourceId
    string
    Returns 
    Promise<DataSource>

createJSAPILayerByDataSource

inherited
Interface Property
createJSAPILayerByDataSource: (dataSource?DataSource, useDataSourceQueryParams?boolean, throwError?boolean) => Promise<Layer>

Default dataSource is the current data source. Default useDataSourceQueryParams is true, that is to say apply the data source's query params to the created ArcGIS Maps SDK for JavaScript layer by default. Default throwError is false, that is to say the method won't throw error and will return undefined if the creation fail.

Type declaration
    function(dataSource?DataSource, useDataSourceQueryParams?boolean, throwError?boolean): Promise<Layer>
    Parameters
    ParameterType
    dataSource
    DataSource
    useDataSourceQueryParams
    boolean
    throwError
    boolean
    Returns 
    Promise<Layer>

dataSourceManager

inherited
Interface Property
dataSourceManager: DataSourceManager

The data source manager, which is used to manage the data source, including create/get/destroy the data source instance.

dataViewId

optionalinherited
Interface Property
dataViewId: string

The data view ID configured in JSON.

destroy

inherited
Interface Property
destroy: () => void

Destroy the data source.

Type declaration
    function(): void
    Returns 
    void

fetchSchema

inherited
Interface Property
fetchSchema: () => Promise<IMDataSourceSchema>

Fetch the data schema from an actual data source. If it's a statistic data source, the schema will not be fetched.

Type declaration

getAllChildDataSources

optionalinherited
Interface Property
getAllChildDataSources: () => DataSource[]

Return all child data sources of a parent data source, includes the grandchildren

Type declaration

getAllDerivedDataSources

inherited
Interface Property
getAllDerivedDataSources: () => DataSource[]

Return the derived data views and local data sources.

Type declaration

getChildDataSource

optionalinherited
Interface Property
getChildDataSource: (jimuChildIdstring) => DataSource

Get child data source by jimuChildId . You can get jimuChildId by getJimuChildId() .

Type declaration
    function(jimuChildIdstring): DataSource
    Parameters
    ParameterType
    jimuChildId
    string
    Returns 
    DataSource

getChildDataSources

optionalinherited
Interface Property
getChildDataSources: () => DataSource[]

Return child data sources of a parent data source.

Type declaration

getCountStatus

inherited
Interface Property
getCountStatus: () => DataSourceStatus

Return data source count status.

Type declaration

getDataSourceJson

inherited
Interface Property
getDataSourceJson: () => IMDataSourceJson

The data source JSON object in app config.

Type declaration
    function(): IMDataSourceJson
    Returns 
    IMDataSourceJson

getDataView

inherited
Interface Property
getDataView: (dataViewIdstring) => DataSource

Get data view by data view ID.

Type declaration

getDataViewConfig

inherited
Interface Property
getDataViewConfig: () => IMDataViewJson

Return the config of the current data source.

Type declaration
    function(): IMDataViewJson
    Returns 
    IMDataViewJson

getDataViews

inherited
Interface Property
getDataViews: () => DataSource[]

Return all data views created from a main data source.

Type declaration

getGDBVersion

inherited
Interface Property
getGDBVersion: () => string

Get the service GDB version.

Type declaration
    function(): string
    Returns 
    string

getIdField

inherited
Interface Property
getIdField: () => string

Return the data source ID field.

Type declaration
    function(): string
    Returns 
    string

getInfo

inherited
Interface Property
getInfo: () => IMDataSourceInfo

Return the data source info in redux store.

Type declaration
    function(): IMDataSourceInfo
    Returns 
    IMDataSourceInfo

getLabel

inherited
Interface Property
getLabel: () => string

Return data source label.

Type declaration
    function(): string
    Returns 
    string

getListenSelection

inherited
Interface Property
getListenSelection: () => boolean

Return whether listen selection.

Type declaration
    function(): boolean
    Returns 
    boolean

getLocalDataSource

inherited
Interface Property
getLocalDataSource: (localIdstring) => DataSource

Get local data source by local ID.

Type declaration

getLocalDataSources

inherited
Interface Property
getLocalDataSources: () => DataSource[]

Return all local data sources created from a main data source or data view.

Type declaration

getMainDataSource

inherited
Interface Property
getMainDataSource: () => DataSource

Return the main data source.

Type declaration

getRecord

inherited
Interface Property
getRecord: (indexnumber) => DataRecord

Get record by index

Type declaration

getRecordById

inherited
Interface Property
getRecordById: (idstring) => DataRecord

Get record by ID

Type declaration

getRecords

inherited
Interface Property
getRecords: () => DataRecord[]

Get records

Type declaration

getRecordsWithSelection

inherited
Interface Property
getRecordsWithSelection: () => DataRecord[]

If selected records are not loaded in the current data source, they will be concatenated to the end of records array. For example, record 1 is selected in data view 1 and it is not loaded in data view 2 (record 1 actually matches query params of data view 2), dataView2.getRecordsWithSelection() will return all loaded records in data view 2 and record 1.

Type declaration

getRootDataSource

inherited
Interface Property
getRootDataSource: () => DataSource

Return the root data source.

Type declaration

getSchema

inherited
Interface Property
getSchema: () => IMDataSourceSchema

The schema returned here is the merged result of the configured schema and the fetched schema. The configured schema is the user's changes, such as a new data source name. The fetched schema is the original schema from AGOL/portal item or a remote database, such as the service name, the fields and the filters.

Type declaration

getSelectedRecordIds

inherited
Interface Property
getSelectedRecordIds: () => string[]

Get selected record IDs

Type declaration
    function(): string[]
    Returns 
    string[]

getSelectedRecordIndexes

inherited
Interface Property
getSelectedRecordIndexes: () => number[]

Get selected record indexes

Type declaration
    function(): number[]
    Returns 
    number[]

getSelectedRecords

inherited
Interface Property
getSelectedRecords: () => DataRecord[]

Get selected records

Type declaration

getSourceRecords

inherited
Interface Property
getSourceRecords: () => DataRecord[]

Return the source records

Type declaration

getSourceVersion

inherited
Interface Property
getSourceVersion: () => number

When current data source is created from an array of records, it will be saved in sourceRecords . Return the version of sourceRecords .

Type declaration
    function(): number
    Returns 
    number

getStatus

inherited
Interface Property
getStatus: () => DataSourceStatus

Return data source status.

Type declaration

getVersion

inherited
Interface Property
getVersion: () => number

Return data source version.

Type declaration
    function(): number
    Returns 
    number

id

inherited
Interface Property
id: string

The data source ID.

isDataSourceSet

inherited
Interface Property
isDataSourceSet: boolean

Whether a data source contains child data sources. A set data source won't create all its child data sources when ready is resolved. To make sure all child data sources are created, please use childDataSourcesReady .

isDataView

inherited
Interface Property
isDataView: boolean

True means the data source is a data view. For local data source, this is false even the local data source is created from a data view.

isInAppConfig

inherited
Interface Property
isInAppConfig: () => boolean

Return whether the data source is added in builder and is saved in app config.

Type declaration
    function(): boolean
    Returns 
    boolean

isLocal

inherited
Interface Property
isLocal: boolean

True means the data source is a local data source.

layer

optional
Interface Property
layer: Sublayer | GroupLayer

When add a map service directly, there is no layer instance created. When add a webmap that contains map service, the folder in the map service will be created as __esri.Sublayer layer. When add a webmap that contains group layer created in MapViewer, the group will be created as __esri.GroupLayer layer.

localId

optionalinherited
Interface Property
localId: string

The local ID of the data source.

order

optionalinherited
Interface Property
order: number

Order in the parent data source.

parentDataSource

inherited
Interface Property
parentDataSource: DataSource

The parent data source of this data source, mull means it's a root data source.

ready

inherited
Interface Property
ready: () => Promise<any>

Ready is resolved means the data source instance is ready for use. Please note that can not make sure all child data sources are created if a set data source is ready. To make sure all child data sources are created, please use childDataSourcesReady .

Type declaration
    function(): Promise<any>
    Returns 
    Promise<any>

selectRecordById

inherited
Interface Property
selectRecordById: (idstring, record?DataRecord) => void

Select a record by ID. When select record by ID, we can pass in the record. So when the selected record is not loaded, we can add it in.

Type declaration
    function(idstring, record?DataRecord): void
    Parameters
    ParameterTypeNotes
    id
    string

    The ID to be selected. The selection will be cleared if the ID is null.

    record
    DataRecord
    Returns 
    void

selectRecords

inherited
Interface Property
selectRecords: (optionsSelectOptions) => Promise<Pick<QueryResult"records">>

Select records.

Type declaration

selectRecordsByIds

inherited
Interface Property
selectRecordsByIds: (idsstring[], records?DataRecord[]) => void

Select records by IDs. When select records by IDs, we can pass in the records. So when the selected records are not loaded, we can add them in.

Type declaration
    function(idsstring[], records?DataRecord[]): void
    Parameters
    ParameterTypeNotes
    ids
    string[]

    The IDs to be selected. The selection will be cleared if the IDs are null.

    records
    DataRecord[]
    Returns 
    void

setCountStatus

optionalinherited
Interface Property
setCountStatus: (statusDataSourceStatus) => void

Update data source count status.

Type declaration

setDataSourceJson

inherited
Interface Property
setDataSourceJson: (dsJsonIMDataSourceJson) => void

Update data source JSON in data source instance

Type declaration
    function(dsJsonIMDataSourceJson): void
    Parameters
    ParameterType
    dsJson
    IMDataSourceJson
    Returns 
    void

setListenSelection

inherited
Interface Property
setListenSelection: (listenboolean) => void

Whether listen selected records from other data sources which are derived from the same main data source. If true, will update selected record IDs of current data source info when selecting records via other derived data sources. Will also update selected record IDs when selecting records via current data source itself. If false, won't change selected record IDs when selecting records via other derived data sources. Will update selected record IDs only when selecting records via current data source itself.

Main data source and its data views will listen selected records by default, local data source does not listen selected records by default.

Type declaration
    function(listenboolean): void
    Parameters
    ParameterType
    listen
    boolean
    Returns 
    void

setRecords

inherited
Interface Property
setRecords: (recordsDataRecord[]) => void

Update the records in the data source object only, does not update the source data.

Type declaration

setSourceRecords

inherited
Interface Property
setSourceRecords: (recordsDataRecord[]) => void

When current data source is created from an array of records, will save it in sourceRecords . These two methods are used to update or get the source data.

Type declaration

setStatus

optionalinherited
Interface Property
setStatus: (statusDataSourceStatus) => void

Update data source status.

Type declaration

updateSelectionInfo

inherited
Interface Property
updateSelectionInfo: (optionsSelectOptions, triggerDataSourceDataSource, forceCheck?boolean) => void

Update selected records in data source info if the current data source listens selection change (see setListenSelection ) or the current data source is the trigger data source (that is to say, select via it).

Before update info, will check whether these selected records match filters of the current data source firstly, and then only set the matched selected records to info. Will skip the check in some cases to improve performance if the forceCheck is not passed in or is false. For example, if the curren data source is main data source (we suppose that main data source contains all records, no need to check). But if the forceCheck is true, won't skip the check.

Type declaration

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.