Skip to main content

How do I retrieve a Feature for a given esri.Graphic in html5 viewer 2.6.1

Comments

1 comment

  • Permanently deleted user
    This is the best way I've found for getting the clicked on feature (this is how the Map Tips dialog works):

     

      this.app.command("ShowMapTipResults").register(this, this.onShowMapTipResults); onShowMapTipResults(mapTipId: string): void {       this.app.waitUntilViewInitialized("MapTipView").then(event => {               var collection = this.app.featureSetManager.getCollectionById(mapTipId);               var feature = null;               if (collection.featureSets.length() > 0) {                     if (collection.featureSets.getAt(0).features.length() > 0) {                         feature = collection.featureSets.getAt(0).features.getAt(0);                     }                 }           }      })          }

     

     
    0

Please sign in to leave a comment.