1

I would like to build a web map using ArcGIS JavaScript API containing 1 layer of polygons & 1+ layers of points (or lines) contained within said polygons. I want this to be enabled with some sort of exportable "report"-generation functionality, which can do the following:

  1. In exportable tabular format, show the points/lines contained within each polygon and their attributes, i.e. the result of a one-to-many spatial join between the polygons and points.
  2. Optional for the user, a table like in #1 but aggregated by some summary field of the points/lines (specified by the user via drop-downs menus or whatever), like the tabular part of a Dissolve operation in desktop ArcGIS, on some specific dissolve field. So for each polygon, they could read the total length of the lines it contains, etc.

The report table doesn't have to show up in the browser (though that would be quite desirable), but does have to be exportable to some common format like CSV or preferably Excel.

Does anyone know the best/quickest way to accomplish this?

I know just enough about JavaScript/HTML/the API to have ideas to pursue but not enough to really know which are the most viable.

Some ideas:

  • Reading table attribute values directly via a queryTask & printing them out (à la this ESRI sample), but in a more complex tabular format, e.g. dynamically filling a nice-looking HTML table with the attribute values, then exporting the table as CSV (which cursory Googling suggests might be possible in one way or another).
  • Making use of a dgrid at least for display, but somehow linked to the above table manipulations. I don't know much about dgrid. Then export this, which appears to be possible with the Exporter plug-in for Dojox EnhancedGrid.

Has anyone implemented this kind of reporting functionality via an ArcGIS JavaScript API web map?

Is there any easier way to do this or other possibilities?

Any warnings about the viability of the above?

I just want to scope out a smart method before striking out blindly.

closed as too broad by PolyGeo Mar 16 '18 at 8:23

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.