3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
254 stars 143 forks source link

unexpected behaviour with filter data with form and popup #1417

Closed saeri-ims closed 1 year ago

saeri-ims commented 4 years ago

What is the bug?

When clicking on features that have been subset with "filter with form" tool the popup does not show only the filtered features but keeps on showing all the records. Note data are points representing plants, in one location there are more plants sharing the same x and y

Steps to reproduce the issue

  1. The dataset is coming from postgres and represent point features. In lizmap tool I have set the layer so that can be filtered by species common names using "filter data with form".
  2. Click on 'Filter' in lizmap webclient
  3. Type a plant species common name
  4. Click on the main map to read the attribute table info from the pop-up
  5. The pop-up returns all the plant species names which have the same x,y location. Also those that have not been filtered if i keep at a broad scale. If i zoom in (very very close to the point) then it seems that the popup retrieve only the filtered records.

Expected behavior

The pop-up should only show the filtered plant species at any zoom level. If i do the same using the attribute table and i search for plant species name, filter the layer and then click on the map, the pop-up shows only the filtered features (at any zoom layer). Hence, i think there is a but with filter by form.

Screenshots and logs

plant_filter

plantspopup

Environment

rmarzocchi84 commented 4 years ago

We encountered the same problem. Maybe it is related to getfeatureinfo request which is different from getmap request?

nboisteault commented 4 years ago

@saeri-ims Is it fixed now with LWC 3.3.8 ?

rmarzocchi84 commented 4 years ago

@nboisteault I will install tomorrow LWC 3.3.8 and I will do some test for you

rmarzocchi84 commented 4 years ago

@nboisteault LWC 3.3.8 installed, but the problem it seems to be not fixed.. my colleague @robifag will add soon a GIF to show the problem. probably only the #1446 issue is solved, but we need to test it!

RobiFag commented 4 years ago

Hi @nboisteault, here a short gif to show the problem info_filter

nboisteault commented 4 years ago

@rmarzocchi84 @RobiFag Thanks. I'll take a look ASAP.

ygorigor commented 4 years ago

For the info: this issue is also present in LWC 3.4.

3liz-bot commented 4 years ago

This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎

nboisteault commented 3 years ago

We need to make a big refactoring of this tool so I change milestone to 4.

RobiFag commented 3 years ago

Hi @nboisteault so the filter tool requires a huge refactoring hence will also other issues related to this tool be designed for the 4.0 version? For instance https://github.com/3liz/lizmap-web-client/issues/1674

nboisteault commented 3 years ago

Hi @RobiFag probably but i don't know yet.

rmarzocchi84 commented 3 years ago

For #1674 the solution @RobiFag proposed in the #747 (modifying the filter.js) is close to solution and it is a big upgrade

nboisteault commented 1 year ago

OK I can reproduce the issue. The FILTERTOKEN parameter is not added to the getFeatureInfo request when filtering via the form filter. This issue does not occur when using the filter in the attribute table. Working on a fix.

nboisteault commented 1 year ago

@mdouchin When using filter in attribute table execution goes here and the layer get a filtertoken in its vendorParams which is then used for getFeatureInfo requests.

When filtering with the form filter the execution is stopped above. If I comment out here and here the bug is fixed.