GeoNode / geonode-mapstore-client

MapStore Client for GeoNode
http://geonode.org/geonode-mapstore-client/master
Other
13 stars 102 forks source link

TOC setting panel inconsistency #1720

Closed dsuren1 closed 2 months ago

dsuren1 commented 2 months ago

Description

Currently there are two type of TOC settings panel:

The LayerSettings was introduced to limit what a user can do with a layer because part of the configuration can be changed in the legacy metadata page. The workflow in geonode expects that if a dataset change the metadata all the map containing that layer should update on the next map load (eg. feature info template).

Now with the introduction of the map viewer resource we have the possibility to include the TOCItemSettings in the map and this cause inconsistency because more options are provided to the user for map layers (dataset) that should not be available: eg style tab, fields tab, ...

The best approach should be the refactor of the TOCItemSettings allowing customization and plugin injection but for the moment we could think on a way to enable settings panel for specific layer, for example:

The simple solution would be to enable LayerSettings (and disable TOCItemSettings) if the layer config contains the layer?.extendedParams?.pk