Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raster GetFeatureInfo response does not show FeatureInfo #1090

Closed
jacobwod opened this issue May 25, 2022 · 0 comments
Closed

Raster GetFeatureInfo response does not show FeatureInfo #1090

jacobwod opened this issue May 25, 2022 · 0 comments
Assignees
Labels
bug module:client/core Core functionality (not a plugin)
Milestone

Comments

@jacobwod
Copy link
Member

Describe the bug
WMS can be configured to respond with a value that is calculated by the service and mapped accordingly to some specification. One common use case are heat maps, where each color corresponds to a numeric value.

When we configure such a layer and try to display it's value in infoclick, the result will be an empty FeatureInfo window.

The reason for this is that Hajk can't find out which infoclickDefinition should be used because the WMS response lacks feature ID. (It actually lacks the feature entirely.)
Skärmavbild 2022-05-25 kl  09 02 38

We still have a value though and we want to show it in FeatureInfo.

Proposed solution
Currently this method tries to find out the layer name:

#getLayerNameFromFeatureAndLayer = (feature, layer) => {
. This name is then used to grab the correct infoclick definition.

One way to solve it is to distingiush features where geometry is null and getId() returns undefined. This would indicate our special scenario. In this case we can try to just grab the first infoclick definition in current layer and try to use it.

Not a perfect solution but it could work.

Another solution
We might also implement some special case as described in this article: https://docs.geoserver.org/stable/en/user/tutorials/GetFeatureInfo/raster.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug module:client/core Core functionality (not a plugin)
Projects
None yet
Development

No branches or pull requests

1 participant