AnsweredAssumed Answered

executeWithQuery for AGSMutablePoint returns near by feature of Layers from didClickAtPoint.

Question asked by suppriya on Apr 7, 2016
Latest reply on Apr 28, 2016 by NFurness-esristaff



for two days i trying to fixed issue.


i am using AGSMutablePoint to get Asset present on visible Layers at Click point....

m_mapView.touchDelegate = self;

m_sketchLayer.geometry = [[[AGSMultipoint alloc] initWithSpatialReference:m_mapView.spatialReference] autorelease];


- (void) mapView:(AGSMapView*)m_mapView



        graphics:(NSDictionary*)graphics {


self.m_queryTask = [AGSQueryTask queryTaskWithURL:[NSURL URLWithString:CurrentLayerURL]];

self.m_queryTask.delegate = self;


AGSQuery *currentQuery = [AGSQuery query];

currentQuery.spatialRelationship = AGSSpatialRelationIntersect;   // i tried all spatialrelation option

currentQuery.outFields = [NSArray arrayWithObjects:@"*", nil];



AGSEnvelope *env = [AGSEnvelope envelopeWithXmin:mappoint.x  -10.0 ymin:mappoint.y -10.0 xmax:mappoint.x +10.0 ymax:mappoint.y +10.0 spatialReference:[AGSSpatialReference spatialReferenceWithWKID:dSpatialReference WKT:self.m_mapView.spatialReference.wkt]];

currentQuery.outSpatialReference = self.m_mapView.spatialReference;             


[self.m_queryTask executeWithQuery:currentQuery];



i wanted to get only features where i clicked....and not featured all around... as can be seen from image....

images show two graphics ... it had return me two result at different point but i had click on single point.....

Screen Shot 2016-04-08 at 1.21.55 AM.png


is there any way to reduce search criteria....


if no then when i display result with showCalloutAtPoint for both graphics it display only one last result (BL-0073)as seen from to display all graphics result (for 2nd line) that user can click on individual graphics result....