Double click event not working for HeatMap Feature Layer

135
0
11-02-2019 07:36 PM
Naveen_KumarKairamkonda
Occasional Contributor

Hi,

I am trying to attach "onDblClick" event to feature layer for generating heat map. At the same time "onLoad" event is working fine,Plz find below code.

this.featHLayer.on('load', lang.hitch(this,function(){
var query = new Query();
query.where = defExpH;
this.featHLayer.queryExtent(query,lang.hitch(this,function(result){
this.map.setExtent(result.extent);
}));}));


this.eventListner = connect.connect(this.featHLayer, "onDblClick", lang.hitch(this,function(evt) {
this.contextDistName = evt.graphic.attributes[this.config.HeatMap.DistrictFldName];
this._getFarmerResults(evt)
}));

this.featHLayer = new FeatureLayer(this.config.HeatMap.District.url,{
mode: FeatureLayer.MODE_SNAPSHOT,
definitionExpression:defExpH,
infoTemplate:infoTemplate,
outFields:["*"]
});
this.map.addLayer(this.featHLayer);
this.featHLayer.setRenderer(heatmapRenderer);

I am using this code in a widget for WAB 2.13. Kindly help!!

0 Kudos
0 Replies