Skip to content

Fix #10233 Add support for HTML response for WFS layer#10234

Merged
tdipisa merged 2 commits intogeosolutions-it:masterfrom
allyoucanmap:issue_10233
Apr 29, 2024
Merged

Fix #10233 Add support for HTML response for WFS layer#10234
tdipisa merged 2 commits intogeosolutions-it:masterfrom
allyoucanmap:issue_10233

Conversation

@allyoucanmap
Copy link
Copy Markdown
Contributor

Description

This PR includes the possibility to use HTML get feature info for WFS when available as output format

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Minor changes to existing features

Issue

What is the current behavior?

#10233

What is the new behavior?

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • No

Other useful information

@offtherailz
Copy link
Copy Markdown
Member

offtherailz commented Apr 23, 2024

Not sure if related to these changes, but I noticed that sometimes the selector of the layer, when no-layer is selected in the toc, fails.
Here a video that shows it :

screencast-bpconcjcammlapcogcnnelfmaeghhagj-2024.04.23-11_53_34.webm

Noticed that at the end of the video the selector is empty

Copy link
Copy Markdown
Member

@offtherailz offtherailz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only a few suggestion for improvements in doc / code,
Generally speaking looks good, just let's check that the issue I reported is not related with this changes.
In case let's open a separate issue.

getIdentifyFlow: (layer = {}, baseURL, defaultParams) => {
const { point, features, ...baseParams } = defaultParams || {};
if (features) {
if (baseURL && baseURL !== 'client') {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that client has a particular reserved meaing, I'd extract it in a constant and proper document it, so it is clear what is the scope.

const buildRequest = (layer, { map = {}, point, currentLocale, params, maxItems = 10 } = {}, infoFormat, viewer, featureInfo) => {
if (point?.intersectedFeatures) {
const { features = [] } = point?.intersectedFeatures?.find(({ id }) => id === layer.id) || {};
const isHTMLOutput = infoFormat === 'text/html';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should use isRemote as a flag, to identify the supported formats for remote request.

@tdipisa tdipisa merged commit 4cc481f into geosolutions-it:master Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for HTML response for WFS layer

3 participants