Skip to content

Permalink and state

Stéphane Brunner edited this page Sep 24, 2022 · 21 revisions

Interaction between the Login, the Permalink, and the Layertree throw the state.

graph TD;
    PSO[(Original Permalink State)];
    PS[(Permalink State)];
    CS[(Layer Tree State)];
    OC[Other Component]
    subgraph Login
    UL[On first login with private layers];
    end
    subgraph Permalink Component
    URL
    PC1[The UI - share];
    PC2[Set to the URL];
    end
    subgraph Layer Tree
    C1[Original permalink watcher];
    C2[Layer tree to permalink state converter];
    C3[The UI];
    C4[Search action to state converter];
    end    
    subgraph Search
    S1[UI]
    end
    URL-->PSO;
    UL-->PSO;
    PS-->PC1;
    PS-->PC2;
    PSO-->C1;
    C1-->CS;
    CS-->C2;
    C2-->PS;
    OC-->CS;
    CS<-->C3;
    S1-. event with action .->C4
    C4-->CS
Loading

In simpler component than the layer tree we will not have a dedicated RXJS state (just an internal state)

The permalink states will be a dictionary with str -> str.

The layertree state can be something like:

{
  "root": {
    "name": "<name of open theme>",
    "children_ids": [...]
    ...
  },
  <id-calculated-by-ngeo>: <same as the theme>
}

Of hierarchic state?

We will probably also have:

  • Something to store the result of the tree web service.
  • Some event to communicate with the search, the filter, ...
Clone this wiki locally