AnsweredAssumed Answered

Zoom into Point using the Find Task

Question asked by rachellinonis on May 15, 2012
Latest reply on May 23, 2012 by crackernutter
Hello everyone,

I know that there is a few threads on this topic, but I'm still having some difficulty. In the FindTask sample, I want that same search-n-zoom functionality... but instead of zooming into a polygon, I want to zoom into a point. I've added my layer and the search function works fine .. However, the code seems to break in the onRowClickHandler function, because there's no zoomage to the clicked point.

Any ideas as to what I should change in the onRowClickHandler function? (Yes, I left the variables the same...):

            function onRowClickHandler(evt) {                  var clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID;                  var selectedTaxLot;                  dojo.forEach(, function(graphic) {                      if((graphic.attributes) && graphic.attributes.OBJECTID === clickedTaxLotId) {                         selectedTaxLot = graphic;                          return;                      }                  });                 var taxLotExtent = selectedTaxLot.geometry.getExtent();                                    map.setExtent(taxLotExtent);              }

Let me know if you need to see more code.

Thanks everyone,