Updating a Feature Table on Feature Layer Change

2773
1
05-20-2016 07:56 AM
NMWater
New Contributor III

Hi all,

I've using the example of Feature Table from ESRI. However, I'm trying to update the table based on the feature layer that is visible. I'm trying to create a variable that is showing the visible layer and link that variable to the feature table. What is the property to get the current layer being displayed? Would I also have to create a table for each layer? All my layers have the same field names.

Many Thanks for all your help!!

Francisco

var layer = function changetable () {
     if (CNTYmm.visible || HUC8mm.visible || WPRmm.visible)
          {get actual layer being displayed}
     else (CNTYin.visible || HUC8in.visible || WPRin.visible)
               {get actual layer being displayed}};


my FeatureTable = new FeatureTable({
     "featureLayer": layer,
     "outFields": ["NAME", "Units"],
     "map" : map}, 'TestTable');

myFeatureTable.startup();
0 Kudos
1 Reply
ChristopherJohnson1
Occasional Contributor II

Francisco, any update on this?

Thanks...Chris

0 Kudos