Description
When a map is created from a dataset hosted on a remote server that requires authentication, the map thumbnail is not generated on map page shows base layer only when thumbnail is created on map page.
Internally, GeoNode uses the _dataset_locations
function, which returns a list of available OGC servers for the dataset:
[
settings.OGC_SERVER["default"]["LOCATION"],
[dataset.alternate],
[dataset_style],
]
Later in the workflow, the OGC server URL from this list is used to call the service that generates the map thumbnail.
The idea is to enhance the list returned by _dataset_locations to include authentication information when the related service requires authentication.
Once this information is available, the utility function that checks whether a service requires authentication
can be improved by removing the dataset-specific logic and making the authentication check more generic.