Browse Source

exportAll/GeoJSON: when exporting single object, don't wrap in FeatureCollection

master
parent
commit
b6dedf92e3
  1. 8
      src/ExportGeoJSON.js
  2. 3
      src/exportAll.js

8
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 {

3
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)

Loading…
Cancel
Save