|
POST
|
Thanks again....I pasted your Function into my code although not seeing the width adjustment... I changed the field name to GENUS as I have a field named GENUS....as can be seen from the old grid code below. I changed the table width and then added the else in the if statement.... Please see image attached.....nothing really happening... BUT when I use your 3000px table width I do see some width in the cell....confused... Shouldn't the max size be 600, all fields except GENUS be 25px and GENUS be 200px domConstruct.empty("info"); var table = domConstruct.toDom('<table style="width:600px"></table>'); domConstruct.place(table, "info"); var resultItems = []; var resultCount = results.features.length; var tableHeaderRow, tableHeader, tableRow, tableCol, tableBody, col, tableHead; for (var i = 0; i < resultCount; i++) { if(i === 0){ col = domConstruct.create("col") tableHeaderRow = domConstruct.create("tr"); tableBody = domConstruct.create("tbody"); tableHead = domConstruct.create("thead"); domConstruct.place(tableHeaderRow, tableHead); } tableRow = domConstruct.create("tr"); domConstruct.place(tableRow, tableBody); var featureAttributes = results.features.attributes; for (var attr in featureAttributes) { if(i === 0){ tableHeader = domConstruct.toDom('<th>' + attr + '</th>'); domConstruct.place(tableHeader, tableHeaderRow); col = domConstruct.create("col") if(attr === 'GENUS'){ domStyle.set(col, 'width', '200px'); } else{ domStyle.set(col, 'width', '25px'); } domConstruct.place(col, table);
... View more
10-19-2015
06:20 PM
|
0
|
1
|
1904
|
|
POST
|
are you referring to putting that JS switch or If Statement in the Function?
... View more
10-19-2015
04:01 PM
|
0
|
3
|
1904
|
|
POST
|
thanks....for question three....do I use an index number or something? Thanks Again...cheers
... View more
10-19-2015
09:32 AM
|
0
|
5
|
1904
|
|
POST
|
Last three questions.....more for the understanding of where or not its possible....any thoughts would be appreciated....what ever you can help with I would be appreciative but understand either way... Can I select a record and have it highlight its feature in the map? Is there the ability to sort? Can I specify the widths of each field? THANK you for your help...its greatly appreciated.
... View more
10-19-2015
09:12 AM
|
0
|
7
|
3718
|
|
POST
|
Alright I added the below and I was able to return results....but the formatting is all crazy....I assume that I can modify this with CSS? var query3 = new Query(); query3.geometry = bufferGeometry; // Select the Points within the Buffer and show them featureLayerVAFWIS.selectFeatures(query3, FeatureLayer.SELECTION_NEW, function(results){ }); // Query for the records with the given object IDs and populate the grid featureLayerVAFWIS.queryFeatures(query3, function (featureSet) { updateGrid3(featureSet); showResults(featureSet); });
... View more
10-19-2015
08:44 AM
|
0
|
1
|
3718
|
|
POST
|
Thanks for your reply Robert,...very much appreciated....but having issues because I think I am going about this slightly different AS you can see from my code (attached) I am grabbing results from a Buffer Geometry.....then was sending those to a grid....little bit different from your example... I hang up on your code here: var featureAttributes = results.features.attributes; Is there a way to bring in this array or json string into your code? In my txt file attached I am trying to get the json object in....if I use the array "Data" it shows results but not formatted in any fashion. thoughts? really confused.
... View more
10-19-2015
08:03 AM
|
0
|
11
|
3718
|
|
POST
|
think I got something....I was using the JSON string instead of the original array string "data" I changed to that and I am not getting a result... added this before the For Loop var arr = (data);
... View more
10-18-2015
09:47 AM
|
0
|
0
|
3718
|
|
POST
|
I took the array variable "data" and tried to get it into a table as seen below. I get the correct number of rows returning but NO data....just "undefined" Any thoughts as to why? HTML <div id="id01"></div> JAVASCRIPT var i; var out = "<table>"; for(i = 0; i < data.length; i++) { out += "<tr><td >" + arr.OBJECTID + "</td><td>" + arr.ObsID + "</td><td>" + arr.SppBova + "</td><td>" + arr.COMMON_NAME + "</td><td>" + arr.GENUS + "</td><td>" + arr.SPECIES + "</td><td>" + arr.Tier + "</td><td>" + arr.FedStatus + "</td><td>" + arr.TaxaGrp + "</td></tr>"; } out += "</table>"; document.getElementById("id01").innerHTML = out;
... View more
10-18-2015
09:42 AM
|
0
|
1
|
3718
|
|
POST
|
I can convert the results to json which I think is easier to then display in html but have yet to find a dynamic way to represent the data in html function updateGrid3(featureSet) { var data = arrayUtils.map(featureSet.features, function (entry, i) { return { id: entry.attributes.OBJECTID, ObsID: entry.attributes.ObsID, SppBova: entry.attributes.SppBova, COMMON_NAME: entry.attributes.COMMON_NAME, GENUS: entry.attributes.GENUS, SPECIES: entry.attributes.SPECIES, Tier: entry.attributes.Tier, FedStatus: entry.attributes.FedStatus, TaxaGrp: entry.attributes.TaxaGrp, }; }); // If you use a store... dataStore = new Memory({ "data": data, "idProperty": "id" }); var myJsonString = JSON.stringify(data); var json_obj = JSON.parse(myJsonString); alert(JSON.stringify(json_obj));
... View more
10-17-2015
07:08 PM
|
0
|
2
|
3718
|
|
POST
|
I am using a dgrid to reurn my results from a query. I am looking for a solution to do this in strictly HTML and cant find a solution. Does anyone have a very basic example. This is what I am doing right now. <div data-dojo-type="dijit/layout/ContentPane" id="ScrollGridContainer" title="Scroll Grids"> <div class="gridclassheader">Unique Species Observations:</div> <div id=text style="font-size:small; line-height: 40%; text-align:center; padding:0px;">.</div> <div id="gridNoColumnSets55" class="gridclassGrid"></div> </div> I ATTACHED the JavaScript as it was not formatting correctly when I tried to put in the post.... Just looking for an easy way to grab the result of the query and use HTML to format the returned results in my app. I am using printThis to allow the user to print the results of the query and map but the dgrid does not hold up...which is why I am trying to return the results to html which I can then format via CSS...... Can anyone help?
... View more
10-17-2015
11:28 AM
|
0
|
16
|
7994
|
|
POST
|
I have an app and I am querying from Geometry of a circle. I am returning the results of this query to Grid (dojo). But i have noticed that these results and grids do not play well with reporting. I do know that formatting via HTML play much better with a reporting function. 1. Are there any examples out there that show a query and return results formatted via HTML? 2. Or are there any examples out there that take the returned results that are populating a Grid and converting to HTML to place in a report?
... View more
04-24-2015
12:45 PM
|
0
|
0
|
2655
|
|
POST
|
Jayanta...thanks The big question is would this work with overlapping polygons?
... View more
03-26-2015
06:21 AM
|
0
|
0
|
2147
|
|
POST
|
I ran that and its not really what I was going for.... The raster data has a bunch of different land cover types. I was hoping for an output for each polygon with percentages for each of the land cover types ....or total counts of Raster cells for each type I can then calculate % of each type. Polygon Land Cover type 1 12% Land Cover type 2 22% Land Cover type 3 15% Land Cover type 4 32%
... View more
03-25-2015
02:11 PM
|
0
|
1
|
2147
|
|
POST
|
I have a polygon layer with a bunch of polygons. I have a raster Land Cover with a bunch of land cover types. I want to process the data and come up with statistics of how much of each land cover type is in each of the polygons. No idea where to start. Is there a tool that can help? Hope I explained well enough. Thanks
... View more
03-25-2015
01:55 PM
|
0
|
7
|
5648
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|