E4FD cmv-widgets/widgets/ExportGraphics/README.md at master · tmcgee/cmv-widgets · GitHub
[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 1.73 KB

File metadata and controls

58 lines (45 loc) · 1.73 KB

Export Graphics Widget for CMV

The Export Graphics widget works with the Export widget to allow the user to export graphic features from one or more Graphic or Feature layers.


Configurable Options

Parameter Type Description
layerIds Array Default includes the layer IDs used by the CMV Draw widget and the Advanced Draw widget contributed by isiland.
includeMapGraphics Boolean IF you want to include graphics added to the map, not a specific layer. Default is false.
exportOptions Object Options to pass to the Export widget. Default is {}

Example Configuration:

exportGraphics: {
    include: true,
    id: 'exportGraphics',
    type: 'domNode',
    srcNodeRef: 'exportGraphicsDijit',
    path: 'widgets/ExportGraphics',
    options: {
        map: true,

        exportOptions: {
            excel: false,
            xlsExcel: false,
            csv: false,

            shapefile: true,
            kml: true,
            kmz: true,
            geojson: false,
            topojson: false,
            wkt: false,

            defaultExportType: 'shapefile',
            // this option can be a string or a function that returns
            // a string.
            //
            // filename: 'my_results'
            filename: function () {
                var date = new Date();
                return 'export_graphics_' + date.toLocaleDateString();
            }
        }

    }
}

Screenshot:

Screenshot

0