I have a javascript application that including FeatureLayers, TiledLayer, DynamicLayer. I wanna when click a feature layer, clicked object attributes should list in a dom element.
createMap: function() {
var self = this;
self.map = new Map("map", { id: "myMap", logo: false });
self.setMapEvents(self.map);
if (self.options.mapLayers && self.options.mapLayers.length) {
for (var i = 0; i < self.options.mapLayers.length; i++) {
var layer = self.options.mapLayers[i].layerObject;
var index = self.options.mapLayers[i].index;
self.map.addLayer(layer, index);
}
}
}
This function adds layers in current map.
FeatureLayer object has not a click or mouseDown event to handle clicked layer attributes. (Silverlight API has events)
self.options.mapLayers
has a ArcgisTiledDynamicLayer and 3 FeatureLayer. How can I add events (or another way) to handle clicked FeatureLayer attributes?