Skip to content

Commit d8a75b9

Browse files
committed
Updated documentation for Export widget.
1 parent f1508db commit d8a75b9

File tree

4 files changed

+61
-14
lines changed

4 files changed

+61
-14
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Coming Soon
5151

5252
---
5353
### Export
54-
Export features from the [Attributes Tables](https://github.com/tmcgee/cmv-widgets#attributes-tables) widget or other widgets that have a [dgrid](http://dgrid.io).
54+
Export features from the [Attributes Tables](https://github.com/tmcgee/cmv-widgets#attributes-tables) widget or other widgets that have a [dgrid](http://dgrid.io). Features can be exported in tabular and spatial formats.
5555
##### [Documentation](https://github.com/tmcgee/cmv-widgets/tree/master/widgets/Export/README.md)
5656
##### [Demo](http://tmcgee.github.io/cmv-widgets/demo.html?config=table)
5757
![Screenshot](https://tmcgee.github.io/cmv-widgets/images/export1.jpg)

images/export1.jpg

-8.47 KB
Loading

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ <h2 id="editor">Editor</h2>
9696
<div class="row">
9797
<div class="col-md-8 col-md-offset-2">
9898
<h2 id="export">Export</h2>
99-
<p>Export features from the Attribute Table widget or other widgets that have a <a href="http://dgrid.io">dgrid</a>.</p>
99+
<p>Export features from the Attribute Table widget or other widgets that have a <a href="http://dgrid.io">dgrid</a>. Features can be exported in tabular and spatial formats.</p>
100100
<p>
101101
<a href="demo.html?config=table" target="cmv-demo-table" class="btn btn-primary btn-lg">Demo</a>
102102
</p>

widgets/Export/README.md

+59-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
1-
#Export Widget for CMV
2-
1. Export attributes from the [Attribute Table](https://github.com/tmcgee/cmv-widgets#attributes-tables) widget or other widgets that have a [dgrid](http://dgrid.io). Formats supported: Excel (xlsx and xls) and Comma-Separated-Values (csv).
1+
# Export Widget for CMV
2+
1. Export attributes in tabular formats from the [Attributes Table](https://github.com/tmcgee/cmv-widgets#attributes-tables) widget or other widgets that have a [dgrid](http://dgrid.io). Formats supported:
3+
* Excel (xlsx and xls)
4+
* Comma-Separated-Values (csv)
35

4-
2. Export features in spatial formats. Formats supported: GeoJSON, KML, Well-Known Text (wkt) and Esri Shape files. Examples of exported features:
6+
2. Export features in spatial formats. Formats supported:
7+
* Esri Shapefiles
8+
* KML
9+
* KMZ
10+
* GeoJSON
11+
* TopoJSON
12+
* Well-Known Text (wkt)
513

6-
- An Identified Feature
7-
- Features from a Feature layer on the map
8-
- Graphics from a Graphics layer on the map
9-
- Drawn Graphic Shapes from a Draw widget
10-
- Features return from a QueryTask or FindTask of a Map Service
11-
- A FeatureSet returned from a Geoprocessing Task
14+
3. Examples of exported features:
15+
* Features from the [Attributes Table](https://github.com/tmcgee/cmv-widgets#attributes-tables) widget
16+
* An Identified Feature
17+
* Features from a Feature layer on the map
18+
* Graphics from a Graphics layer on the map
19+
* Drawn Graphic Shapes from a Draw widget
20+
* Features return from a QueryTask or FindTask of a Map Service
21+
* A FeatureSet returned from a Geoprocessing Task
1222

1323
All geometries exported to GeoJSON or KML are projected to Lat/Lng using Spatial Reference 4326. When exporting to Well-Known Text or Esri Shapefile, an output Spatial Reference WKID can be provided and the geometries are projected to the selected Spatial Reference.
1424

@@ -19,6 +29,21 @@ NOTE: Downloading the export file when using Internet Explorer 9 or older is not
1929
| Parameter | Type | Description |
2030
| :----: | :--: | ----------- |
2131
| `topicID` | String | Default is `exportDialog` |
32+
| `excel` | Boolean | Allow attributes to be exported to Excel. Default is true |
33+
| `xlsExcel` | Boolean | Allow attributes to be exported to Excel (XLS format)Default is false |
34+
| `csv` | Boolean | Allow attributes to be exported to CSV. Default is true |
35+
| `shapefile` | Boolean | Allow attributes to be exported to a Shapefile. Default is false |
36+
| `kml` | Boolean | Allow attributes to be exported to KML. Default is false |
37+
| `kmz` | Boolean | Allow attributes to be exported to KMZ. Default is false |
38+
| `geojson` | Boolean | Allow attributes to be exported to GeoJSON. Default is false |
39+
| `topjson` | Boolean | Allow attributes to be exported to TopoJSON. Default is false |
40+
| `wkt` | Boolean | Allow attributes to be exported to Well-Known Text. Default is false |
41+
| `filename` | String | Name of file for export. Default is `results` |
42+
| `defaultExportType` | String | The default type of export. Default is 'excel' |
43+
| `shapefileOptions` | Object | Options for Shapefile format. |
44+
| `kmlOptions` | Object | Options for KML format. |
45+
| `geojsonOptions` | Object | Options for GeoJSON format. |
46+
| `topojsonOptions` | Object | Options for TopJSON format. |
2247

2348
---
2449
## Example Configuration:
@@ -29,15 +54,37 @@ exportDialog: {
2954
type: 'floating',
3055
path: 'widgets/Export',
3156
title: 'Export',
32-
options: {}
57+
options: {
58+
excel: true,
59+
xlsExcel: false,
60+
csv: true,
61+
62+
shapefile: true,
63+
kml: true,
64+
kmz: true,
65+
geojson: true,
66+
topojson: true,
67+
wkt: true,
68+
69+
defaultExportType: 'shapefile',
70+
71+
// this option can be a string or a function that returns
72+
// a string.
73+
//
74+
// filename: 'my_results'
75+
filename: function () {
76+
var date = new Date();
77+
return 'export_results_' + date.toLocaleDateString();
78+
}
79+
}
3380
}
3481
```
3582

3683
## Screenshot:
3784
![Screenshot](https://tmcgee.github.io/cmv-widgets/images/export1.jpg)
3885

3986
---
40-
##Communicating with other widgets
87+
## Communicating with other widgets
4188
The Exports widget does not stand-alone. It is intended with to be used as a querying interface for an attributes table. Two other widgets are planned that can communicate with an attributes table:
4289

4390
1. Plug-in for layerControl widget
@@ -46,7 +93,7 @@ The Exports widget does not stand-alone. It is intended with to be used as a que
4693
Communication to/from another widget to an attributes table is via dojo's topic publish/subscribe model. The available topics are listed below.
4794

4895
---
49-
##Export Topics
96+
## Export Topics
5097

5198
### Subscribed Topics
5299
The Export widget subscribes to the following topics.

0 commit comments

Comments
 (0)