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
TileLayer accepts a tileSize as well as a urlTemplate. Mapbox supports Static Tile URLs of the form https://api.mapbox.com/styles/v1/{username}/{style_id}/tiles/{tilesize}/{z}/{x}/{y}{@2x}
When using Mapbox you need to specify the tileSize twice, e.g
My proposal is a new placeholder, {d} (for dimension) that is replaced with the tile size, so I can now provide a url like 'https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/{d}/{z}/{x}/{y}{r}?access_token={accessToken}' and not worry about ensuring I write 512 twice.
What other alternatives are available?
A little bit of duplication
Can you provide any other information?
Happy to send a very modest (one-line) patch.
Severity
Annoying: Currently have to use workarounds
The text was updated successfully, but these errors were encountered:
This should be relatively easy. One interesting thing to note is that they don't actually have to match. Add to this retina mode, and it can all be quite confusing, with some combinations seemingly having no effect.
I should be able to get a PR for this done.
JaffaKetchup
changed the title
[FEATURE] Add placeholder for tile size
[FEATURE] Add TileLayerurlTemplate placeholder for tileSizeSep 27, 2023
What do you want implemented?
TileLayer
accepts atileSize
as well as aurlTemplate
. Mapbox supports Static Tile URLs of the formhttps://api.mapbox.com/styles/v1/{username}/{style_id}/tiles/{tilesize}/{z}/{x}/{y}{@2x}
When using Mapbox you need to specify the tileSize twice, e.g
This can be error prone.
My proposal is a new placeholder,
{d}
(for dimension) that is replaced with the tile size, so I can now provide a url like'https://api.mapbox.com/styles/v1/mapbox/satellite-v9/tiles/{d}/{z}/{x}/{y}{r}?access_token={accessToken}'
and not worry about ensuring I write 512 twice.What other alternatives are available?
A little bit of duplication
Can you provide any other information?
Happy to send a very modest (one-line) patch.
Severity
Annoying: Currently have to use workarounds
The text was updated successfully, but these errors were encountered: