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
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
[core] Tokens in braces which aren't recognised by mapbox are removed from URLs #11787
Platform: iOS and Android (confirmed--expected to affect all supported platforms) Mapbox SDK version: iOS: 3.7.6, 4.0.0
Steps to trigger behavior
Add a source with a tile URL containing tokens in braces that mapbox doesn't handle (e.g., "http://example.xyz/tile/{z}/{x}/{y}.mvt?{auth}&otherparam=value")
Register a delegate to transform the URLs from that source, which does the following:
Attempts to replace the "{auth}" token with a value (e.g., "auth_token=54cd8101-a4dc-4f09-89e9-f4f0eb479e44")
Returns the transformed URL
Attempt to load a tile from the source
Expected behavior
Returned URL will contain the expected auth query parameter (e.g., "http://example.xyz/tile/1/0/0.mvt?auth_token=54cd8101-a4dc-4f09-89e9-f4f0eb479e44&otherparam=value"
Actual behavior
No {auth} token is present in the URL which is passed into the URL transformation delegate (e.g., "http://example.xyz/tile/1/0/0.mvt?&otherparam=value")
This behaviour is inconsistent with mapbox-gl-js, where unknown tokens still exist in the URL passed into the transformation function, as mapbox-gl-js explicitly replaces only those it recognises.
Activity
jfirebaugh commentedon May 19, 2018
@bfrengley Thank you so much for the detailed and comprehensive description! Reports like this are a pleasure to resolve.