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

Some Vector Tile style sheets don't work with custom viewer. #587

Open
ZedeN1 opened this issue Oct 23, 2024 · 4 comments
Open

Some Vector Tile style sheets don't work with custom viewer. #587

ZedeN1 opened this issue Oct 23, 2024 · 4 comments

Comments

@ZedeN1
Copy link

ZedeN1 commented Oct 23, 2024

I compiled a custom viewer as per #586. For the Vector Tile Grayscale backgroundLayer below, the custom viewer does not GET the tiles if the Greyscale style is used. The same vector tile with the colour styles works OK.

I can see that Firefox manages to GET the greyscale style json. I don't see any logs that would explain or point at the issue.

The default qwc-docker viewer manages to display the same Vector Tile without problem.

{
        "name": "Vector Tile Grayscale",
        "type": "mvt",
        "url": "https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=xxxxxx",
        "style": "https://raw.githubusercontent.com/OrdnanceSurvey/OS-Vector-Tile-API-Stylesheets/master/OS_VTS_3857_Greyscale.json",
        "declutter": false,
        "projection": "EPSG:3857",
        "thumbnail": "vt_grayscale.png"
      },
      {
        "name": "Vector Tile Colour",
        "type": "mvt",
        "url": "https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=xxxxxx",
        "style": "https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key=xxxxxx",
        "declutter": false,
        "projection": "EPSG:3857",
        "thumbnail": "vt_colour.png"
      },
@ZedeN1
Copy link
Author

ZedeN1 commented Oct 23, 2024

Reverting components/map/layers/MVTLayer.js to https://github.com/qgis/qwc2/blob/c3159281e9021cd504783f7d3873e192c8fe8aee/components/map/layers/MVTLayer.js fixes the issue.

Commit qgis/qwc2@f310a2e seems to be the cause

@manisandro
Copy link
Member

I'll need to look into this. How can one obtain a key for this service?

@ZedeN1
Copy link
Author

ZedeN1 commented Oct 23, 2024

https://osdatahub.os.uk/

It's free under fair use.

@manisandro
Copy link
Member

Does [1] help along with

                    {
				"name": "os_uk_vt_colour",
				"type": "mvt",
				"url": "https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?srs=3857&key=xxx",
				"style": "https://api.os.uk/maps/vector/v1/vts/resources/styles?srs=3857&key=xxx",
				"declutter": false,
				"projection": "EPSG:3857",
				"thumbnail": "vt_colour.png",
				"styleOptions": {
					"accessTokenParam": "key",
					"accessToken": "xxx"
				}
			  }

? For me, it renders the colour style correctly. It also renders the gray style, but completely off-place.

[1] qgis/qwc2@e2e49d0

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

2 participants