Create a web application using the OS Vector Tile API

This guide explains how to create a web application using the OS Vector Tile API and the Ordnance Survey GitHub Demo repository.

What you need?

Instructions

1

Download the OS Vector Tile API repository

OS Data Hub API Demos repository on GitHub
  • Click the green Code button and then click Download ZIP.

OS Data Hub API Demos repository Code > Download ZIP option
2

Install the OS Vector Tile API repository

  • Navigate to your downloads page, unzip the OSVectorTileAPI folder from the newly downloaded file and place it in your IDE project repository. When you open your IDE, the new files should appear automatically in your project window. The folders you have installed contain all the code required to call and interact with the code libraries.

UnzippedOSVectorTileAPI folders
  • To launch the web application, navigate to and open the index.html file found in the OpenLayers folder, and then run the application. Methods on how to do this differ between IDEs.

OS VTS API in Aptana Studio 3

Running the project launches a window in your browser that looks like this:

OS Vector Tile API demonstrator displayed in a browser window
3

Using the OS Vector Tile API demo

To use the demo, open up your My projects page on the OS Data Hub and copy your Project API Key. Paste the key into the Project API Key box on the local server demo.

This generates a fully-styled map using the OS Vector Tile API service available for you to explore.

OS Vector Tile API demonstrator displaying an example map

Last updated

Was this helpful?