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

WMTS backgroudLayer with api key #86

Closed
ZedeN1 opened this issue Oct 20, 2024 · 1 comment
Closed

WMTS backgroudLayer with api key #86

ZedeN1 opened this issue Oct 20, 2024 · 1 comment

Comments

@ZedeN1
Copy link

ZedeN1 commented Oct 20, 2024

I would like to add UK OS Maps WMTS layer as a background map. However, I could not find a way to add the key to the url as it seems to strip all parts after the ? from the specified url. Is there a workaround?

My themesConfig.json backgroundLayers entry:

      {
        "type": "wmts",
        "url": "https://api.os.uk/maps/raster/v1/wmts?key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=Light_3857&STYLE=default&FORMAT=image/png&TILEMATRIXSET={TileMatrixSet}&TILEMATRIX=EPSG:3857:{TileMatrix}&TILEROW={TileRow}&TILECOL={TileCol}",
        "name": "WMTS",
        "format": "image/png",
        "requestEncoding": "KVP",
        "tileMatrixPrefix": "EPSG:3857",
        "tileMatrixSet": "EPSG:3857",
        "originX": -20037508.342787,
        "originY": 20037508.342787,
        "projection": "EPSG:3857",
        "tileSize": [
          256,
          256
        ],
        "style": "default",
        "bbox": {
          "crs": "EPSG:4326",
          "bounds": [
            -10.764179999999964,
            49.52842300000003,
            1.9134115552,
            61.3311510086
          ]
        },
        "resolutions": [
          1222.9924523698928,
          611.4962261850814,
          305.7481130924087,
          152.87405654633633,
          76.43702827303586,
          38.21851413651793,
          19.109257068258966,
          9.554628534129483,
          4.777314267197037,
          2.3886571335985134,
          1.1943285666669667,
          0.5971642834657753,
          0.2985821416005962,
          0.1492910708002979
        ],
        "thumbnail": "Light_3857.jpg"
      }

Looking at the GET request, it does not contain the key:

https://api.os.uk/maps/raster/v1/wmts?layer=WMTS&style=default&tilematrixset=EPSG%3A3857&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix=EPSG%3A38577&TileCol=8184&TileRow=5446

@ZedeN1
Copy link
Author

ZedeN1 commented Oct 22, 2024

Realised this is the wrong place to post this issue.
qgis/qwc2-demo-app#586

@ZedeN1 ZedeN1 closed this as completed Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant