WMTS fails for group layers

Issue #620 resolved
Dominik Fröhlich created an issue

WMTS layers can not be part of a group layer. They work perfecctly fine individually, but loading the layer fails as soon as they are part of a group in Version 2.8.0 (version can not be selected in the dropdown):

Example layer definition:

  {
    "id": "topplus_wmts",
    "name": "TopPlusOpen",
    "capabilitiesUrl": "https://sgx.geodatenzentrum.de/wmts_topplus_open/1.0.0/WMTSCapabilities.xml",
    "urls": "https://sgx.geodatenzentrum.de/wmts_topplus_open",
    "optionsFromCapabilities": true,
    "typ": "WMTS",
    "layers": "web",
    "format": "image/png",
    "version": "1.0.0",
    "origin": [-20037508.3428, 20037508.3428],
    "style": "default",
        "transparent": true,
        "tileSize": "256",
        "minScale": "3000",
        "maxScale": "2500000",
        "tileMatrixSet": "EU_EPSG_25832_TOPPLUS",
        "coordinateSystem": "EPSG:3857",
        "legend": "https://sg.geodatenzentrum.de/wms_topplus_open?styles=&layer=web&service=WMS&format=image/png&sld_version=1.1.0&request=GetLegendGraphic&version=1.1.1",
        "requestEncoding": "REST",
        "resLength": "18",
    "layerAttribution": "Quellenvermerk: © Bundesamt für Kartographie und Geodäsie",
    "datasets": [
      {
        "md_id": "1B115542-114F-4E11-992E-CB0677898650"
      }
    ]
  }

works fine as long as included individually like

{
                "id": "topplus_wmts"
            }

but crashes if included as a group:

{
                    "id": "group_base",
                    "name": "TopPlusOpen (base)",
                    "children": [{
                        "id": "topplus_wmts"
                    },{
                        "id": "alkis_sw_bg"
                    }],
                    "visibility": true
                }

In the latter case an exception “Uncaught (in promise) TypeError: t.getSource() is null” is thrown followed by a “Uncaught (in promise) TypeError: this.collection is undefined” (I’ll spare you the stack trace for it is the minimized one that is not really helping).

Best,

Dominik Fröhlich

Comments (10)

  1. Markus Rullkoetter

    Hallo @Dominik Fröhlich ,

    in der aktuellsten Version konnte ich gerade erfolgreich zwei WMTS als Teil eines Gruppenlayers hinzufügen.
    Können Sie mir vielleicht bestätigen, dass das Problem auch bei Ihnen in der aktuellsten Version nicht mehr auftritt?

    Viele Grüße
    Markus Rullkötter

  2. Dominik Fröhlich reporter

    Kann ich gerne testen sobald ich einen neuen Build habe. Ich bin die nächsten Tage allerding ziemlich zu und es ist ja auch noch FOSSGIS. Sobald ich dazu komme meld ich mich.

    Gruß

    Dominik

  3. Dennis Sen

    Ich habe den oben definierten Service einmal in der services-internet.json des portal/basic eingepflegt und mit der Hintergrundkartendefinition

    {
              "id": "arbitrary-internal-id",
              "name": "Gruppenlayer",
              "children": [
                { "id": "topplus_wmts" },
                { "id": "453" }
              ],
              "visibility": true
    }
    

    ausprobiert. Im aktuellen Stand funktioniert das auch. Ich nehme an, dass ein zugrundeliegender Bug seit Ticketbeginn bereits gefixed wurde, und schließe hier von daher.

    Gern wieder öffnen, falls sich das Problem doch noch stellt.

    Viele Grüße

  4. Log in to comment