Stylesheet
API test authentication
The Open API block allows you to test OS APIs directly from the page with example data and parameters. To use this feature, you will need to add your API Key or OAuth2 token to the authentication field.
For help generating an API Key or OAuth2 token, please see the Getting started with an API project or OAuth2 documentation.
Authorizations
Query parameters
srsstring · enumOptionalDefault:
The Spatial Reference System for the service.
27700
Possible values: Responses
200
Retrieves compatible stylesheets
application/json
get
GET /maps/vector/v1/vts/resources/styles HTTP/1.1
Host: api.os.uk
Accept: */*
200
Retrieves compatible stylesheets
{
"version": 1,
"sprite": "text",
"glyphs": "text",
"sources": {
"ANY_ADDITIONAL_PROPERTY": {
"type": "text",
"url": "text"
}
},
"layers": [
{
"id": "text",
"type": "text",
"source": "text",
"source-layer": "text",
"filter": [
"text"
],
"minzoom": 1,
"maxzoom": 1,
"layout": {},
"paint": {}
}
]
}
Authorizations
Path parameters
layer-namestring · enumRequiredPossible values:
The name of the data overlay.
Query parameters
srsstring · enumOptionalDefault:
The Spatial Reference System for the service.
27700
Possible values: Responses
200
Returns compatible stylesheets for a data overlay.
application/json
get
GET /maps/vector/v1/vts/{layer-name}/resources/styles HTTP/1.1
Host: api.os.uk
Accept: */*
200
Returns compatible stylesheets for a data overlay.
{
"version": 1,
"sprite": "text",
"glyphs": "text",
"sources": {
"ANY_ADDITIONAL_PROPERTY": {
"type": "text",
"url": "text"
}
},
"layers": [
{
"id": "text",
"type": "text",
"source": "text",
"source-layer": "text",
"filter": [
"text"
],
"minzoom": 1,
"maxzoom": 1,
"layout": {},
"paint": {}
}
]
}
Last updated
Was this helpful?