diff --git a/src/ExportGeoJSON.js b/src/ExportGeoJSON.js index 7f317c04..c1f2ca12 100644 --- a/src/ExportGeoJSON.js +++ b/src/ExportGeoJSON.js @@ -16,9 +16,11 @@ class ExportGeoJSON { } finish (list) { - list = { - type: 'FeatureCollection', - features: list + if (!this.conf.singleFeature) { + list = { + type: 'FeatureCollection', + features: list + } } return { diff --git a/src/exportAll.js b/src/exportAll.js index f9d7d36a..127983fe 100644 --- a/src/exportAll.js +++ b/src/exportAll.js @@ -137,6 +137,9 @@ module.exports = (data, div) => { submit.style.display = 'none' let conf = formExport.get_data() + + conf.singleFeature = true + createDownload(conf, [ data ], (err) => { if (err) { alert(err)