Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Items in init workbench should load parent groups #6868

Open
nf-s opened this issue Sep 4, 2023 · 1 comment
Open

Items in init workbench should load parent groups #6868

nf-s opened this issue Sep 4, 2023 · 1 comment
Labels
Community Issue An issue raised by the community T-Bug

Comments

@nf-s
Copy link
Contributor

nf-s commented Sep 4, 2023

Related to #6867

For example - here is a wms-group with a manually defined member - which will also be added to the workbench on map load.

Currently, the wms-group isn't loaded before it is added to the workbench

{
  "homeCamera": {
    "north": -8,
    "east": 158,
    "south": -45,
    "west": 109
  },
  "workbench": [
    "gsky-ows/chirps"
  ],
  "catalog": [
    {
      "id": "gsky-ows",
      "type": "wms-group",
      "name": "gsky ows geoglam",
      "url": "https://gsky.nci.org.au/ows/geoglam",
      "members": [
        {
          "type": "wms",
          "localId": "chirps",
          "name": "Monthly Precipitation CHIRPS v2.0 (overridden)"
        }
      ]
    }
  ],
  "viewerMode": "3dSmooth",
  "baseMaps": {
    "defaultBaseMapId": "basemap-positron",
    "previewBaseMapId": "basemap-positron"
  }
}
  1. Test link
  2. Item in workbench is broken
  3. Open Data Catalog
  4. Click on "gsky ows geoglam" group to trigger loadGroup
  5. Item in workbench is now working

This happens inside Terria.pushAndLoadMapItems().

Note, Terria.loadModelStratum does load parent groups

terriajs/lib/Models/Terria.ts

Lines 1425 to 1427 in b14835b

const containerIds = thisModelStratumData.knownContainerUniqueIds;
if (Array.isArray(containerIds)) {
// Groups that contain this item must be loaded before this item.

@nf-s
Copy link
Contributor Author

nf-s commented Sep 5, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Issue An issue raised by the community T-Bug
Projects
None yet
Development

No branches or pull requests

1 participant