Attribute table crash when additional geometries in attributes
Description
We have some layers with additional geometries as attributes :
Here the «parking_geom» and «departure_geom»
When we try to open the attribute table of this layer, Mapsore crash
How to reproduce
- Add a layer with additional geometries as attributes
- Open this layer attribute table
Expected Result The attribute table should open without crash, don't know how to render geometries fields (maybe EWKT or just hide them)
Current Result Mapstore crash ("Something wents wrong" message)
- [x] Not browser related
Will it be possible/simple to at least fix the crash for next release (2025.01.00) ? I don't know if it needs a small or a big change.
It would be much appreciated as we have some contexts that are unusable because of this bug making MS2 crash when user try to open attribute table.
@tdipisa
@jusabatier
Will it be possible/simple to at least fix the crash for next release (2025.01.00) ?
We will try to schedule a check for this. Thank you for reporting.
Hi @tdipisa I need clarifications for 2 things:
- What action should I do, hide the field from attribute table? Or parsing it to string or what ?
- Are there other fields types rather than wkt should I handle in this issue ?
@mahmoudadel54 (FYI @offtherailz) Probably the better should be to let the user to choose the geom he want to manage when the Table is loaded with the possibility to switch between available geometries trough a selector.
I think it will be complicated for end user to choose the geom, as sometimes they begin with carto.
The geometry representation is handled via styles, and we can choose what geometry to shows or not there. The WKT representation can be usefull sometimes, but I suggest to simply hide them as it's not a human readable field.
Yes, attribute table should not show any geom field as column, and this should avoid the crash. About "what geometry field to show/use for editing etc..." we can not see what geometry is used by the style (and the style may use more than one). On mapstore side we can decide to use the first one found (that I think is the current behavior). This, together with the fix above, should provide the minimum functionality, avoiding crashes. Then an additional feature can be to make a button show, when multiple geometry are available, to select the geom field to use.
On mapstore side we can decide to use the first one found (that I think is the current behavior). This, together with the fix above, should provide the minimum functionality, avoiding crashes. Then an additional feature can be to make a button show, when multiple geometry are available, to select the geom field to use.
yes @offtherailz, that's what I suggested indeed.