OrdnanceSurvey / OS-Vector-Tile-API-Stylesheets

Cartographic stylesheets for use with OS Vector Tile API
8 stars 9 forks source link

Add SRS query param to tile specifications #3

Open joedjc opened 2 years ago

joedjc commented 2 years ago

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

tmnnrs commented 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!

joedjc commented 2 years ago

Thanks @tmnnrs that would be great. I'll keep an eye out

jackforesightmobile commented 1 year ago

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.

andokai commented 1 year ago

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.

https://github.com/maplibre/maplibre-react-native

andokai commented 5 months ago

Still watching this space...