GroupLayerDataSource

Interface

Group layer data source is created from a group layer of map service or webmap/webscene.

Inheritance: GroupLayerDataSourceDataSource

Properties

addSourceVersion

addSourceVersion: function

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

Type declaration
    (): void
    Returns 
    void

clearRecords optional

clearRecords: function

Only clear records, don't clear source data, version in datat source info will be added.

Type declaration
    (): void
    Returns 
    void

count optional

count: number

The total records count depends on the current query

dataViewId optional

dataViewId: string

The data view id configured in Json.

fetchSchema

fetchSchema: function

Fetch data schema from an actual data source. If it's a statistic data source, we won't fetch schema.

Type declaration
    (): Promise<ImmutableObject<DataSourceSchema>>
    Returns 
    Promise<ImmutableObject<DataSourceSchema>>

getAllDerivedDataSources

getAllDerivedDataSources: function

Return the derived data views and local data sources.

Type declaration

getDataSourceJson

getDataSourceJson: function

The data source JSON object in app config.

Type declaration
    (): ImmutableObject<DataSourceJson>
    Returns 
    ImmutableObject<DataSourceJson>

getDataViews

getDataViews: function

Return all data views created from a main data source.

Type declaration

getLocalDataSources

getLocalDataSources: function

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

Type declaration

getRecord

getRecord: function

Get record by index

Type declaration

getRecordById

getRecordById: function

Get record by id

Type declaration

getRecords

getRecords: function

When current data source is selection view, use useNoSelectionView to indicate whether return records in on_selection view when real selection is empty. The default value is true.

Type declaration
    (useNoSelectionView?boolean): DataRecord[]
    Parameters
    • useNoSelectionViewbooleanoptional 
    Returns 
    DataRecord[]

getRecordsWithSelection

getRecordsWithSelection: function

If selected records are not loaded in the current data source, will concat them to the end of records array. E.g. record 1 is selected in data view 1, record 1 is not loaded in data view 2 (record 1 actually matches query parmas of data view 2), dataView2.getRecordsWithSelection() will return all loaded records in data view 2 and record 1.

Type declaration

getSchema

getSchema: function

The schema returned here is the merged result of the configured schema and the fetched schema.

Type declaration
    (): ImmutableObject<DataSourceSchema>
    Returns 
    ImmutableObject<DataSourceSchema>

getSelectedFields

getSelectedFields: function

The schema contains all fields defined in the actual service. This method will return the fields user configured in the widget which generates output data source.

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

getSelectedRecordIds optional

getSelectedRecordIds: function

Get selected record ids

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

getSelectedRecordIndexes optional

getSelectedRecordIndexes: function

Get selected record indexes

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

getSelectedRecords optional

getSelectedRecords: function

Get selected records

Type declaration

getSourceRecords

getSourceRecords: function

Return the source records

Type declaration

getSourceVersion

getSourceVersion: function

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

Type declaration
    (): number
    Returns 
    number

id

id: string

These 3 properties are in app config. Put them here for ease of use.

isDataSourceSet

isDataSourceSet: boolean

Whether a data source contains child data sources. A dataset data source should create its all child data sources before parsing ready().

isDataView

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.

isLocal

isLocal: boolean

True means the data source is a local data source.

parentDataSource

parentDataSource: DataSource

Null means it's root data source.

ready

ready: function

Ready is resolved means the data source instance is ready for use.

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

selectRecord optional

selectRecord: function

Select record by index.

Type declaration
    (indexnumber): void
    Parameters
    • indexnumber
    Returns 
    void

selectRecordById optional

selectRecordById: function

When select record by id, we can pass in the records. So when the selected records are not in the data source, we can add them in.

Type declaration
    (idstring, record?DataRecord): void
    Parameters
    Returns 
    void

selectRecordsByIds optional

selectRecordsByIds: function

Select records by ids

Type declaration
    (idsstring[], records?DataRecord[]): void
    Parameters
    Returns 
    void

setDataSourceJson

setDataSourceJson: function

Update data source JSON in data source instance

Type declaration
    (dsJsonImmutableObject<DataSourceJson>): void
    Parameters
    • dsJsonImmutableObject<DataSourceJson>
    Returns 
    void

setListenSelection

setListenSelection: function

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. 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 won't listen selected records by default.

Type declaration
    (listenboolean): void
    Parameters
    • listenboolean
    Returns 
    void

setRecords

setRecords: function

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

Type declaration

setSourceRecords

setSourceRecords: function

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

Type declaration

type

type: GroupLayer

The type of the data source

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