Skip to content

feat: export selection (GeoJSON, CSV, Excel) issue 49#50

Open
henkeberggren wants to merge 1 commit into
origo-map:mainfrom
notnotse:feat/export-and-build
Open

feat: export selection (GeoJSON, CSV, Excel) issue 49#50
henkeberggren wants to merge 1 commit into
origo-map:mainfrom
notnotse:feat/export-and-build

Conversation

@henkeberggren

Copy link
Copy Markdown

Summary

  • Add export functionality to multiselect with a dedicated export modal (hidden by default for backward compatibility via showExportButton: false unless explicitly enabled).
  • Support multiple export formats and configuration:
  • GeoJSON
  • CSV (optional WKT geometry column)
  • Excel (attributes only, no WKT)
  • Configurable allowed formats via exportFormats (defaults to all).
  • Add property-selection UI in the export modal so users can choose which attributes to include in exports.
  • Add configurable export filename base via exportFilename (extension added per format and filename sanitized).
  • Add Excel export using xlsx and update bundling/import usage for the new dependency.
  • Add modal-related styling updates (button classes and scrollable property list for large attribute sets).

Backward compatibility

  • Export UI is opt-in (showExportButton defaults to disabled).
  • Existing multiselect behavior remains unchanged unless export is enabled.

Configuration examples

  • Enable export button:
    • showExportButton: true
  • Restrict formats:
    • exportFormats: ['geojson', 'csv']
  • Default filename base:
    • exportFilename: 'my-selection'
  • CSV WKT default:
    • csvIncludeWkt: true

@asemoller

Copy link
Copy Markdown

This looks interesting.

I haven’t tested this yet, so I might be missing something obvious, but at a glance it seems somewhat similar to existing functionality in Origo. How does this differ?

Also, with this we would have multiple ways to export (since there are already several in Origo). Has that been considered from a user perspective, as it could potentially be confusing?

And was the existing functionality considered and a different approach chosen on purpose?

I might be completely off here since I haven’t tested this yet, I'm just curious to understand your reasoning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants