Urgent - Using Dojo DataGrid with ArcGIS JavaScript Extension for Google Maps

Discussion created by salopez on Jun 1, 2010
Latest reply on Jun 2, 2010 by apfister-esristaff
I am attempting to implement the dojo datagrid using the find task thorugh the ArcGIS JavaScript Extension for Google Maps.  I have successfully created a map using the Javascript API that zooms to a point when you click on a row in the datagrid, but am having difficulty making this work within the Google Maps framework.  I have posted my code, I know there are arrors, but I am having a hard time getting them worked out, even using Firebug to help me. 
Any help would be appreciated.  If you would like to see my successful implementation for the javascript api I can post that as well, just let me know.


<html debug=true>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Find Task:  Add each find result to map and to an html table</title>
     <link rel="stylesheet" type="text/css" href="">
    <link rel="stylesheet" type="text/css" href="">
    <link rel="stylesheet" type="text/css" href="">
    <script type="text/javascript">
      djConfig = {
    <script src="" type="text/javascript"></script>
    <script src="" type="text/javascript" ></script>
<script src="" type="text/javascript"></script>
    <script type="text/javascript">
   var gmap = null;
      var findTask = null;
      var params = null;
      var mapExtension = null;
      var gOverlays = [];

      function initialize() {
   dojo.connect(grid, "onRowClick", onRowClickHandler);
        // GMap construction
        gmap = new GMap2(document.getElementById('gmap'));
        gmap.addControl(new GLargeMapControl());
        gmap.addControl(new GMapTypeControl());
        gmap.setCenter(new GLatLng(42.75, -71.00), 11); // USA (Point)

        //Create MapExtension utility class
        mapExtension = new esri.arcgis.gmaps.MapExtension(gmap);

        // Find Task
        findTask = new esri.arcgis.gmaps.FindTask("");

        // You can execute a task and listen for the complete event or use the callback to get the results
        GEvent.addListener(findTask, "executecomplete", function() {
          //console.debug("'find task complete' event fired!!!");

        // Find Parameters
        params = new esri.arcgis.gmaps.FindParameters();
        params.layerIds = [0];
        params.searchFields = ["STREET","LOCATION"];

      function executeFind(searchText) {
        // clear map overlays and event listeners using MapExtension removeFromMap

        // set find parameters
        params.searchText = searchText;

        // execute find task
        findTask.execute(params, findCompleteCallback);


      function findCompleteCallback(results) {
   var items = []; //all items to be stored in data store
        for (var i=0, il=results.findResults.length; i<il; i++) {
          items.push(results.findResult[i].feature.attributes);  //append each attribute list as item in store  
    var findResult = results.findResults[i];
        //Create data object to be used in store
        var data = {
          identifier: "STATNUM",  //This field needs to have unique values
          label: "STATNUM", //Name field for display. Not pertinent to a grid but may be used elsewhere.
          items: items

         //Create data store and bind to grid.
        store = new{ data:data });
        grid.setQuery({ STATNUM: '*' });
   //Zoom to the parcel when the user clicks a row
      function onRowClickHandler(evt){
        var clickedTaxLotId = grid.getItem(evt.rowIndex).STATNUM;
        var selectedTaxLot;
        for (var i=0,; i<il; i++) {
          var currentGraphic =[i];
          if ((currentGraphic.attributes) && currentGraphic.attributes.STATNUM == clickedTaxLotId){
            selectedTaxLot = currentGraphic;



  <body onload="initialize();" onunload="GUnload();">
  <table width="100%" height="100%">
      <td align="center">

          <tr align="left">
              Search Street Name:  <input type="text" id="searchString" value="Main" size="10"/><input id="executeFind" type="button" value="Execute Find" onclick="executeFind(document.getElementById('searchString').value);" /> 

          <tr align="left" valign="top">
              <div id="gmap" style="width: 500px; height:500px;"></div>
          <tr align="left" valign="top">
        <table dojoType="dojox.grid.DataGrid" jsid="grid" id="grid" rowsPerPage="5" rowSelector="20px" style="height:300px; width:600px">
          <th field="STATNUM">Tax lot ID</th>
          <th field="TOWN">Town</th>
          <th field="STREET">Street</th>
          <th field="LOCATION">Location</th>