Open joedjc opened 2 years ago
Hi @joedjc. These stylesheets have been designed to be in keeping with the default style for the OS Vector Tile API (which does mean that the transformRequest
callback is required). We [OS] are currently reviewing the service to allow the &srs=3857
parameter to be added automatically in each child document (including via the service metadata) to avoid users having to use the callback. Watch this space!
Thanks @tmnnrs that would be great. I'll keep an eye out
Hey @tmnnrs do you have any update on this being implemented? We're trying to use OS with Mapbox on Flutter and there is no transformRequest callback currently in the SDK.
Hi, sorry for the +1 but I'm also looking for a way to use the stylesheets without the need to transform the request so that I can use them with the MapLibre GL SDK for React Native.
Still watching this space...
Hi,
Could I suggest you add the &srs=3857 to the URL when you request the tile specs here:
https://api.os.uk/maps/vector/v1/vts?key=XXXXX&srs=3857
So the API would appear like this: "https://api.os.uk/maps/vector/v1/vts/tile/{z}/{y}/{x}.pbf?key=XXXXX&srs=3857"
That would avoid having to make a transformRequest for each tile and I think it's safe to assume the user wants the tiles in that SRS.
Thanks