You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the provided fiddle the tileURL is set to /tile/6/26/15.pbf and sourceURL is https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer. Together they form a correct URL but mapbox only returns the tileURL.
I made a simple change to the function and the 3rd party source is working as expected.
An actual fix might need to consider certain formats (trailing&leading slashes, placeholders etc.) but considering a compatible format mapbox properly loads and displays the tiles with this change.
The text was updated successfully, but these errors were encountered:
mapbox-gl-js version: 0.47.0 and master branch
browser: Any
Steps to Trigger Behavior
Link to Demonstration
https://jsfiddle.net/ef7qwb1c/
Expected Behavior
MapBox should load the tiles form the given URL and display them.
Actual Behavior
MapBox constructs an invalid TileURL resulting in a failed XMLHttpRequest to load the data resulting in a an empty map and a lot of JS errors.
How to fix
Issue is the
normalizeTileURL
function which does not consider the sourceURL in this scenario:mapbox-gl-js/src/util/mapbox.js
Line 80 in cdef662
In the provided fiddle the
tileURL
is set to/tile/6/26/15.pbf
andsourceURL
ishttps://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer
. Together they form a correct URL but mapbox only returns the tileURL.I made a simple change to the function and the 3rd party source is working as expected.
An actual fix might need to consider certain formats (trailing&leading slashes, placeholders etc.) but considering a compatible format mapbox properly loads and displays the tiles with this change.
The text was updated successfully, but these errors were encountered: