swatikch

Identify fails: 'geometry' parameter not specified

Discussion created by swatikch on Dec 27, 2011
Latest reply on Feb 23, 2012 by nschmidt
I have tried different combinations for setting IdentifyParameters. However, IdentifyTask fails to execute with the following error:

             An unexpected error occurred processing the request.
             'geometry' parameter not specified


I set the parameters & execute as follows:

              // Points I get when I tap on the screen
              x = -1.0824859656508524E7;
              y = 3773086.8979116157;

              Point tapPoint = new Point(x, y);
              Envelope envelope = new Envelope();
              mapView.getExtent().queryEnvelope(envelope);

              IdentifyParameters params = new IdentifyParameters();
              params.setMapExtent(envelope);
              params.setTolerance(5);
              params.setMapHeight(mapView.getHeight());
              params.setMapWidth(mapView.getWidth());
              params.setLayerMode(IdentifyParameters.VISIBLE_LAYERS);
              params.setDPI((int) mapView.getResolution());
              params.setGeometry(tapPoint);

              IdentifyTask identifyTask = new IdentifyTask("http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
              IdentifyResult[] identifyResults = identifyTask.execute(params);

Is there anyone who came across a similar situation? If so, can you please tell me where I am going wrong here?

Outcomes