• Resolved annevoelkel

    (@annevoelkel)


    Hi Daniel,
    concerning to the loading time of the map I ask my provider to check the server settings. There are 317 oum locations and 5 marker categories and it takes a very long time to open the map. The admin wants to know:
    How exactly does the output of the locations on the map work? lat/lon are already in the data base and are not provided live.
    Is it possible to speed up the rendering process on the canvas?
    Can data base indexing accelerate anything?
    In his opinion, server utilization does not seem to be the problem, utilization of the server is less than 1%.
    Best regards Anne

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author 100plugins

    (@100plugins)

    Hi @annevoelkel,

    317 locations is not too much. I have seen pages where they have 3000+ locations on a map without loading issues. The geo-coordinates are stored in the db and everything is loaded into the HTML of the page. Have you tried to provide a page HTML caching with the map page?

    Best regards,
    Daniel

    Thread Starter annevoelkel

    (@annevoelkel)

    Hi Daniel,
    thanks for your reply. As an alternative solution to the performance problem I tryed to add this recommended java script (https://www.open-user-map.com/knowledge-base/trigger-map-actions-with-javascript/#activate-deactivate-a-marker-category) to the Custom JS:

    // Function to get the value of a specific URL parameter
    function getQueryParam(param) {
    const urlParams = new URLSearchParams(window.location.search);
    return urlParams.get(param);
    }
    
    // Get the 'oum-category' parameter value from the URL
    const categoryNumber = getQueryParam('oum-category');
    
    // Check if the 'oum-category' parameter is present
    if (categoryNumber !== null) {
    // Click all categories first
    document.querySelectorAll('.oum-filter-list label').forEach((category) => {
    category.click();
    });
    
    // Click specifically on the label based on the 'oum-category' value
    // Convert categoryNumber to a 1-based index for :nth-child() selector
    const categoryIndex = parseInt(categoryNumber, 10);
    if (!isNaN(categoryIndex)) { // Ensure categoryNumber is a valid number
    const targetLabel = document.querySelector(.oum-filter-list label:nth-child(${categoryIndex}));
    if (targetLabel) {
    targetLabel.click();
    } else {
    console.error('Specified category index is out of range.');
    }
    } else {
    console.error('Invalid category number specified in the URL parameter.');
    }
    }

    The script doesn’t work even when I add ?oum-category=3 to the page load:
    https://neu.muenzenwoche.de/institutionen/?oum-category=3

    Any idea?
    Best regards Anne

    Plugin Author 100plugins

    (@100plugins)

    Hello Anne,

    The script does not work because it is missing the single quotes in line 21. Please copy and paste the script again and it should work.

    However – this will not help with a faster loading of the page. If you want to reduce the number of locations on this map by displaying just a specific category, you should use the “type” Shortcode attribute or the corresponding filter setting in the block.

    Other than that – have you tried to install a page caching plugin to serve a cached version of the map?

    Best regards,
    Daniel

    Thread Starter annevoelkel

    (@annevoelkel)

    Hello Daniel,

    thank you very much for your advices. We’ve installed a caching plugin and after the initial load the map loads quick. Perhaps there is a conflict between OUM and our theme Enfold. On another site using theme Total the OUM map loads quickly with more than 1.000 locations and 5 categories without a caching plugin.

    Best regards Anne

    Plugin Author 100plugins

    (@100plugins)

    Okay, good to hear that the caching solved the problem. And thanks for the hint to the Enfold theme.

    Best regards,
    Daniel

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.