AnsweredAssumed Answered

Arcgis Api Javascript - This will sound such a simple question but I can't seem to restrict my search to the current shown extent of the map.

Question asked by neilmitchell on Feb 3, 2017

Arcgis Api Javascript - This will sound such a simple question but I can't seem to restrict my search to the current shown extent of the map.  Once the map is displayed and only the relevant area is shown by zooming in.

 

dojo.connect(featureLayer, "onUpdateEnd", function () {
var zoomExtent = esri.graphicsExtent(featureLayer.graphics);
map.setExtent(zoomExtent);
}); // now the zoom won't happen until map is updated

 

So I am now zoomed into the feature layer I want only results from within this to show.  I can't set the results to the feature layer as this doesn't contain the data for the searching (ie post codes, addresses)

 

Any clues?

Outcomes