rowanwins / maplibregl-mapbox-request-transformer

Transform mapbox:// urls in MapboxGL Styles for use in MapLibreGL.
MIT License
26 stars 5 forks source link

Extend normalizeSpriteURL to handle URLs with density qualifiers #6

Open truongvan opened 1 year ago

truongvan commented 1 year ago

Previously, the function normalizeSpriteURL could only handle URLs in the format /mapbox/streets-v12.png, /mapbox/streets-v12.json. This commit modifies the function to also accommodate URLs with density qualifiers, like /mapbox/streets-v12@2x.png, /mapbox/streets-v12@2x.json.

truongvan commented 1 year ago

Thanks Rowan Winsemius! Your plugin fixed my Mapbox and MapLibre issue.

I found a small bug with density qualifiers and submitted a PR to fix it.