Closed ElenaGallo closed 3 years ago
The problem is that the style name inside the STYLES parameter of the GetMap request doesn't contain the workspace prefix. I suppose the WMS service assumes the workspace from the request subpath, while GWC uses the style name strictly.
Without workspace:
exception occurred: ParameterException: Style 'ne_110m_admin_0_boundary_lines_land' is invalid
With workspace:
This is what happens for saved maps:
However, for layer previews and new maps, a map configuration is generated by GeoNode "on the fly". In this case the style name that is injected is the layer's default style name without the prefix. The same happens when the context for a new map is created.
In both cases probably we can safely set the style to an empty string "style": ''
, since it's fine to use an empty value for the style in case it is the default style.
@marthamareal please verify if this fix would be fine and it doesn't break the map legend logic. A small fix to the map legend template is probably required, because if I'm not wrong you need the style name to show it inside the sidebar. Moreover, the current way of treating style names always result in names with hash suffixes, etc. Until we don't solve it we could hide the style name and just show the legend image.
I will move this issue to GeoNode
Issue moved to geosolutions-it/geonode #739 via ZenHub
Displaying a newly added layer the cache is always missing. This is the reason reported in the console:
How to reproduce
Current Result The layer is not cached.
Expected Result The layer is cached.