-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
New Lizmap web component lizmap-features-table to display a compact list of features #4502
Conversation
eb07c0f
to
4bead37
Compare
bdb42b3
to
d31f7f3
Compare
d31f7f3
to
70cbde6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the new API.
70cbde6
to
c91f887
Compare
…ist of features <lizmap-features-table layertitle="child sub-districts" layerid="sousquartiers_24ceec66_e7fe_46a2_b57a_af5c50389649" uniquefield="id" expressionfilter="quartmno = 'MC'" withgeometry="1" sortingfield="libsquart" sortingorder="asc" draggable="yes" ></lizmap-features-table>
c91f887
to
43d40d2
Compare
When a feature table item is selected, other items are automatically hidden, as expected. However, if there is another feature table in the selected feature, new items are also hidden before they can be picked, because they share the same CSS selector. You could introduce a hierarchy level into the selector to differentiate between parent and child feature tables. Video example (FRA): https://youtu.be/zZafmypUBVs |
Hi @erw-1 if you find an issue, please open one. |
@erw-1 you can also provide a Pull Request if you have a solution to fix it. |
Here, this is my first contribution/ pull request ever! Hopefully I did things right. |
This
lizmap-features-table
web component allows to display a compact list of vector layer features labels:MONTPELLIER CENTRE - Les Aubes (85 ha)
It will be used in future in several contexts:
As any HTML web component, it can be used by writing an HTML element with attributes allowing to configure its source data and behaviour, for example:
The following attributes allow configuring the table:
layertitle
: the title to use at the top of the tablelayerid
: The QGIS vector layer internal ID. It can be found in QGIS vector layer properties dialogue, tabVariables
uniquefield
: the unique identifier of the layer features. Use the primary key if possible.expressionfilter
: a QGIS expression allowing to filter the displayed features. If no filter is set, all the features will be shown. Beware of bad performances for heavy datasets.withgeometry
: If this attribute exists (with or without a value), the geometries will also be used and downloaded. Use it at present if the feature display expression depends on the geometry, for example if it contains a calculation made from the geometry, e.g.area(@geometry)
. In the future, this will also be used to draw the geometry on the map.sortingfield
andsortingorder
: allow defining in which order the features must be displayed. Default is the alphabetical order of the display expression values.asc
means ascending order, anddesc
means descending order.draggable
: if set with the valueyes
, the user will be able to change the position of an item in the table by dragging and dropping it.Events will be fired
features.table.rendered
When the table has been successfully displayed. The event carries thelizmap-features-table
HTML element IDfeatures.table.item.dragged
when the user has dropped an item in a new position. The event carries 3 properties:itemFeatureId
: the vector feature IDitemOldLineId
: the original line ID before dropping the itemitemNewLineId
: the new line ID after dropping the item in a new positionFunded by Ville d'Avignon https://cartes.mairie-avignon.com/