Home

Example: ArcGIS JavaScript API - Find Task

This sample demonstrates how you can display the results of a Find Task in a Dojo DataGrid control. This control is new at Dojo 1.2, and is therefore available starting with version 1.2 of the ArcGIS JavaScript API. The DataGrid allows users to sort and resize columns, and provides many events that you can handle. You can use these events to tie the grid to the map. In this sample, when the user clicks a row, the map zooms to the associated tax lot. The FindTask returns an array of results. Each result contains attributes that can be pushed to an array and associated with a Dojo ItemFileReadStore. The ItemFileReadStore is a valid type of data store for the DataGrid and is appropriate for displaying task results from the ArcGIS JavaScript API. You can find a variety of other interesting data store types in dojo.data and dojox.data. The logic that zooms the map to the clicked row is in the onRowClickHandler function. The tax lot ID is retrieved from the clicked row, and then existing graphics are searched for that tax lot ID. When the graphic with the correct tax lot ID is found, the map is set to the extent of that graphic.

Owner name:
Parcel ID Owner 1 Owner 2 Year Built Address City