Skip to content

Commit

Permalink
πŸ› Download layer features from search with pagination (#743) (#744)
Browse files Browse the repository at this point in the history
* πŸ› Download layer features from search

* jsdoc

* jsdoc

---------

Co-authored-by: Raruto <[email protected]>
(cherry picked from commit 4315210)

Co-authored-by: Francesco Boccacci <[email protected]>
  • Loading branch information
github-actions[bot] and volterra79 authored Feb 25, 2025
1 parent f93e592 commit b1b9fdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/components/QueryResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
this.$options.service.printAtlas(layer);
},
showLayerDownloadFormats(layer) {
this.$options.service.showLayerDownloadFormats(layer)
this.$options.service.showLayerDownloadFormats(layer);
},
saveLayerResult(layer, type = "csv") {
this.$options.service.downloadFeatures(type, layer, layer.features);
Expand Down
7 changes: 4 additions & 3 deletions src/services/queryresults.js
Original file line number Diff line number Diff line change
Expand Up @@ -1605,9 +1605,10 @@ export default new (class QueryResultsService extends G3WObject {
}

const { query = {} } = this.state;
const data = {
fids: features.map(f => f.attributes[G3W_FID]).join(',')
};

const data = 'search' === query.type
? { field: query.search.join() } // search results + pagination (see: https://github.com/g3w-suite/g3w-client/pull/743)
: { fids: features.map(f => f.attributes[G3W_FID]).join(',') }; // other query types ('point', 'polygon', 'bbox' ..)

//In the case of pdf type need to add html element
if ('pdf' === type) {
Expand Down

0 comments on commit b1b9fdb

Please sign in to comment.