UseDataSource

Interface

Data source used in widgets.

Properties

PropertyTypeNotes
string

This is the real data source id a widget is using, the id can be:

string[]

jimu field name array. If no fields, means the widget can work with any field.

string

Main data source is user configured data source or widget output data source. If the data source is in a data source set, need to use rootDataSourceId to get dataSourceJson.

string

The data source a widget uses may be a child data source of another data source, so we save the root data source id here so we can create data source easily.

boolean

If true, the widget will use popup info of a layer data source. For example, widgets use fields configured in popup info as display fields.

boolean

If true, the widget will use symbol of a layer data source. For example, image widget can display symbol of records.

dataSourceId

Interface Property
dataSourceId: string

This is the real data source id a widget is using, the id can be:

  • mainDataSourceId, when the widget uses main data source directly.
  • ${mainDataSourceId}-${dataViewId} , when the widget uses a data view. Please use this id to call dataSourceManager.getDataSource() .

fields

optional
Interface Property
fields: string[]

jimu field name array. If no fields, means the widget can work with any field.

mainDataSourceId

Interface Property
mainDataSourceId: string

Main data source is user configured data source or widget output data source. If the data source is in a data source set, need to use rootDataSourceId to get dataSourceJson.

rootDataSourceId

optional
Interface Property
rootDataSourceId: string

The data source a widget uses may be a child data source of another data source, so we save the root data source id here so we can create data source easily.

useFieldsInPopupInfo

optional
Interface Property
useFieldsInPopupInfo: boolean

If true, the widget will use popup info of a layer data source. For example, widgets use fields configured in popup info as display fields.

useFieldsInSymbol

optional
Interface Property
useFieldsInSymbol: boolean

If true, the widget will use symbol of a layer data source. For example, image widget can display symbol of records.

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