AnsweredAssumed Answered

Is it possible to pass polygon to query.geometry

Question asked by veena@hosur on Jan 31, 2016
Latest reply on Feb 2, 2016 by veena@hosur


i am trying to highlight polygon and corresponding i am trying to do some thing like:


var queryTask = new QueryTask("http://myserver/arcgisserver/rest/services/CRD/CRD2/MapServer/0");

  var query = new Query();

  query.geometry = event.mapPoint; //your district polygon geometry

  query.outFields = ["*"];

  query.returnGeometry = true;

  //Execute task

  queryTask.execute(query, showResults);

function showResults (results) {

          var resultItems = [];

         var resultCount = results.features.length;

          for (var i = 0; i < resultCount; i++) {

            var featureAttributes = results.features[i].attributes;


is it possible to pass polygon to   query.geometry.if so how to do