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

Allow differing layer projection when displaying search results from layers (option 1) #1534

Closed
MattiasSp opened this issue May 3, 2022 · 1 comment

Comments

@MattiasSp
Copy link
Contributor

Description
When using "option 1" of the search control config - i e when using a map layer to display feature info on search results - the projection of the named layer is not taken into account.

In the getFeature function a layer's default projection is used (no srsName parameter is specified) and it is never transformed, regardless of what projection has been specified in the layer configurations.

This becomes an issue when a layer has to use a different projection than the map projection, notably when using WFS layers from QGIS Server which only serves GeoJSON in EPSG:4326 (WGS84).

Proposed solution
If a layer's data projection differs from the map projection, transform the coordinates before returning the feature in the getFeature function.

Alternative solutions considered
...

Additional context
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants