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

Attribute table #595

Closed
johanglimmer opened this issue Oct 5, 2020 · 2 comments
Closed

Attribute table #595

johanglimmer opened this issue Oct 5, 2020 · 2 comments
Assignees
Labels
new feature Request for adding/changing functionality
Milestone

Comments

@johanglimmer
Copy link

Describe the solution you'd like
It would be really nice to have an attribute table that displays a list of all features within a layer. Sorting the features based on fields would also be good. I guess that this type of tool already has been up for discussion since it's such a usual tool to have in a GIS-application?

@jacobwod jacobwod added the new feature Request for adding/changing functionality label Oct 6, 2020
@jacobwod jacobwod added this to the 3.x milestone Oct 6, 2020
@jacobwod
Copy link
Member

jacobwod commented Oct 6, 2020

Currently infoclick will show a table containg all values for all keys, for a given feature.
Skärmavbild 2020-10-06 kl  09 07 06

If I read you correctly, you propose a way to access all features' values, not just for the clicked one?

In that case, this hasn't been proposed before and no work is done. It's rather easy to implement though, as you'd get all features from the WFS response, and then you'll need to display them in a table.

There are multiple ways to implement this feature from the user's UI perspective. You could simply have a "Open data table" button next to each layer in LayerSwitcher.

Either way, feel free to implement.

jacobwod added a commit that referenced this issue Mar 11, 2022
- Rough implementation that assumes WFS service on the same endpoint.
- Prepares the data for MUI's DataGrid and logs to console currently.
@jacobwod jacobwod self-assigned this Mar 11, 2022
jacobwod added a commit that referenced this issue Mar 11, 2022
- Refactored
- Ready for MUI's DataGrid
- Excludes the geom column from displayed columns
- Pretty much ready to hook into a Dialog or Window component and display the Data Grid now.
jacobwod added a commit that referenced this issue Mar 14, 2022
- This is part of #595.
- Upon clicking on the 'show attribute table' button, a full screen dialog is shown. I've experimented with different solutions, including non-fullscreen. I'm still open for another implementation in floating Window though, if someone would like to give it a go.
- SimpleDialog is _outside_ LayerSwitcher component. I started out with having it inside, but eventually I figured that there could be reasons to call this from other parts of code than just LayerSwitcher. So it's placed in components, subscribes on global observer and renders directly in <App />.
- I'll add a flag, on a per-layer-basis, that will control the visibility of the attribute table button. I'll call it 'showAttributeTableButton'.
- We might like to make it a map setting too, we'll see.
- Finally, added some Tooltips to LayerSwitcherItem.
@jacobwod
Copy link
Member

Here's the currently upcoming implementation. Due to limited time resources, I'm only implementing the full screen dialog for now. Feel free to extend with other view modes.

Skarminspelning.2022-03-15.kl.08.25.03.mov

@jacobwod jacobwod modified the milestones: 3.x, 3.10 Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Request for adding/changing functionality
Projects
None yet
Development

No branches or pull requests

2 participants