AnsweredAssumed Answered

Get Selected Layer

Question asked by jestanford on Jun 2, 2014
Latest reply on Jun 2, 2014 by jestanford
Hi,
In my JS app I am overriding the default infoWindow and populating it with a custom dijit using the following code:

on(this.map.infoWindow, 'SelectionChange', lang.hitch(this, function() {                 var g = this.map.infoWindow.getSelectedFeature();                 if (g) {                 var options = { graphic: g };                 var cit = new ClipboardInfoTemplate(options, domConstruct.create("div"));                 cit.startup();                  this.map.infoWindow.setContent(cit.domNode);                 }             }));


This is working really well.

My question is, how can I determine which dynamic map service layer the selected graphic belongs to? I'd like to make some customizations to the dijit based on the layer and display the layer name, just like in the default popup but I can't seem to hook into the layer. Seems like I'm overlooking something obvious.

Thanks for the help!
Jill

Outcomes