Jump to the following:

By continuing, you agree to the use of cookies by us and third parties, which we use to improve your visit.

OS OnDemand WMTS code playground

Our code playground is an interactive way for you to explore how you can use our code with your own code. You can edit these examples and then download your bespoke code.

Have a play with the code

1. Click on one of the example links below, it will show the end result of the example code.

2. Click on ‘Edit in Code Playground’ to see the HTML and JavaScript codes. You can also click on ‘Real-time preview’ to see the map change as you change the code.

3. Click ‘Render’ to go back to the full view of the map.

4. Click ‘Download’ to download the full code merged into one HTML file, ready for you to use.

You will need to make some small changes, as OS OnDemand WMTS uses product codes rather than resolutions. You will also need to change the API URL to the one provided to you in your welcome pack. Please see OS OnDemand Web Map Tile Service (WMTS) for more information.

Basic Maps

Creating lines and polygons


Administrative Boundaries


Back to top
© Ordnance Survey 2018