How to zoom to the extent of a query result

المشرف العام

Administrator
طاقم الإدارة
Does anyone know how to change the extent on the map in function of a query? in legende I have no problem using the function showResults (featureSet) {...but, can not get any display in AMD. Here I put a piece of script that I want to switch from legend to AMD:

function showResults(featureSet) { //remove all graphics on the maps graphics layer map.graphics.clear(); //QueryTask returns a featureSet. Loop through features in the featureSet and add them to the map. //Performance enhancer - assign featureSet array to a single variable. var resultFeatures = featureSet.features; var extent; for (var i=0, il = resultFeatures.length; i
 
أعلى