var query = new esri.tasks.Query(); query.where= "OBJECTID = " + clickedStatesID featureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
//This function creates the Data table at the bottom of the page storing all the projects function createDataTable(){ var data = { identifier: 'id', items: [] }; //Create the store object to populate the table var rows=nProj; for (var i=0; i < rows; i++){ data.items.push(dojo.mixin({ id:i+1 }, projectTable)); } var store = new dojo.data.ItemFileWriteStore({data:data}); //Define layout var layout = [[ {'name':'Project ID','field':'projID', 'width':'100px'}, {'name':'Title','field':'Title', 'width':'500px'}, {'name':'Provider','field':'Provider', 'width':'100px'}, {'name':'Seeker','field':'Seeker', 'width':'100px'}, {'name':'Topic','field':'Topic', 'width':'200px'}, {'name':'Sub Topic','field':'SubTopic', 'width':'300px'}, ]]; var grid = new dojox.grid.DataGrid({ id:'grid', store:store, structure:layout, rowSelector:'20px'}, document.createElement('div') ); dojo.byId("projectInformation").appendChild(grid.domNode); grid.startup(); //Event handlers below are used to visualize projects. A single click maps a single connection, a double click maps and entire project dojo.connect(grid, "onRowClick", grid, function(evt){ var idx = evt.rowIndex, item = this.getItem(idx); var defn = "Provider='" + item.Provider + "' AND Seeker='" + item.Seeker + "' AND ProjectID='" + item.projID + "'"; mapLines(defn); }); dojo.connect(grid, "onRowDblClick", grid, function(evt){ var idx = evt.rowIndex, item = this.getItem(idx); var defn = "ProjectID='" + item.projID + "'"; mapLines(defn); }); }
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.