geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
412 stars 487 forks source link

osm is displayed after language switch #5519

Open pvgenuchten opened 3 years ago

pvgenuchten commented 3 years ago

on a 3.10 instance with a map configured with custom layers using ows-context, when you switch the language it blinks openstreetmap, before switching to the configured map, after another switch the osm is not anymore replaced by the configured map anymore and osm is displayed

Suggestion is to not load a layer while the context is loading, or else make configurable which layer to load.

pvgenuchten commented 3 years ago

after some more research, seems geonetwork stores a map context per language. if you select a new language it will create a new map from default context. if you return to a language, it tries to grab the related map from local storage, it works for the bounds, but the activated map layers are lost.

suggestion is to remove the map-per-language functionality

pvgenuchten commented 3 years ago

seems the layers are not written to the context which is stored on local storage at page-unload because instance-of(layer) is not one of the recognized types