Skip to content

Commit

Permalink
Ensure bufferResults honors filtered results
Browse files Browse the repository at this point in the history
  • Loading branch information
theduckylittle committed Nov 7, 2024
1 parent ac49b47 commit 88fc8fa
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/gm3/actions/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { vectorFeatureQuery } from "../query/vector";
import { wfsGetFeatureQuery } from "../query/wfs";
import { wmsGetFeatureInfoQuery } from "../query/wms";
import { getMapSourceName } from "../util";
import { getQueryResults } from "../selectors/query";

import {
changeTool,
Expand Down Expand Up @@ -152,13 +153,14 @@ export const bufferResults = createAsyncThunk(
"query/buffer-results",
(arg, { getState, dispatch }) => {
const state = getState();
const query = state.query;
const results = getQueryResults(state);
console.log("RESULTS=", results);

// flatten the query results down to just a
// list of features
let features = [];
for (const path in query.results) {
features = features.concat(query.results[path]);
for (const path in results) {
features = features.concat(results[path]);
}

if (features.length > 0) {
Expand Down

0 comments on commit 88fc8fa

Please sign in to comment.