I seem to be getting an error at the :var taxLotExtent=selecedTaxLot.geometry.getExtent();at which point it informs me that the selected TaxLot is undefined.
function onRowClickHandler(evt){ var clickedTaxLotId = grid.getItem(evt.rowIndex).OBJECTID; var selectedTaxLot; for (var i=0, il=map.graphics.graphics.length; i<il; i++) { var currentGraphic = map.graphics.graphics; if ((currentGraphic.attributes) && currentGraphic.attributes.OBJECTID == clickedTaxLotId){ selectedTaxLot = currentGraphic; break; } } if(selectedTaxLot.length > 0) { var taxLotExtent = selectedTaxLot.geometry.getExtent(); map.setExtent(taxLotExtent, true); } else { alert("can't find a corresponding tax lot to select"); } }
If the user now wants to click and zoom to another datagrid record the Show Find Task is no longer active. How can I track the function mode so it will work all the time? Right now the user has to clear the grid and start over with the Find Task.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.