Skip to content

Commit

Permalink
Make QGIS layers send back the feature's geometry in respons to GetFe…
Browse files Browse the repository at this point in the history
…atureInfo, closes #879.
  • Loading branch information
jacobwod committed Oct 19, 2021
1 parent 3d7b161 commit 55a9f2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions new-client/src/models/Click.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ function query(map, layer, evt) {
// See #852. Without this, it's almost impossible to get a result from QGIS Server.
// TODO: This could be expanded and made an admin setting - I'm not sure that 50 px
// will work for everyone.
// The WITH_GEOMETRY is necessary to make QGIS Server send back the feature's geometry
// in the response.
// See: https://docs.qgis.org/3.16/en/docs/server_manual/services.html#wms-withgeometry.
if (layer.getSource().serverType_ === "qgis") {
params = {
...params,
FI_POINT_TOLERANCE: 50,
FI_LINE_TOLERANCE: 50,
FI_POLYGON_TOLERANCE: 50,
WITH_GEOMETRY: true,
};
}

Expand Down

0 comments on commit 55a9f2b

Please sign in to comment.