Skip to content

Update dinamically the menu #68

@leonardogonfiantini

Description

@leonardogonfiantini

Hi, I am currently working on a GIS web app that uses this plugin to create a dynamic menu of WMS layers.
I have encountered a problem regarding updating this menu dynamically from different components (I'm using Svelte).
To resolve this issue, I have created baseOverlays in the window, and then I update the window.baseOverlays object for any wms that the user adds dinamically from a different component, so i walk inside the object to find the correct subsesction of the wms then i add it to the children array of the subsection, then I call the setOverlayTree(window.baseOverlays) function to refresh the menu with the new layer.
It works fine, but I am wondering if it's possible to create a function that can dynamically update the menu, i can work on that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions