question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some ArcGIS Portal Vector Tiles do not work

See original GitHub issue

In some cases the VectorTileServer response is HTML instead of JSON.

When a VectorTileServer has a style with a relative “url” path it is computing the path to the VectorTileServer like this:

url = withPath(url, path); and url = host + url

In this case, that would be, url = "/server/rest/services/Hosted/Folder/VectorTileServer/resources/styles/../../" path = "/server/rest/services/Hosted/England/VectorTileServer/resources/styles/"

The final url looks like https://some.machine/server/rest/services/Hosted/Folder/VectorTileServer/resources/styles/../../

Then setupVectorLayer creates TileJSON, which queries the url and gets HTML instead of JSON. The layer fails to render.

If I set a breakpoint here and modify the options.url to be https://some.machine/server/rest/services/Hosted/Folder/VectorTileServer?f=json, then it works:

client.open('GET', options.url)

So the fix would be to have a way to forward query parameter or otherwise modify the url:

url = new URL(host + url).href; url += "?f=json";

Here is the actual style from https://some.machine/server/rest/services/Hosted/Folder/VectorTileServer/resources/styles/root.json

{ "version": 8, "sprite": "../sprites/sprite", "glyphs": "../fonts/{fontstack}/{range}.pbf", "sources": { "esri": { "type": "vector", "bounds": [ -6.96817, 48.7215, 5.58361, 58.92 ], "minzoom": 0, "maxzoom": 19, "scheme": "xyz", "url": "../../" } }, "layers": [ { "id": "buildings", "type": "fill", "source": "esri", "source-layer": "buildings", "layout": {}, "paint": { "fill-color": "#FCC2CE", "fill-outline-color": "#6E6E6E" } }, { "id": "places", "type": "circle", "source": "esri", "source-layer": "places", "layout": {}, "paint": { "circle-radius": 2.2, "circle-color": "#A13B53", "circle-stroke-color": "#000000", "circle-stroke-width": 0.933333 } } ] }

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ca0vcommented, Sep 14, 2021

They go through the arcgis web adapter but I can’t speak to what gets forwarded or not. There is no 3rd party proxy. I tried again on port 6443 to bypass the adaptor and got the same result. https://my-server:6443/arcgis/rest/services/Hosted/UK/VectorTileServer

1reaction
ahocevarcommented, Sep 13, 2021

Could it be that these requests go through a proxy which does not pass the headers along?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Esri Vector Basemaps—ArcGIS Data Appliance
Listed below are issues you may encounter when working with Esri Vector ... not match, check the log via the server manager to...
Read more >
Desktop Mapping: Creating Vector Tiles - Esri Videos
You'll see vector tiles work in ArcGIS client applications and learn how to restyle existing tiles for custom needs. Tags. esriarcgisgisesri events ...
Read more >
Publish hosted vector tile layers—Portal for ArcGIS
If the Share As Web Layer menu option is not available, it may be due to one of the following: ... Choose Vector...
Read more >
Publish hosted vector tile layers—Portal for ArcGIS
Tip: · The account you used to sign in does not have privileges to publish hosted layers. · Your portal is not configured...
Read more >
Desktop Mapping: Creating Vector Tiles - YouTube
Learn how to create vector tiles using ArcGIS Pro. After an overview of vector tiles in the ArcGIS Platform you'll learn how to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found