Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
OS NGD API – Features Technical Specification provides an overview of the endpoints available, as well as the parameters that can be used with each endpoint. The Technical Specification is intended to be used by customers who want to integrate with the API. Click into each endpoint to learn more.
The OS NGD API – Features supports a generic filter grammar called Common Query Language (CQL) for specifying enhanced filter criteria to return a subset of features. CQL is written using a familiar text-based syntax, making it more readable and better-suited for creating complex filters.
The following table documents the supported operators:
Comparison
EQUAL TO [ = ]
, LESS THAN [ < ]
, LESS THAN OR EQUAL TO [ <= ]
, GREATER THAN [ > ]
, GREATER THAN OR EQUAL TO [ >= ]
, ISNULL
, LIKE
, IN
, BETWEEN
Logical
AND
, OR
, NOT [ <> ]
Array
AEQUALS
, ACONTAINS
, ACONTAINEDBY
, AOVERLAPS
Spatial
INTERSECTS
The following pages provide an overview of how to get started using OS NGD API – Features. They provide step-by-step instructions to get started in the most common and .
These pages should be read in conjunction with the more detailed pages within the section and the API's .
Accessing OS NGD data with OS NGD API – Features via Cadcorp SIS
The Cadcorp Spatial Information System® (Cadcorp SIS®) is an integrated family of geospatial products comprising desktop, web, and developer applications.
Cadcorp SIS Desktop connects directly to the OS Data Hub through dedicated wizards.
Cadcorp SIS (version SIS 9 or later).
A preloaded base map, for example, or .
OS NGD API – Features added to an API project in the OS Data Hub with an API Key. See for more information.
These instructions are based on Cadcorp SIS Desktop version 9.1.1668.
In the Overlay Types dialog:
Select Ordnance Survey (GB) > OS (GB) Data Hub, and then click Next.
In the OS (GB) Data Hub dialog:
Select OS National Geographic Database (NGD) API – Features.
API Key: Enter your API key.
Premium/Public Sector Plan: Select this option if you have this plan.
Save in the UI settings database (encrypted): Select this option.
Click Next.
In the OS Data Hub NGD API – Features Data Themes and Feature Types dialog:
Well-known ‘recipe’: Select a predefined recipe, if available.
Data Themes: Select your data themes.
Features: If necessary, use the editing tools (on the right) to delete feature types or to change the order in which they display in your SIS Workspace Definition (SWD). By default, all feature types within the selected data themes are available in the right panel.
Local cache: Select this option to store the data temporarily on your machine. If you save and reopen the SWD, the data will still be available as it is fetched from your local cache.
One-off import: Select this option to do a one-off import of the data. If you save and reopen the SWD, the data will not be available and you will need to re-import it. These imports have a larger file size.
Filtering: These settings are used in conjunction and define how much data is required for display. It is recommended that you always set a spatial filter and feature limit.
Spatial: The Intersect with current view extent option limits the download to only selected features within the current window extent. You can also load features within a specific area of interest using the polygon feature to draw your area of interest on the map BEFORE opening the Add Overlay dialog.
Maximum number of features: Limits the number of feature values downloaded to the number set. This limit is applied per feature within any filtered spatial area.
Click Finish.
The selected layer(s) will then display in the SIS Workspace Definition (SWD) and the data will display in the map area:
Accessing OS NGD data with OS NGD API – Features via ESRI ArcGIS Online
ArcGIS Online is a web-based platform geographic information system (GIS). ArcGIS Online services are managed by Esri and accessed by a client running on a wide range of options.
The instructions that follow demonstrate how to connect to OS NGD API – Features using ESRI ArcGIS Online.
Access to the ESRI ArcGIS Online service.
A preloaded base map, for example, .
OS NGD API – Features added to an API project in the OS Data Hub with an API Key. See for more information.
In the Add Layer dialog:
URL: Enter the base URL for OS NGD API – Features, excluding the API Key. For example, https://api.os.uk/features/ngd/ofa/v1.
Type: Select OGC feature layer.
Select Custom request parameters and enter the following:
Parameter: key
Value: [Insert your OS API Key here]
Click Next.
In the Add Layer dialog:
To add a layer to the map: Select a layer to add to the map and then click Add to map.
The layer will then display in the Layers panel and the data will display on the map:
Features will automatically refresh when you zoom or pan on the map. If you wish to add multiple layers to the same map, repeat steps 2 and 3.
The following sub-sections provide step-by-step instructions on how to access OS NGD data via OS NGD API – Features in various GIS software packages:
The following pages provide an overview of the OS National Geographic Database (NGD) APIs and how you can access them. They cover the core elements of the design (including data available), technical specifications, and how to get started, amongst other topics.
These pages should be used in conjunction with the more detailed pages within the Data Structure section which are specifically focussed on the different OS NGD themes, collections and feature types.
The APIs are self-documenting and allow you to easily discover what OS NGD data is available before using it. You can explore the various data collections for free to decide what best suits your needs. The data is ready to use in numerous applications (desktop, web, and mobile), enabling you to power your applications with rich, consistent and current information about the real world.
The OS NGD APIs are available via the OS Data Hub.
With OS NGD API – Features, you can filter by attribute, location and / or time to create your own customised data selections. Based on the latest OGC API – Features standard, this API can help accelerate your time-to-value by making it easier to build awesome things with our trusted geospatial data. You can use it to reduce your data management overheads, automate your workflows, and innovate at pace.
You can:
Request specific features using location, attribute, and / or time queries.
Interrogate highly detailed feature information.
Freely discover what OS NGD data collections are available.
Explore the OS NGD data schemas and queryables.
Request data in GeoJSON format.
Visualise OS data and apply your own styling.
You can't:
Create a scalable map of Great Britain across zoom levels.
Request more than 100 features in a single transaction.
Access data from the:
OS NGD Address Theme
OS NGD Administrative and Statistical Units Theme
Waterbody Catchment and River Basin District Catchment Feature Types (of the OS NGD Water Features Collection in the OS NGD Water Theme)
If you are interested in addressing information, OS Places API provides a detailed view of an address and its lifecycle, giving you direct access to rich address data for geocoding, postcode searching, form-filling and much more.
The following table documents the OS NGD datasets available through the OS NGD API – Features showing the themes, collections and lists the available feature types.
OS NGD themes and collections have been created to group similar geographic entities and data types, making it quicker and easier to identify the data you need. The OGC API - Features standard also references feature collections, and in the context of OS NGD datasets, this is equivalent to feature types.
The following naming convention has been applied to the feature collections: theme-collection-featuretype-version
. Short codes have been used for both the theme and collection to keep the feature collection names manageable and not overly long. An example of the short codes used is below:
bld-fts-buildingline-1
Click on the theme to find out more information about the dataset:
Find out more about the hierarchy of OS NGD data .
If you are interested in addressing information, provides a detailed view of an address and its lifecycle, giving you direct access to rich address data for geocoding, postcode searching, form-filling and much more.
Accessing OS NGD API – Features via Leaflet
is an open-source JavaScript library for displaying interactive maps on the web or mobile. A simple and lightweight library that will enable you to display and visualise location data and build dynamic applications.
OS Maps API and OS NGD API – Features added to an API project in the OS Data Hub with an API Key. See for more information.
A text editor like Visual Studio Code or Notepad to edit and save your HTML and JavaScript files.
To enable access to OS APIs an API Key is required. Inside the <script>
tag, add a variable called apiKey
, replacing 'INSERT_API_KEY_HERE'
with the API Key from your project.
Add a variable called collectionID
, replacing 'INSERT_COLLECTIONID_HERE'
with the collection ID for the desired OS NGD feature type and version (for example, bld-fts-buildingpart-1).
Define the configuration options for the map, defining minZoom
, maxZoom
, center
, zoom
, maxBounds
, attributionControl
.
minZoom
and maxZoom
: Sets the minimum and maximum zoom level for the map. Users will not be able to go beyond these levels.
center
: Sets the initial centre point of the map.
zoom
: Sets the initial zoom level of the map.
maxBounds
: Defines the maximum bounds and restricts panning the map.
style
: Defines the style of the map, configured via a URL pointing at the style specified.
attributionControl
: When set to 'false', it hides the attribution control which displays map credits.
Initialize the map with the id
of the <div>
element and the configuration option defined in mapOptions
.
Using the 'L.tileLayer
' method, specify the basemap layer for OS Maps API, which includes your API Key to load the tiles to your map.
Create a function called fetchFeatures
that fetches the API based on the current map extent (bounding box) by generating a bbox string.
Construct the API request URL to fetch OS NGD data from OS NGD API – Features. The URL includes the collectionId
, bbox
and apiKey
.
Once the features have been returned in JSON, update the source data of the map's layers to display the features.
Congratulations! You've successfully created a map using Leaflet and added an OS NGD layer using OS NGD API – Features in a few steps.
Now you can continue to explore Ordnance Survey's to learn more about advanced features and functionality, such as adding markers, pop-ups, and additional layers.
Accessing OS NGD API – Features via OpenLayers
is a free and open-source JavaScript library for displaying interactive maps on the web. It is a powerful tool that can be used to create a wide variety of map-based applications, from simple web maps to complex GIS applications.
OpenLayers is easy to use and can be integrated with a variety of other web development frameworks.
OS Maps API and OS NGD API – Features added to an API project in the OS Data Hub with an API Key. See for more information.
A text editor like Visual Studio Code or Notepad to edit and save your HTML and JavaScript files.
To enable access to OS APIs an API Key is required. Inside the <script>
tag, add a variable called apiKey
, replacing 'INSERT_API_KEY_HERE'
with the API Key from your project.
Add a variable called collectionId
, replacing 'INSERT_COLLECTIONID_HERE'
with the collection ID for the desired OS NGD feature type and version (for example, bld-fts-buildingpart-1).
Create a source for the basemap layer using OS Maps API and initialise the ol.map
class with the applicable map properties – target
, layers
and view
. Add the following code inside the JavaScript block:
The above code creates the main map instance using the OpenLayers library where you can specify various properties:
target
: Defines where the map should be displayed. In this instance, it is set to the id
of the <div>
element.
layers
: An array containing the layers to be added to the map.
view
: Defines the initial view of the main, containing various settings such as projection, extent (the geographic bounds of the map), minimum and maximum zoom levels, centre of the map and the initial zoom level.
Define and initialise the source using the ol.source.Vector
class to make a request to OS NGD API – Features. By utilising the ol.loadingstrategy.bbox
this means that data from OS NGD API – Features will be loaded based on the visible map extent.
To create a separate layer to overlay OS NGD data onto the map, you will need to add the ngdFeatures
layers to the ol.map
object to render both layers on the map.
Features within the viewport extent will load initially (first 100 features) and will continue to load as you pan across the map.
Congratulations! You've successfully created a map using OpenLayers and added an OS NGD layer using OS NGD API – Features in a few steps.
Now you can continue to explore Ordnance Survey's to learn more about advanced features and functionality, such as adding markers, pop-ups, and additional layers.
Accessing OS NGD API – Features via MapLibre GL JS
is a free and powerful JavaScript library for displaying interactive maps on the web. It's based on Mapbox GL JS and provides a wide range of features for creating maps with custom styles, markers and interactivity.
OS Maps API and OS NGD API – Features added to an API project in the OS Data Hub with an API Key. See for more information.
A text editor like Visual Studio Code or Notepad to edit and save your HTML and JavaScript files.
To enable access to OS APIs an API Key is required. Inside the <script>
tag, add a variable called apiKey
, replacing 'INSERT_API_KEY_HERE'
with the API Key from your project.
Add a variable called collectionId
, replacing 'INSERT_COLLECTIONID_HERE'
with the collection ID for the desired OS NGD feature type and version (for example, bld-fts-buildingpart-1).
To add the OS Maps API, you will need to define the map style using MapLibre GL JS's format. This specifies the source of map tiles, which will be retrieved from OS Maps API in the 'Light' raster tiles style.
Initialise the map object using the maplibregl.Map
class to configure the basemap layer and define its properties – container
, minZoom
, maxZoom
, maxBounds
, style
, center
and zoom
.
Add navigation controls to the map, excluding the compass button and disabling map rotation.
The above code creates the main map instance using the MapLibre GL JS library where you can specify various properties:
container
: Defines where the map should be displayed. In this instance, it is set to the id
of the <div>
element.
minZoom
and maxZoom
: Sets the minimum and maximum zoom level for the map. Users will not be able to go beyond these levels.
maxBounds
: Defines the maximum bounds and restricts panning the map.
style
: Defines the style of the map, configured via a URL pointing at the style specified.
center
: Sets the initial centre point of the map.
zoom
: Sets the initial zoom level of the map.
Create an empty GeoJSON placeholder to hold the feature objects called by OS NGD API – Features.
Create a function called fetchFeatures
that fetches the API based on the current map extent (bounding box) by generating a bbox string.
Construct the API request URL to fetch OS NGD data from OS NGD API – Features. The URL includes the collectionId
, bbox
and apiKey
.
Once the features have been returned in JSON, update the source data of the map's layers to display the features.
Event listeners are triggered when the map loads and finishes moving (panning or zooming) to load and update features based on the map's updated extent. Inside the map.on('load',...)
event handler, we add styles for various types of features, including polygons, linestrings and points so that any collectionId
specified will render.
The map.on('moveend',...)
event handler will then fetch and update the features based on the map's current extent.
Features within the viewport extent will load initially (first 100 features) and will continue to load as you pan and zoom across the map.
Congratulations! You've successfully created a map using MapLibre GL JS and added an OS NGD layer using OS NGD API – Features in a few steps.
Now you can continue to explore Ordnance Survey's to learn more about advanced features and functionality, such as adding markers, pop-ups, and additional layers.
Accessing OS NGD data with OS NGD API – Features via QGIS
QGIS is an open GIS (Geospatial Information System) desktop application that allows you to display, interrogate, visualise and create geospatial information including from geo-centric APIs (for example, a WFS).
The instructions that follow demonstrate how to connect to OS NGD API – Features using QGIS.
QGIS (version 3.12.0 or later).
A preloaded basemap, for example, or .
OS NGD API – Features added to an API project in the OS Data Hub with an API Key. See for more information.
In the Data Source Manager | WFS / OGC API - Features dialog click New and in the New WFS Connection dialog:
Name: Provide a name for the connection. You can reuse this connection in the future.
URL: Copy the OS NGD API – Features endpoint address from the OS Data Hub and paste it into this field.
Your API Key is automatically appended to this URL in the key
parameter.
Authentication: Leave these settings at their defaults. You do not need a username or password as authentication is done through your API Key.
Version: Click Detect to identify the version.
Enable feature paging: Select this option, if necessary.
Page size: Enter a maximum page size.
This limits the page size to a maximum number of features. We recommend a setting of about 100
to speed up response times. Larger values may result in a very slow response time.
Other: Leave the other settings at their defaults.
Click OK.
Data Source Manager | WFS / OGC API - Features dialog:
Select your new connection in the dropdown, if necessary.
Click Connect.
When you click Connect, a list of layers available in OS NGD API – Features populates in the main box:
To add a layer to the map: Select the layer to highlight it. You can select multiple layers by using the Ctrl key.
As best practice, only load layers that relate to your current task – not all layers. The more features you call, the longer it takes to load them into QGIS. In addition, each feature, regardless of its layer, counts towards your .
Only request features overlapping the view extent: Select this option.
Click Add.
The layer will then display in the Layers panel and the data will display on the map:
Increased data update frequency
You can access OS NGD themes of data which are updated up to daily.
Rich attribution
Access OS NGD data that has been enriched with attribution to ensure that it's straightforward to navigate and query.
New, easier ways to access data
OS NGD API – Features gives you direct, online access to the OS NGD and schemas using the latest OGC API – Features standard.
Choose exactly what data you take
Access the OS NGD feature type you need rather than taking pre-selected OS products and filter only what is important to you.
Accessing OS NGD API – Features via Python (Geopandas)
This example will provide an introduction on how to use OS NGD API – Features to extract and plot OS NGD data! We’ll be using GeoPandas, a library that builds on Pandas to help manage and analyse spatial data.
OS NGD API – Features added to an API project in the OS Data Hub with an API Key. See for more information.
More examples in an executable notebook format are available through our OS APIs Python wrapper.
OS NGD API – Tiles offers you a vector tile service powered by the OS NGD. It provides a detailed and customisable basemap that's based on the latest OGC API – Tiles standard to help you create stunning and interactive web maps. It can be used with most web mapping libraries, including OpenLayers, MapLibre GL JS and Leaflet. The major benefit of vector tiles is that they are optimised for use across the internet and are therefore great for building interactive web maps that allow users to zoom, pan, rotate, tilt and more.
You have a choice between using Ordnance Survey styles or creating your own. You can customise the content and style to create a professional-looking map that perfectly meets your needs, matches your branding, and pleases your customers.
OS NGD API – Tiles is available in two projections: British National Grid for Great Britain (GB) data and Web Mercator, a global coordinate system.
You can:
Use it as a basemap in GIS, web or mobile applications.
View the whole of Great Britain in unrivalled detail.
Seamlessly pan, zoom, pitch and tilt the map.
Overlay your own data on the basemap to give geographic context to your data.
Trace over OS NGD (Premium Data) detailed geometries.
Customise the map style and content to create the map you need.
Access maps in different projections: British National Grid and Web Mercator.
You can't:
Retrieve all the detailed attribution from OS NGD data.
Access data from the:
OS NGD Address Theme
OS NGD Routing and Asset Management Information (RAMI) Collection (of the OS NGD Transport Theme)
If you are interested in addressing information, OS Places API provides a detailed view of an address and its lifecycle, giving you direct access to rich address data for geocoding, postcode searching, form-filling and much more.
OS NGD API – Tiles Technical Specification provides an overview of the endpoints available, as well as the parameters that can be used with each endpoint. The Technical Specification is intended to be used by customers who want to integrate with the API. Click into each endpoint to learn more.
Accessing OS NGD data with OS NGD API – Features via ESRI ArcGIS Pro
ESRI ArcGIS Pro is a desktop geographic information system (GIS) application that allows users to maintain, visualise and analyse spatial data.
The instructions that follow demonstrate how to connect to OS NGD API – Features using ESRI ArcGIS Pro.
ESRI ArcGIS Pro (version 3.4.0 or later).
A preloaded base map, for example, or .
OS NGD API – Features added to an API project in the OS Data Hub with an API Key. See for more information.
In the Add OGC API Server Connection dialog:
Server URL: Enter the URL for OS NGD API – Features, excluding the API Key. For example, https://api.os.uk/features/ngd/ofa/v1.
Select Custom request parameters and enter the following:
Parameter: key
Value: [Insert your OS API Key here]
Click OK.
You can explore the available layers in OS NGD API – Features by using the ArcGIS Pro Catalog panel.
In the Catalog panel:
To add a layer to the map: Right-click on a layer and select Add to Current Map.
In the pop-up Add OGC API Layer(s) dialog:
Set the maximum features returned: Set the maximum number of features to be displayed (we suggest 1000).
To specify the extent:
Select the Use Spatial Extent checkbox.
Get extent from: Select Current visible extent.
Click OK to load the features onto the map.
The layer will then display in the Contents panel and the data will display on the map:
Features will not automatically refresh when you zoom or pan on the map. This is purposely designed to protect the API from unnecessary spikes in usage.
If the extent of the screen changes and you need to update the features displayed, right-click on the layer in the Contents panel, then select the OGC Features property for the layer, re-click Current visible extent, and click Apply and OK. This will force ESRI ArcGIS Pro to send a new request to the API and load features based on the new extent.
Accessing OS NGD data with OS NGD API – Tiles via Cadcorp SIS
The Cadcorp Spatial Information System® (Cadcorp SIS®) is an integrated family of geospatial products comprising desktop, web, and developer applications.
Cadcorp SIS Desktop connects directly to the OS Data Hub through dedicated wizards.
Cadcorp SIS (version SIS 9.1 or later).
OS NGD API – Tiles added to an API project in the OS Data Hub with an API Key. See for more information.
These instructions are based on Cadcorp SIS Desktop version 9.1.2109.64.
In the Overlay Types dialog:
Select Ordnance Survey (GB) > OS (GB) Data Hub, and then click Next.
In the OS (GB) Data Hub dialog:
Select OS National Geographic Database (NGD) API – Tiles.
API Key: Enter your API key.
Premium/Public Sector Plan: Select this option if you have this plan.
Save in the UI settings database (encrypted): Select this option.
Click Next.
Accessing OS NGD API – Tiles via Leaflet
is an open-source JavaScript library for displaying interactive maps on the web or mobile. A simple and lightweight library that will enable you to display and visualise location data and build dynamic applications.
OS NGD API – Tiles added to an API project in the OS Data Hub with an API Key. See for more information.
A text editor like Visual Studio Code or Notepad to edit and save your HTML and JavaScript files.
To enable access to OS APIs an API Key is required. Inside the <script>
tag, add a variable called apiKey
, replacing 'INSERT_API_KEY_HERE'
with the API Key from your project.
Inside the <script>
tag, add another variable called collectionId
with the collection ID for the OS NGD API – Tiles basemap – ngd-base
.
We need to intercept and customise the style request, adding a tiles property to provide a correctly formatted URL and ensure authentication through the apiKey
is enabled to make sure that the correct tiles are requested.
Add the following code inside the JavaScript block:
Initialize the map object using the L.Map
class to configure the vector tile layer and the mapOptions
variable to define its properties – minZoom
, maxZoom
, maxBounds
, center
and zoom
.
The above code creates the main map instance using the Leaflet library where you can specify various properties:
minZoom
and maxZoom
: Sets the minimum and maximum zoom level for the map. Users will not be able to go beyond these levels.
maxBounds
: Defines the maximum bounds and restricts panning the map.
center
: Sets the initial centre point of the map.
zoom
: Sets the initial zoom level of the map.
Congratulations! You've successfully created a vector map using Leaflet using OS NGD API – Tiles in a few steps.
Now you can continue to explore Ordnance Survey's to learn more about advanced features and functionality, such as adding markers, pop-ups, and additional layers.
The following pages provide an overview of how to get started using the OS NGD API – Tiles. They cover the core elements to get started in the most common and .
These pages should be used in conjunction with the more detailed pages within the and .
The following table details the OS NGD datasets that were used to create the OS NGD API – Tiles basemap. The result is a detailed OS basemap that combines and OS NGD data.
Find out more about the hierarchy of OS NGD data .
If you are interested in addressing information, provides a detailed view of an address and its lifecycle, giving you direct access to rich address data for geocoding, postcode searching, form-filling and much more.
The following table details the OS NGD datasets that can be used as overlays to the basemap to add additional information:
The following attribution is available as part of OS NGD API – Tiles:
The map features do not contain every OS NGD feature type, nor the complete list of attribution available within the feature types that are included; we have purposefully only selected feature types and a subset of attribution from them that are useful for visualisation as this keeps the tiles lightweight and quick to render.
The inclusion of unique identifiers (IDs), where available, allows you to cross-reference with the full product, for example, with . Find out more about OS NGD .
Although OS NGD API – Tiles will be updated weekly, the data updates are based on the set (for example, the OS NGD Structure Features Collection currency is daily, whereas the OS NGD Water Network Collection currency is monthly).
Increased data update frequency
OS NGD API – Tiles is updated weekly ensuring you have access to the latest data as quickly as possible.
Beautifully styled basemap, ready to customise
Customise your maps to perfectly meet your needs. You have a choice between using Ordnance Survey styles or creating your own.
Interactive and flexible web maps
Control every aspect of your map with the flexibility to create dynamic interaction with the map and individual features.
Boundary High Water Mark, Ceremonial County, Country, Devolved Parliament Constituency, Devolved Parliament Electoral Region, Electoral Division, GLA Assembly Constituency, Historic County, Historic European Region, Lower Tier Local Authority, Parish Or Community, Polling District, Region, Regional Authority, Upper Tier Local Authority, Ward, Westminster Constituency
asu-bdy
trn-ntwk-railway
wtr-ctch
ngd-base
All
osid, description, name1_text (only applicable to the Named Point, Site and Water Link Set layers), designatedname1_text (only applicable to the Road layer), versionavailablefromdate
asu-bdy
All
osid, description, name1_text (only applicable to the Country layer), name2_text,
pollingdistrictid (only applicable to the Polling District layer), versionavailablefromdate
trn-ntwk-railway
osid, description, railwayuse, operationalstatus, physicallevel, name1_text, versionavailablefromdate
osid, description, versionavailablefromdate
osid,
name1_text,
name2_text,
versionavailablefromdate
wtr-ctch
osid, riverbasindistrictname, versionavailablefromdate
osid, waterbodyname_text, waterbodycategory, versionavailablefromdate
ngd-base
Weekly
asu-bdy
Biannually
trn-ntwk-railway
Monthly
wtr-ctch
Updated as and when updates are received from the authoritative bodies
Accessing OS NGD API – Tiles via OpenLayers
OpenLayers is a free and open-source JavaScript library for displaying interactive maps on the web. It is a powerful tool that can be used to create a wide variety of map-based applications, from simple web maps to complex GIS applications.
OpenLayers is easy to use and can be integrated with a variety of other web development frameworks.
OS NGD API – Tiles added to an API project in the OS Data Hub with an API Key. See Getting started with an API project for more information.
A text editor like Visual Studio Code or Notepad to edit and save your HTML and JavaScript files.
To enable access to OS APIs an API Key is required. Inside the <script>
tag, add a variable called apiKey
, replacing 'INSERT_API_KEY_HERE'
with the API Key from your project.
Inside the <script>
tag, add another variable called collectionId
with the collection ID for the OS NGD API – Tiles basemap – ngd-base
.
To correctly render the vector tiles within OpenLayers, you will need to fetch
the defined EPSG:3857 Tile Matrix Set and style definitions from the OS NGD API – Tiles service. The two endpoints provide information about the structure of the vector tiles and how the styles are to be applied.
A promise.all
is used to process the data to ensure that both requests are completed before proceeding.
Based on the fetched Tile Matrix Set data, a tile grid is defined using the ol.tilegrid.TileGrid class. The tile grid provides information about the resolution, origin and tile sizes to handle the vector tiles correctly.
Add the following code inside the JavaScript block:
Define the a new vector tiles layer and source that will be used to fetch vector tiles from OS NGD API – Tiles. The ol.layer.VectorTile
uses a ol.source.OGCVectorTile
source to retrieve tiles from the API.
After creating the vector layer, you will need to use a style function to ensure that the Ordnance Survey styles are applied to each tile. Use the olms.applyStyle
function to retrieve the style sheets available for the basemap.
Initialize the map object using the ol.map
class to configure the vector tile layer and define its properties – target
, layers
and view
.
The above code creates the main map instance using the OpenLayers library where you can specify various properties:
target
: Defines where the map should be displayed. In this instance it is set to the ID
of the <div>
element.
layers
: An array containing the layers to be added to the map.
view
: Defines the initial view of the main, containing various settings such as projection, extent (the geographic bounds of the map), minimum and maximum zoom levels, centre of the map and the initial zoom level.
Congratulations! You've successfully created a vector map using OpenLayers using OS NGD API – Tiles in a few steps.
Now you can continue to explore Ordnance Survey's code examples to learn more about advanced features and functionality, such as adding markers, pop-ups, and additional layers.
/
/conformance
Get a list of all the available OS NGD feature collections
/collections
Get information about an OS NGD feature collection
/collections/{collectionId}
A known collection ID.
bld-fts-building-1
bld-fts-building-1
, bld-fts-building-2
, bld-fts-building-3
, bld-fts-buildingline-1
, bld-fts-buildingpart-1
, bld-fts-buildingpart-2
, gnm-fts-namedarea-1
, gnm-fts-namedpoint-1
, gnm-fts-namedroadjunction-1
, lnd-fts-land-1
, lnd-fts-land-2
, lnd-fts-land-3
, lnd-fts-landform-1
, lnd-fts-landformline-1
, lnd-fts-landformpoint-1
, lnd-fts-landpoint-1
, lus-fts-site-1
, lus-fts-site-2
, lus-fts-siteaccesslocation-1
, lus-fts-siteroutingpoint-1
, str-fts-compoundstructure-1
, str-fts-compoundstructure-2
, str-fts-fieldboundary-1
, str-fts-structure-1
, str-fts-structure-2
, str-fts-structure-3
, str-fts-structureline-1
, str-fts-structurepoint-1
, trn-fts-cartographicraildetail-1
, trn-fts-rail-1
, trn-fts-rail-2
, trn-fts-rail-3
, trn-fts-roadline-1
, trn-fts-roadtrackorpath-1
, trn-fts-roadtrackorpath-2
, trn-fts-roadtrackorpath-3
, trn-ntwk-connectinglink-1
, trn-ntwk-connectingnode-1
, trn-ntwk-ferrylink-1
, trn-ntwk-ferrynode-1
, trn-ntwk-ferryterminal-1
, trn-ntwk-path-1
, trn-ntwk-pathlink-1
, trn-ntwk-pathnode-1
, trn-ntwk-pavementlink-1
, trn-ntwk-railwaylink-1
, trn-ntwk-railwaylinkset-1
, trn-ntwk-railwaynode-1
, trn-ntwk-road-1
, trn-ntwk-roadjunction-1
, trn-ntwk-roadlink-1
, trn-ntwk-roadlink-2
, trn-ntwk-roadlink-3
, trn-ntwk-roadnode-1
, trn-ntwk-street-1
, trn-ntwk-tramonroad-1
, trn-rami-averageandindicativespeed-1
, trn-rami-highwaydedication-1
, trn-rami-maintenancearea-1
, trn-rami-maintenanceline-1
, trn-rami-maintenancepoint-1
, trn-rami-reinstatementarea-1
, trn-rami-reinstatementline-1
, trn-rami-reinstatementpoint-1
, trn-rami-restriction-1
, trn-rami-routinghazard-1
, trn-rami-routingstructure-1
, trn-rami-specialdesignationarea-1
, trn-rami-specialdesignationline-1
, trn-rami-specialdesignationpoint-1
, wtr-fts-intertidalline-1
, wtr-fts-tidalboundary-1
, wtr-fts-water-1
, wtr-fts-water-2
, wtr-fts-water-3
, wtr-fts-waterpoint-1
, wtr-ntwk-waterlink-1
, wtr-ntwk-waterlinkset-1
, wtr-ntwk-waternode-1
/collections/{collectionId}/schema
A known collection ID.
bld-fts-building-1
bld-fts-building-1
, bld-fts-building-2
, bld-fts-building-3
, bld-fts-buildingline-1
, bld-fts-buildingpart-1
, bld-fts-buildingpart-2
, gnm-fts-namedarea-1
, gnm-fts-namedpoint-1
, gnm-fts-namedroadjunction-1
, lnd-fts-land-1
, lnd-fts-land-2
, lnd-fts-land-3
, lnd-fts-landform-1
, lnd-fts-landformline-1
, lnd-fts-landformpoint-1
, lnd-fts-landpoint-1
, lus-fts-site-1
, lus-fts-site-2
, lus-fts-siteaccesslocation-1
, lus-fts-siteroutingpoint-1
, str-fts-compoundstructure-1
, str-fts-compoundstructure-2
, str-fts-fieldboundary-1
, str-fts-structure-1
, str-fts-structure-2
, str-fts-structure-3
, str-fts-structureline-1
, str-fts-structurepoint-1
, trn-fts-cartographicraildetail-1
, trn-fts-rail-1
, trn-fts-rail-2
, trn-fts-rail-3
, trn-fts-roadline-1
, trn-fts-roadtrackorpath-1
, trn-fts-roadtrackorpath-2
, trn-fts-roadtrackorpath-3
, trn-ntwk-connectinglink-1
, trn-ntwk-connectingnode-1
, trn-ntwk-ferrylink-1
, trn-ntwk-ferrynode-1
, trn-ntwk-ferryterminal-1
, trn-ntwk-path-1
, trn-ntwk-pathlink-1
, trn-ntwk-pathnode-1
, trn-ntwk-pavementlink-1
, trn-ntwk-railwaylink-1
, trn-ntwk-railwaylinkset-1
, trn-ntwk-railwaynode-1
, trn-ntwk-road-1
, trn-ntwk-roadjunction-1
, trn-ntwk-roadlink-1
, trn-ntwk-roadlink-2
, trn-ntwk-roadlink-3
, trn-ntwk-roadnode-1
, trn-ntwk-street-1
, trn-ntwk-tramonroad-1
, trn-rami-averageandindicativespeed-1
, trn-rami-highwaydedication-1
, trn-rami-maintenancearea-1
, trn-rami-maintenanceline-1
, trn-rami-maintenancepoint-1
, trn-rami-reinstatementarea-1
, trn-rami-reinstatementline-1
, trn-rami-reinstatementpoint-1
, trn-rami-restriction-1
, trn-rami-routinghazard-1
, trn-rami-routingstructure-1
, trn-rami-specialdesignationarea-1
, trn-rami-specialdesignationline-1
, trn-rami-specialdesignationpoint-1
, wtr-fts-intertidalline-1
, wtr-fts-tidalboundary-1
, wtr-fts-water-1
, wtr-fts-water-2
, wtr-fts-water-3
, wtr-fts-waterpoint-1
, wtr-ntwk-waterlink-1
, wtr-ntwk-waterlinkset-1
, wtr-ntwk-waternode-1
/collections/{collectionId}/queryables
A known collection ID.
bld-fts-building-1
bld-fts-building-1
, bld-fts-building-2
, bld-fts-building-3
, bld-fts-buildingline-1
, bld-fts-buildingpart-1
, bld-fts-buildingpart-2
, gnm-fts-namedarea-1
, gnm-fts-namedpoint-1
, gnm-fts-namedroadjunction-1
, lnd-fts-land-1
, lnd-fts-land-2
, lnd-fts-land-3
, lnd-fts-landform-1
, lnd-fts-landformline-1
, lnd-fts-landformpoint-1
, lnd-fts-landpoint-1
, lus-fts-site-1
, lus-fts-site-2
, lus-fts-siteaccesslocation-1
, lus-fts-siteroutingpoint-1
, str-fts-compoundstructure-1
, str-fts-compoundstructure-2
, str-fts-fieldboundary-1
, str-fts-structure-1
, str-fts-structure-2
, str-fts-structure-3
, str-fts-structureline-1
, str-fts-structurepoint-1
, trn-fts-cartographicraildetail-1
, trn-fts-rail-1
, trn-fts-rail-2
, trn-fts-rail-3
, trn-fts-roadline-1
, trn-fts-roadtrackorpath-1
, trn-fts-roadtrackorpath-2
, trn-fts-roadtrackorpath-3
, trn-ntwk-connectinglink-1
, trn-ntwk-connectingnode-1
, trn-ntwk-ferrylink-1
, trn-ntwk-ferrynode-1
, trn-ntwk-ferryterminal-1
, trn-ntwk-path-1
, trn-ntwk-pathlink-1
, trn-ntwk-pathnode-1
, trn-ntwk-pavementlink-1
, trn-ntwk-railwaylink-1
, trn-ntwk-railwaylinkset-1
, trn-ntwk-railwaynode-1
, trn-ntwk-road-1
, trn-ntwk-roadjunction-1
, trn-ntwk-roadlink-1
, trn-ntwk-roadlink-2
, trn-ntwk-roadlink-3
, trn-ntwk-roadnode-1
, trn-ntwk-street-1
, trn-ntwk-tramonroad-1
, trn-rami-averageandindicativespeed-1
, trn-rami-highwaydedication-1
, trn-rami-maintenancearea-1
, trn-rami-maintenanceline-1
, trn-rami-maintenancepoint-1
, trn-rami-reinstatementarea-1
, trn-rami-reinstatementline-1
, trn-rami-reinstatementpoint-1
, trn-rami-restriction-1
, trn-rami-routinghazard-1
, trn-rami-routingstructure-1
, trn-rami-specialdesignationarea-1
, trn-rami-specialdesignationline-1
, trn-rami-specialdesignationpoint-1
, wtr-fts-intertidalline-1
, wtr-fts-tidalboundary-1
, wtr-fts-water-1
, wtr-fts-water-2
, wtr-fts-water-3
, wtr-fts-waterpoint-1
, wtr-ntwk-waterlink-1
, wtr-ntwk-waterlinkset-1
, wtr-ntwk-waternode-1
/collections/{collectionId}/items
A known collection ID.
bld-fts-building-1
bld-fts-building-1
, bld-fts-building-2
, bld-fts-building-3
, bld-fts-buildingline-1
, bld-fts-buildingpart-1
, bld-fts-buildingpart-2
, gnm-fts-namedarea-1
, gnm-fts-namedpoint-1
, gnm-fts-namedroadjunction-1
, lnd-fts-land-1
, lnd-fts-land-2
, lnd-fts-land-3
, lnd-fts-landform-1
, lnd-fts-landformline-1
, lnd-fts-landformpoint-1
, lnd-fts-landpoint-1
, lus-fts-site-1
, lus-fts-site-2
, lus-fts-siteaccesslocation-1
, lus-fts-siteroutingpoint-1
, str-fts-compoundstructure-1
, str-fts-compoundstructure-2
, str-fts-fieldboundary-1
, str-fts-structure-1
, str-fts-structure-2
, str-fts-structure-3
, str-fts-structureline-1
, str-fts-structurepoint-1
, trn-fts-cartographicraildetail-1
, trn-fts-rail-1
, trn-fts-rail-2
, trn-fts-rail-3
, trn-fts-roadline-1
, trn-fts-roadtrackorpath-1
, trn-fts-roadtrackorpath-2
, trn-fts-roadtrackorpath-3
, trn-ntwk-connectinglink-1
, trn-ntwk-connectingnode-1
, trn-ntwk-ferrylink-1
, trn-ntwk-ferrynode-1
, trn-ntwk-ferryterminal-1
, trn-ntwk-path-1
, trn-ntwk-pathlink-1
, trn-ntwk-pathnode-1
, trn-ntwk-pavementlink-1
, trn-ntwk-railwaylink-1
, trn-ntwk-railwaylinkset-1
, trn-ntwk-railwaynode-1
, trn-ntwk-road-1
, trn-ntwk-roadjunction-1
, trn-ntwk-roadlink-1
, trn-ntwk-roadlink-2
, trn-ntwk-roadlink-3
, trn-ntwk-roadnode-1
, trn-ntwk-street-1
, trn-ntwk-tramonroad-1
, trn-rami-averageandindicativespeed-1
, trn-rami-highwaydedication-1
, trn-rami-maintenancearea-1
, trn-rami-maintenanceline-1
, trn-rami-maintenancepoint-1
, trn-rami-reinstatementarea-1
, trn-rami-reinstatementline-1
, trn-rami-reinstatementpoint-1
, trn-rami-restriction-1
, trn-rami-routinghazard-1
, trn-rami-routingstructure-1
, trn-rami-specialdesignationarea-1
, trn-rami-specialdesignationline-1
, trn-rami-specialdesignationpoint-1
, wtr-fts-intertidalline-1
, wtr-fts-tidalboundary-1
, wtr-fts-water-1
, wtr-fts-water-2
, wtr-fts-water-3
, wtr-fts-waterpoint-1
, wtr-ntwk-waterlink-1
, wtr-ntwk-waterlinkset-1
, wtr-ntwk-waternode-1
The optional bbox parameter specifies a supported bounding box. Only features that have a geometry that intersects the bounding box are selected. The bounding box is provided as four comma-separated numbers: Lower left corner, coordinate axis 1 (e.g. min x axis) Lower left corner, coordinate axis 2 (e.g. min y axis) Upper right corner, coordinate axis 1 (e.g. max x axis) Upper right corner, coordinate axis 2 (e.g. max y axis)The default coordinate reference system of the values is WGS 84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84) unless a different coordinate reference system is specified in the parameter bbox-crs
.
[-0.183678,51.474968,-0.068321,51.540143]
The coordinate reference system of the bbox
parameter. It must be a 2D coordinate reference system supported by the collection. Default is WGS84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84).
http://www.opengis.net/def/crs/OGC/1.3/CRS84
, http://www.opengis.net/def/crs/EPSG/0/27700
, http://www.opengis.net/def/crs/EPSG/0/4326
, http://www.opengis.net/def/crs/EPSG/0/3857
The coordinate reference system of the response geometries. It must be a coordinate reference system supported by the collection. Default is WGS84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84).
http://www.opengis.net/def/crs/OGC/1.3/CRS84
, http://www.opengis.net/def/crs/EPSG/0/27700
, http://www.opengis.net/def/crs/EPSG/0/4326
, http://www.opengis.net/def/crs/EPSG/0/3857
, http://www.opengis.net/def/crs/EPSG/0/7405
Either a local date, a date-time with UTC time zone (Z) or an open or closed interval. Open ranges in time intervals at the start or end are supported using a double-dot (..) or an empty string for the start/end. Date and time expressions adhere to RFC 3339. Examples:A date-time: '2021-12-12T23:20:50Z'A closed interval: '2021-12-12T00:00:00Z/2021-12-18T12:31:12Z'Open intervals: '2021-12-12T00:00:00Z/..' or '../2021-12-18T12:31:12Z'An interval until now: '2018-02-12T00:00:00Z/..' or '2018-02-12T00:00:00Z/'Selects features that have a temporal property that intersects the value of the parameter.
2018-02-12T00:00:00Z/..
The optional limit parameter limits the number of items that are presented in the response document. Minimum = 1. Maximum = 100. Default = 100.
The optional offset parameter skips past the specified number of features in the collection. Minimum = 0. Default = 0.
The optional filter parameter is a filter expression in CQL format which is applied when retrieving resources to determine which resources are included in a result set.
Specify which of the supported CRSs to use to encode geometric values in a filter expression. It must be a 2D coordinate reference system supported by the collection. Default is WGS84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84).
http://www.opengis.net/def/crs/OGC/1.3/CRS84
, http://www.opengis.net/def/crs/EPSG/0/27700
, http://www.opengis.net/def/crs/EPSG/0/4326
, http://www.opengis.net/def/crs/EPSG/0/3857
The optional filter-lang parameter is the specific language used for the filter parameter. Default = cql-text
cql-text
/collections/{collectionId}/items/{featureId}
A known collection ID.
bld-fts-building-1
bld-fts-building-1
, bld-fts-building-2
, bld-fts-building-3
, bld-fts-buildingline-1
, bld-fts-buildingpart-1
, bld-fts-buildingpart-2
, gnm-fts-namedarea-1
, gnm-fts-namedpoint-1
, gnm-fts-namedroadjunction-1
, lnd-fts-land-1
, lnd-fts-land-2
, lnd-fts-land-3
, lnd-fts-landform-1
, lnd-fts-landformline-1
, lnd-fts-landformpoint-1
, lnd-fts-landpoint-1
, lus-fts-site-1
, lus-fts-site-2
, lus-fts-siteaccesslocation-1
, lus-fts-siteroutingpoint-1
, str-fts-compoundstructure-1
, str-fts-compoundstructure-2
, str-fts-fieldboundary-1
, str-fts-structure-1
, str-fts-structure-2
, str-fts-structure-3
, str-fts-structureline-1
, str-fts-structurepoint-1
, trn-fts-cartographicraildetail-1
, trn-fts-rail-1
, trn-fts-rail-2
, trn-fts-rail-3
, trn-fts-roadline-1
, trn-fts-roadtrackorpath-1
, trn-fts-roadtrackorpath-2
, trn-fts-roadtrackorpath-3
, trn-ntwk-connectinglink-1
, trn-ntwk-connectingnode-1
, trn-ntwk-ferrylink-1
, trn-ntwk-ferrynode-1
, trn-ntwk-ferryterminal-1
, trn-ntwk-path-1
, trn-ntwk-pathlink-1
, trn-ntwk-pathnode-1
, trn-ntwk-pavementlink-1
, trn-ntwk-railwaylink-1
, trn-ntwk-railwaylinkset-1
, trn-ntwk-railwaynode-1
, trn-ntwk-road-1
, trn-ntwk-roadjunction-1
, trn-ntwk-roadlink-1
, trn-ntwk-roadlink-2
, trn-ntwk-roadlink-3
, trn-ntwk-roadnode-1
, trn-ntwk-street-1
, trn-ntwk-tramonroad-1
, trn-rami-averageandindicativespeed-1
, trn-rami-highwaydedication-1
, trn-rami-maintenancearea-1
, trn-rami-maintenanceline-1
, trn-rami-maintenancepoint-1
, trn-rami-reinstatementarea-1
, trn-rami-reinstatementline-1
, trn-rami-reinstatementpoint-1
, trn-rami-restriction-1
, trn-rami-routinghazard-1
, trn-rami-routingstructure-1
, trn-rami-specialdesignationarea-1
, trn-rami-specialdesignationline-1
, trn-rami-specialdesignationpoint-1
, wtr-fts-intertidalline-1
, wtr-fts-tidalboundary-1
, wtr-fts-water-1
, wtr-fts-water-2
, wtr-fts-water-3
, wtr-fts-waterpoint-1
, wtr-ntwk-waterlink-1
, wtr-ntwk-waterlinkset-1
, wtr-ntwk-waternode-1
A feature ID which is the identifier(id) for the feature.
11111111-1111-1111-1111-111111111111
The coordinate reference system of the response geometries. It must be a coordinate reference system supported by the collection. Default is WGS84 longitude/latitude (http://www.opengis.net/def/crs/OGC/1.3/CRS84).
http://www.opengis.net/def/crs/OGC/1.3/CRS84
, http://www.opengis.net/def/crs/EPSG/0/27700
, http://www.opengis.net/def/crs/EPSG/0/4326
, http://www.opengis.net/def/crs/EPSG/0/3857
, http://www.opengis.net/def/crs/EPSG/0/7405
Accessing OS NGD data with OS NGD API – Tiles via QGIS
QGIS is an open GIS (Geospatial Information System) desktop application that allows you to display, interrogate, visualise and create geospatial information including from geo-centric APIs (for example, a Vector Tiles Service).
The instructions that follow demonstrate how to connect to OS NGD API – Tiles using QGIS.
QGIS (version 3.22.0 or later).
OS NGD API – Tiles added to an API project in the OS Data Hub with an API Key. See Getting started with an API project for more information.
In the Data Source Manager | Vector Tile dialog:
Click New
Select New Generic Connection...
In the Data Source Manager | Vector Tile dialog:
Name: Provide a name for the connection.
URL: Input the Retrieve Tile request URL for the OS NGD API – Tiles collection.
Min. and Max. Zoom Levels: Set these as follows based on your preferred projection:
Web Mercator (EPSG: 3857): Min Zoom = 6; Max Zoom = 19
British National Grid (BNG: EPSG: 27700): Min Zoom = 0; Max Zoom = 15
Style URL: Input the Retrieve Style request URL for the OS NGD API – Tiles collection.
Authentication: Leave these settings at their defaults.
Other: Leave all other settings at their defaults.
Click OK.
To retrieve tiles and style them appropriately, you will need two URLs. The URLs have slight variations based on the collection ID and projection.
Here are some example URLs to retrieve the basemap (ngd-base) in Web Mercator (EPSG: 3857):
https://api.os.uk/maps/vector/ngd/ota/v1/collections/ngd-base/styles/3857?key={INSERT_YOUR_API_KEY}
To learn more about the available collections in OS NGD API – Tiles, you can view what data is available .
Please note: You will need to replace the /{tileMatrix}/{tileRow}/{tileCol} used in the default 'retrieve tile' URL with /{z}/{y}/{x} to be able to connect to OS NGD API – Tiles.
Accessing OS NGD API – Tiles via MapLibre GL JS
is a free and powerful JavaScript library for displaying interactive maps on the web. It's based on Mapbox GL JS and provides a wide range of features for creating maps with custom styles, markers and interactivity.
OS NGD API – Tiles added to an API project in the OS Data Hub with an API Key. See for more information.
A text editor like Visual Studio Code or Notepad to edit and save your HTML and JavaScript files.
To enable access to OS APIs an API Key is required. Inside the <script>
tag, add a variable called apiKey
, replacing 'INSERT_API_KEY_HERE'
with the API Key from your project.
Inside the <script>
tag, add another variable called collectionId
with the collection ID for the OS NGD API – Tiles basemap – ngd-base
.
We need to intercept and customise the style request, adding a tiles
property to provide a correctly formatted URL and ensuring authentication through the apiKey
is enabled to make sure that the correct tiles are requested.
Add the following code inside the JavaScript block:
Initialise the map object using the maplibregl.Map
class to configure the vector tile layer and define its properties – container
, minZoom
, maxZoom
, maxBounds
, style
, center
and zoom
.
Add navigation controls to the map, excluding the compass button and disabling map rotation.
The above code creates the main map instance using the MapLibre GL JS library where you can specify various properties:
container
: Defines where the map should be displayed. In this instance, it is set to the ID
of the <div>
element.
minZoom
and maxZoom
: Sets the minimum and maximum zoom level for the map. Users will not be able to go beyond these levels.
maxBounds
: Defines the maximum bounds and restricts panning the map.
style
: Defines the style of the map, configured via a URL pointing at the default style for the 'collectionId
' defined.
center
: Sets the initial centre point of the map.
zoom
: Sets the initial zoom level of the map.
Congratulations! You've successfully created a vector map using MapLibre GL JS using OS NGD API – Tiles in a few steps.
Now you can continue to explore Ordnance Survey's to learn more about advanced features and functionality, such as adding markers, pop-ups, and additional layers.
/
/conformance
/collections
/collections/{collectionId}
Local identifier of a collection
ngd-base
, asu-bdy
, wtr-ctch
, trn-ntwk-railway
/tilematrixsets
/tilematrixsets/{tileMatrixSetId}
Identifier for a supported TileMatrixSet
3857
, 27700
/collections/{collectionId}/tiles
Local identifier of a collection
ngd-base
, asu-bdy
, wtr-ctch
, trn-ntwk-railway
/collections/{collectionId}/tiles/{tileMatrixSetId}
Local identifier of a collection
ngd-base
, asu-bdy
, wtr-ctch
, trn-ntwk-railway
Identifier for a supported TileMatrixSet
3857
, 27700
/collections/{collectionId}/tiles/{tileMatrixSetId}//{tileMatrix}//{tileRow}//{tileCol}
Identifier selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile.
15
Row index of the tile on the selected TileMatrix.
11179
Column index of the tile on the selected TileMatrix.
16558
Local identifier of a collection
ngd-base
, asu-bdy
, wtr-ctch
, trn-ntwk-railway
Identifier for a supported TileMatrixSet
3857
, 27700
/collections/{collectionId}/tiles/{tileMatrix}//{tileRow}//{tileCol}
Identifier selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile.
15
Row index of the tile on the selected TileMatrix.
11179
Column index of the tile on the selected TileMatrix.
16558
Local identifier of a collection
ngd-base
, asu-bdy
, wtr-ctch
, trn-ntwk-railway
/collections/{collectionId}/styles
Local identifier of a collection
ngd-base
, asu-bdy
, wtr-ctch
, trn-ntwk-railway
/collections/{collectionId}/styles/{styleId}
Local identifier of a collection
ngd-base
, asu-bdy
, wtr-ctch
, trn-ntwk-railway
An identifier representing a specific style.
3857
, 27700
/collections/{collectionId}/styles/{styleId}//{resourceBaseName}/**
Local identifier of a collection
ngd-base
, asu-bdy
, wtr-ctch
, trn-ntwk-railway
An identifier representing a specific style.
3857
, 27700
Styling resourece base name.
sprites