1
2
3
4
5
6
7
8
9
10
11
12
13
Layer.fromPortalItem({
portalItem: {
// autocasts new PortalItem()id: "6aa49be79248400ebd28f1d0c6af3f9f"// loads a feature layer table from AGO portal item }
}).then(function(layer) {
layer.load().then(function() {
// Must first load the layer and then check if it's a tableif (layer.isTable) {
webmap.tables.add(layer); // add this table to the map's tables collection }
});
});
1
2
3
4
5
6
7
8
9
const tableList = new TableList({
// Two tables should display, the first one is stored within the webmap,//ie. Chicago public health statistics. The other is dynamically loaded//from the portal item, ie. Chicago Covid daily cases deaths and hospitalizations.map: webmap, // get access to the map which has the collection of tablesselectionEnabled: true,
listItemCreatedFunction: createActions,
container: document.createElement("div");
});