SceneLayerDataSource

Interface

SceneLayerDataSource is created from a single scene layer of scene service or webscene.

Inheritance: SceneLayerDataSourceQueriableDataSource

Properties

addSourceVersion
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.

addVersion optional
addVersion: () => void

Update data source version.

belongToDataSource optional
belongToDataSource: DataSource

The data source which this data source derives from.

changeGDBVersion
changeGDBVersion: (gdbVersionstring) => void

Change the layer GDB version.

clearRecords optional
clearRecords: () => void

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

clearSourceRecords
clearSourceRecords: () => void

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

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: () => Promise<IMDataSourceSchema>

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

getAllDerivedDataSources
getAllDerivedDataSources: () => DataSource[]

Return the derived data views and local data sources.

getAutoRefreshInterval
getAutoRefreshInterval: () => number

If the return value > 0, auto refresh is enabled.

getChildDataSource optional
getChildDataSource: (jimuChildIdstring) => DataSource

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

getChildDataSources optional
getChildDataSources: () => DataSource[]

Return child data sources of a parent data source.

getConfigQueryParams
getConfigQueryParams: () => FeatureLayerQueryParams

Get the user config query parameters.

getCountStatus
getCountStatus: () => DataSourceStatus

Return data source count status.

getCurrentQueryParams
getCurrentQueryParams: (excludeOption?WidgetDataSourcePair) => QueryParams

Get the current query parameters. The current query parameters contain all applied queries.

getDataSourceJson
getDataSourceJson: () => IMDataSourceJson

The data source JSON object in app config.

getDataView
getDataView: (dataViewIdstring) => QueriableDataSource

Get data view by data view id.

getDataViews
getDataViews: () => QueriableDataSource[]

Override parent interface to get correct type.

getGDBVersion
getGDBVersion: () => string

Return the current GDB version.

getGeometryType
getGeometryType: () => GeometryType
getIdField
getIdField: () => string

Return the data source id field.

getInfo
getInfo: () => IMDataSourceInfo

Return the data source info in redux store.

getLabel
getLabel: () => string

Return data source label.

getListenSelection
getListenSelection: () => boolean

Return whether listen selection.

getLocalDataSource
getLocalDataSource: (localIdstring) => DataSource

Get local data source by local Id.

getLocalDataSources
getLocalDataSources: () => DataSource[]

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

getMainDataSource
getMainDataSource: () => QueriableDataSource

Return the main data source.

getMaxRecordCount
getMaxRecordCount: () => number

Null means there is no record count limit, and will return all records from the service.

getRealQueryPages
getRealQueryPages: (pageSizenumber, pagenumber) => number[]

Get real query page depends on the widget's request page.

getRealQueryParams
getRealQueryParams: (queryany, flag"query" | "load", options?QueryOptions) => FeatureLayerQueryParams

When do query/load, we do not fire the query request directly. Instead, we'll consider the data source's config/current query parameter.

  • For load: we'll merge the configured query parameter if it has, and all widget applied queries.
  • For query, we'll merge the current query parameter and the configured query parameter it has.
getRecord
getRecord: (indexnumber) => DataRecord

Get record by index

getRecordById
getRecordById: (idstring) => DataRecord

Get record by id

getRecords
getRecords: () => DataRecord[]

Get records

getRecordsByPage
getRecordsByPage: (pagenumber, pageSizenumber) => DataRecord[]

The page size here defines the records this method returns, which are not the actual query pageSize. Will use a fixed pageSize to query and cache data.

getRecordsByPageWithSelection
getRecordsByPageWithSelection: (pagenumber, pageSizenumber) => DataRecord[]

If selected records are not loaded in the current data source, will concat them to the end of records array. See getRecordsWithSelection for details.

getRecordsWithSelection
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.

getRemoteQueryParams
getRemoteQueryParams: () => QueryParams

Get the query parameters configured in remote (not in exb).

getRootDataSource
getRootDataSource: () => DataSource

Return the root data source.

getRuntimeQueryParams
getRuntimeQueryParams: (excludeWidgetId?string) => QueryParams

Get the queries applied in runtime. If the excludeWidgetId is passed in, the queries of this widget will be excluded.

getSchema
getSchema: () => IMDataSourceSchema

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

getSelectedRecordIds optional
getSelectedRecordIds: () => string[]

Get selected record ids

getSelectedRecordIndexes optional
getSelectedRecordIndexes: () => number[]

Get selected record indexes

getSelectedRecords optional
getSelectedRecords: () => DataRecord[]

Get selected records

getSourceRecords
getSourceRecords: () => DataRecord[]

Return the source records

getSourceVersion
getSourceVersion: () => number

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

getStatus
getStatus: () => DataSourceStatus

Return data source status.

getVersion
getVersion: () => number

Return data source version.

id
id: string

The data source id.

isDataSourceSet
isDataSourceSet: boolean

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

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.

load
load: (queryFeatureLayerQueryParams, options?QueryOptions) => Promise<DataRecord[]>

Execute the query against the service and update the internal data records, pagination is supported. When call this method, the real query is returnd by getRealQueryParams.

Pagination: The pagination properties in the passed in query parameter may be not the same as the real query pagination that is sent to the service. The real query pagination is defined in the data source setting.

loadById
loadById: (idstring, refresh?boolean) => Promise<DataRecord>

Load record by id, do not consider other queries.

loadCount
loadCount: (queryFeatureLayerQueryParams, options?QueryOptions) => Promise<number>

Load the records count.

localId optional
localId: string

The local id of the data source.

mergeQueryParams
mergeQueryParams: (baseQueryFeatureLayerQueryParams, newQueryFeatureLayerQueryParams) => FeatureLayerQueryParams

Merge the new query to base query by using AND, and return the merged result. If any query is undefined/null, it will be ignored.

parentDataSource
parentDataSource: DataSource

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

query
query: (queryPropertiesFeatureLayerQueryParams) => Promise<QueryResult>

Execute query against the service only, do NOT update the internal data records. The actural query parameters are generated by getRealQueryParams.

To query count, please use queryCount.

queryById
queryById: (idstring) => Promise<FeatureDataRecord>

Query record by id

queryCount
queryCount: (queryPropertiesFeatureLayerQueryParams) => Promise<QueryResult>

Query count

ready
ready: () => Promise<any>

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

selectRecordById
selectRecordById: (idstring, record?FeatureDataRecord) => void

Select a record by id. 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 it in.

selectRecordsByIds
selectRecordsByIds: (idsstring[], records?FeatureDataRecord[]) => void

Select records by ids

setCountStatus optional
setCountStatus: (statusDataSourceStatus) => void

Update data source count status.

setDataSourceJson
setDataSourceJson: (dsJsonIMDataSourceJson) => void

Update data source JSON in data source instance

setListenSelection
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. 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.

setRecords
setRecords: (recordsDataRecord[]) => void

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

setSourceRecords
setSourceRecords: (recordsDataRecord[]) => void

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.

setStatus optional
setStatus: (statusDataSourceStatus) => void

Update data source status.

type
type: SceneLayer

The type of the data source

updateQueryParams
updateQueryParams: (queryQueryParams, widgetIdstring) => void

Update the data source query without executing the actual query.

url
url: string

The data source URL

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