arcgis vector tile must enforce ?f=pjson other wise will fail to load
See original GitHub issueESRI have 2 kind of place for vector tile:
-
at arcgis.com for example: https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Microsoft_Building_Footprints/VectorTileServer default format is json which works
`olms( map, "https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/2020_USA_Median_Age/VectorTileServer/resources/styles/root.json" );`
-
at third party arcgis server in “hosted” folder for example:
https://gis.la-quinta.org/arcgis/rest/services/Hosted/ParcelZoning/VectorTileServer default format is html which broken`olms( map, "https://gis.la-quinta.org/arcgis/rest/services/Hosted/ParcelZoning/VectorTileServer/resources/styles/root.json" );`
if you look at chrome developer tool, network tab, this url default output is html, which cause down stream error I think this URL call initiated by this ol-mapbox-style, I have no way to fix, you must fix inside this library code.
must add ?f=pjson or ?f=json to enforce json format at this library.
I use v7.1.1. please fix this bug. v8.0.3 is not compatible with my code. so not use.
Issue Analytics
- State:
- Created a year ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
VectorTileLayer.loadStyle() is failing in Javascript API
The style json object must have the fully qualified url for the tiles if you are loading your vector tile layer from the...
Read more >ArcGIS Runtime SDK for iOS: AGSArcGISVectorTiledLayer ...
This should contain a custom style to apply to the vector tiles in this layer. This method can only be called if the...
Read more >Update vector tile layer style—ArcGIS Online Help
json ) from the layer's item page, edit the file using a JSON editor, and update your copy of the vector tile layer...
Read more >ArcGIS Runtime SDK for iOS: AGSVectorTileCache Class ...
Instances of this class represent a cache of tiles in a local vector tile package ... If it has already failed to load,...
Read more >VectorTileLayer | API Reference | ArcGIS Maps SDK for ...
A style JSON object of vector tiles that will be used to render the layer. more details, VectorTileLayer. tileInfo, TileInfo. The tiling scheme...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In v8, you could use the
transformRequest
option. I think v8 will also work with OpenLayers versions older than v6.13, but I have not tried.That said, if you’re stuck with v7, you can try to prepend the following code:
This final production working: https://transparentgov.net/ol2/dist/arcgisvector.html?layer=ParcelZoning+%28+VectorTileServer+%29+¢er_lat=33.674447844698506¢er_long=-116.29896965586569¢er_zoom=17.606760329604707&url=https%3A%2F%2Fgis.la-quinta.org%2Farcgis%2Frest%2Fservices%2FHosted%2FParcelZoning%2FVectorTileServer&overlayOpacity=5