matthew.f.tenold

Target must be an event emitter

Discussion created by matthew.f.tenold on Apr 15, 2014
Latest reply on Apr 16, 2014 by matthew.f.tenold
I am currently using the Dojo/on and I keep receiving the Error: Target must be an event emitter
http://js.arcgis.com/3.9/
Line 212

error in this function:

function runQuery() {
   var queryTask = new esri.tasks.QueryTask("http://gis.phila.gov/ArcGIS/rest/services/PhilaGov/Police_Incidents_Last30/MapServer/0");
   
   var query = new esri.tasks.Query();
   query.returnGeometry = true;
   query.where = '1=1';
   query.outFields = ["DC_DIST", "POINT_X", "POINT_Y"];
   
   map.on(queryTask, "onComplete", function(featureSet) {

    var cL = new clusterlayerNew({
     displayOnPan: false,
     map: map,
     features: featureSet.features,
     infoWindow: {
      template: new esri.InfoTemplate("${SECTOR}"),
      width: 325,
      height: 100
     },
     flareLimit: 15,
     flareDistanceFromCenter: 20
       });

             map.addLayer(cL);

   });
  };

Outcomes