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.

686
0
02-03-2017 01:44 AM
NeilMitchell
New Contributor

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?

0 Kudos
0 Replies