Sprite url gets validated before transformRequest #3897
Labels
bug
Something isn't working
enhancement
New feature or request
PR is more than welcomed
Extra attention is needed
I was experimenting with relative URLs in styles and transforming all relative URLs to absoulte ones with the transformRequst Method.
Unfortunatly the loading of Sprites failes with an invalid URL Error (because its relative) before the transformRequest Method gets called.
https://github.com/maplibre/maplibre-gl-js/blob/f6035db6670de1af2d294e3cb5f6702f8616b53f/src/style/load_sprite.ts#L31C54-L31C70
maplibre-gl-js version:
4.1.1
browser:
Chrome Version 123.0.6312.59
Steps to Trigger Behavior
Link to Demonstration
https://jsbin.com/ranucez/edit?html,console,output
Expected Behavior
transformRequest should be called bevor any checks if the URL is valid, eg a relative one
Actual Behavior
Error: Unable to parse URL "/maps/streets/sprite" and transformRequest never gets called for Sprites
The text was updated successfully, but these errors were encountered: