FeatureTable 微件
此示例演示如何将 FeatureTable 微件添加到您的应用程序。 FeatureTable 微件允许用户查看和排序来自 FeatureLayer 的数据和属性。 在此特定示例中,表格显示为没有任何关联地图的独立表格。 也可以添加带有关联地图的表格,请参阅 使用地图示例的 FeatureTable 微件 。
已知限制
有关限制的完整列表,请参阅微件的 参考手册 文档。
此示例演示如何将 FeatureTable 微件添加到您的应用程序。 FeatureTable 微件允许用户查看和排序来自 FeatureLayer 的数据和属性。 在此特定示例中,表格显示为没有任何关联地图的独立表格。 也可以添加带有关联地图的表格,请参阅 使用地图示例的 FeatureTable 微件 。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
const table = new FeatureTable({
layer: featureLayer,
visibleElements: {selectionColumn: false}, // hide the selection column since we are not working with a corresponding map
// autocastable to FieldColumnConfig
// The fieldColumnConfigs are used to determine which attributes are shown in the table
// If the fieldColumnConfigs are not set, all attributes will be shown
fieldConfigs: [
{
name: "FID",
label: "ID",
// This field will not be shown in the table initially
visible: false
},
{
name: "NAME",
label: "School Name",
// The table will be sorted by this column
// in ascending order
direction: "asc"
},
{
name: "TOT_ENROLL",
label: "Enrollment"
},
...
],
container: "tableDiv"
});
已知限制
有关限制的完整列表,请参阅微件的 参考手册 文档。
Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.