You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have a custom plugin for the layer settings, because when GeoNode 4 was developed a decision was taken to implement a custom logic for the management of the GFI template (managed on the side of GeoNode) and styles for a layer.
We have found out that this approach is problematic and having a custom behavior and code isn't probably worth it. The custom logic in GeoNode also lacks some features that are available with the default MapStore layer settings (e.g. managing and selecting multiple styles for a single map layer).
Moreover, the plan is to align even more with the GeoNode client and the MapStore projects to take advantage of shared resources and efforts.
What will change
By reverting to the MapStore default plugin the most relevant change to GeoNode is that the list of available and selectable styles is not tied to the specific maplayer instance (which is the instance of a dataset in a map) but global for the Geoserver layer behind the dataset.
It means that
users with view rights can view and select ANY of the styles available for the Geoserver layer behind the dataset
users with edit rights on the dataset can create and edit ANY style connected to the Geoserver layer behind the dataset
This is different from the current behavior, where a style is connected to the specific map layer. Users without view rights on the map couldn't see that style listed inside other maps.
We think this isn't a big concern. In case the privacy of a style is important, a duplicate Geoserver layer and dataset should be created, to be able to differentiate access rights to the connected styles.
Implementation notes
The custom settings will be replaced with the default MapStore layer settings plugin, taking into account the following peculiarities of the GeoNode context:
Feature template:
When a dataset is added to a map, it includes a feature template (default or customized on the GeoNode side), which is returned by the API response inside the featureinfo_custom_template property
The map will use this template for the new map layer, but when a user changes the template from the Feature Info tab of the layer settings, this will override the initial template.
Styles;
When a dataset is added to a map, it includes a default style (default or customized on the GeoNode side), which is returned by the API response inside the default_style property
The map will use this style for the new map layer, but when a user changes the selected style from the Style tab, the selected style will be set for the map layer AND will also be included as current_style property inside the maplayer object that is POSTed to GeoNode when saving the map. GeoNode's MapLayer object needs to know the style selected for a map layer for the rendering on thumbnails.
A few notes about the styles and the GeoNode API / models:
Now a maplayer contains both the current_style and an array of styles under the extra_params attribute. I think the latter is not needed anymore, since we will not keep the list of "available styles" inside the maplayer. The list of available styles come from Geoserver, as it happens with MapStore
By replacing the custom plugin with the default one we have noticed that the editing tools do not appear at the top of the Style panel, even if the current user has the change_dataset_style permission for the layer. To be investigated.
The text was updated successfully, but these errors were encountered:
Overview
We currently have a custom plugin for the layer settings, because when GeoNode 4 was developed a decision was taken to implement a custom logic for the management of the GFI template (managed on the side of GeoNode) and styles for a layer.
We have found out that this approach is problematic and having a custom behavior and code isn't probably worth it. The custom logic in GeoNode also lacks some features that are available with the default MapStore layer settings (e.g. managing and selecting multiple styles for a single map layer).
Moreover, the plan is to align even more with the GeoNode client and the MapStore projects to take advantage of shared resources and efforts.
What will change
By reverting to the MapStore default plugin the most relevant change to GeoNode is that the list of available and selectable styles is not tied to the specific maplayer instance (which is the instance of a dataset in a map) but global for the Geoserver layer behind the dataset.
It means that
This is different from the current behavior, where a style is connected to the specific map layer. Users without view rights on the map couldn't see that style listed inside other maps.
We think this isn't a big concern. In case the privacy of a style is important, a duplicate Geoserver layer and dataset should be created, to be able to differentiate access rights to the connected styles.
Implementation notes
The custom settings will be replaced with the default MapStore layer settings plugin, taking into account the following peculiarities of the GeoNode context:
featureinfo_custom_template
propertydefault_style
propertycurrent_style
property inside the maplayer object that is POSTed to GeoNode when saving the map. GeoNode's MapLayer object needs to know the style selected for a map layer for the rendering on thumbnails.A few notes about the styles and the GeoNode API / models:
change_dataset_style
permission for the layer. To be investigated.The text was updated successfully, but these errors were encountered: