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

Add layer.params.default_fields array #1223

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

simon-leech
Copy link
Contributor

@simon-leech simon-leech commented Apr 24, 2024

This PR introduces the layer.params.default_fields[] option.
This is useful to add additional fields to the layer.params.fields that are not coming from the style (theme or labels).
This allows flexibility when working with bespoke plugins that required multiple feature fields to style on.


@simon-leech simon-leech self-assigned this Apr 24, 2024
@simon-leech simon-leech added the Feature New feature requests or changes to the behaviour or look of existing application features. label Apr 24, 2024
@simon-leech simon-leech marked this pull request as ready for review April 24, 2024 14:05
Copy link

sonarcloud bot commented Apr 24, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Member

@dbauszus-glx dbauszus-glx left a comment

Choose a reason for hiding this comment

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

layer.params.default_fields should also be added to mvt feature loads.

layer.params.default_fields must not be spread. otherwise crunch on undefined. the array is flattened anyways. without the spread the default_fields will work as an array or a single string assignment.

layer.params.default_fields must be defined first. Because the theme may add n fields to the array. The setSource method receives features as wkt and the location of the desired property may change with different themes if not defined first.

@dbauszus-glx dbauszus-glx merged commit 640777c into GEOLYTIX:main Apr 24, 2024
5 checks passed
@simon-leech simon-leech deleted the vector-default_fields branch July 8, 2024 18:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature requests or changes to the behaviour or look of existing application features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants