Currently there are two type of TOC settings panel:
LayerSettings plugin: limited version of available options for GeoNode dataset
TOCItemSettings plugin: the dafault settings panel for mapstore
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:
selecting internal dataset layers only the LayerSettings will be available
selecting a layer added with the MetadataExplorer only the TOCItemSettings will be available
The simple solution would be to enable LayerSettings (and disable TOCItemSettings) if the layer config contains the layer?.extendedParams?.pk
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