Skip to content
karlbrink edited this page May 9, 2025 · 2 revisions

loadwmc in (modern) mapbender fat client

  • click on this button to start the dialog with the list of available wmc documents

    grafik

  • the list of wmc is generated while the gui is loaded

    grafik

  • you can define a reload of the list, so every time the button is clicked, the list is reloaded from the server

  • to achiev this, create an element_var in the module: loadWMC_Button

    Name: reinitializeLoadWmc

    Value: true

    Type: var (JavaScript Variable)

Django Cache landing page view

define a cache directory and give it to www-data

mkdir /var/tmp/django_cache
chown -R www-data /var/tmp/django_cache

activate django filesystem cache

https://github.com/mrmap-community/GeoPortal.rlp/blob/master/Geoportal/settings.py

# ...
CACHES = {
    "default": {
        "BACKEND": "django.core.cache.backends.filebased.FileBasedCache",
        "LOCATION": "/var/tmp/django_cache",
    }
}
# ...

adopt the view for the landing page

https://github.com/mrmap-community/GeoPortal.rlp/blob/master/useroperations/views.py

# ...
from django.views.decorators.cache import cache_page
# ...
@cache_page(60 * 15)
@check_browser
def index_view(request, wiki_keyword=""):
# ...

add low max_results for layer and dataset search

https://github.com/mrmap-community/GeoPortal.rlp/blob/master/useroperations/utils/useroperations_helper.py#L132

searcher = Searcher(keywords="", result_target="", resource_set=[key], host=HOSTNAME, max_results=1)

Clone this wiki locally