Jump to the following:

We use cookies to improve this website. Read about cookies

OS OpenSpace Pro technical FAQs

How do I request a small OpenSpace API Build?

OS OpenSpace can be requested in two sizes – the default large size which includes all of the features from OpenLayers and a new small size which excludes the less used features.

The small version can be requested by adding the parameter b=small to your API request:

script src='http://openspace.ordnancesurvey.co.uk/osmapapi/openspace.js?key=INSERT_YOUR_API_KEY_HERE&b=small>

The large size is the default version however this can be specifically requested by adding the parameter b=large

script src='http://openspace.ordnancesurvey.co.uk/osmapapi/openspace.js?key=INSERT_YOUR_API_KEY_HERE&b=large>

To see which features are included or excluded from either build please add the debug parameter debug=true which provides the unminified code including a list of the included and excluded OpenLayers classes.

Which browsers does OS OpenSpace Pro support?

At the moment OS OpenSpace supports IE6+, Firefox 1.5+, Safari 2+ Opera 8+ and Google Chrome 1+.

If you are working in IE8 and have used the web-map builder application, you may come across “display me using modern standards”. To overcome this, you will need to enable and turn on Compatibility View mode for all web pages and websites:

  • click on Tools menu,
  • select Compatibility View Settings.
  • In the “Compatibility View Settings” dialog, tick the check box for Display all websites in Compatibility View option.
  • Click on Close button when done.
I keep getting an 'HTTP referrer' error, why is this?

This is usually because the registered URL is not correctly registered. You need to ensure that you have registered two types of URLs for your application; for example:




If you do need to register an additional url, please email us with your API Key and the URL that you need us to add.

How do I configure OS OpenSpace Pro mapping layer requests?

We have provided a method to request products using Product Codes. If you have an OpenSpace Pro licence, your application can request additional datasets including 1:25k. Each mapping product had a unique product code (see below).

In your OpenSpace code you will need to replace or comment out this piece of code that provides the default products:

//osMap = new OpenSpace.Map('map');

Replace it with code that requests products by Product Code. Its important to insert a correct sequence of product codes i.e Insert small scale products first (most zoomed out). To use product codes correctly they need to be ordered according to resolution, so the resolution order (as represented by the product codes) must be in high to low order.

In the following example, Vector Map District had been included:

var options = {products: ["OV0", "OV1", "OV2", 
"MSR", "MS", "250KR", "250K", "50KR", "50K",
"VMDR", "VMD", "SVR", "SV"]};
osMap = new OpenSpace.Map('map',options); 

In the following example, 50k, Vector Map District and StreetView are shown:

var options = {products: ["50KR", "50K", "VMDR", 
"VMD", "SVR", "SV"]};
osMap = new OpenSpace.Map('map',options);
How do I add 1:25 000 scale mapping?

If you have an OpenSpace Pro contract to licence 1:25k mapping, use the following product code.

var options = {products: "25KR", "25K"]};
osMap = new OpenSpace.Map('map',options);
What are the OpenSpace Pro Product Codes?

In order to achieve a friendly zoomed in/out effect, each product type has a suitable resolution measured in metres per pixel at which it should be viewed in a web application.

Each product type (except Overview maps) has been provided at two zoom levels or resolutions. When a product is Resampled it is twice the original resolution. 'R' denotes a resampled product,.

Mapping layersResolutionIndex
LocalOS StreetView®1SV
OS VectorMap® Local1VML
District1:25 000 Scale Colour Raster2.525K
OS VectorMap® District2.5VMD
Regional1:50 000 Scale Colour Raster550K
1:250 000 Scale Colour Raster25250K
National overviewMiniscale® (1:1M scale)100MS
Overview two500OV2
Overview one1000OV1
Overview zero2500OV0

Zoom Map Stack

Generated from Strategi®896CS00
Generated from Strategi448CS01
Generated from Strategi and Land-Form Panorama®224CS02
Generated from Strategi and Land-Form Panorama112CS03
Generated from Strategi and Land-Form Panorama56CS04
Generated from Strategi and Land-Form Panorama28CS05
Generated from OS VectorMap Disctrict, Strategi and Land-Form Panorama14CS06
Generated from OS VectorMap Disctrict, Strategi and Land-Form Panorama7CS07
Generated from OS VectorMap Disctrict, Strategi and Land-Form Panorama3.5CS08
Generated from OS VectorMap Local1.75CS09
Generated from OS VectorMap Local0.875CS10
Does OS OpenSpace Pro offer any look-ups?

Yes the OS OpenSpace Pro API has three look-ups:

Code-point® Openfor postcode look-up
Boundary-Line™ Datafor boundary information
1:50 000 Scale Gazetteerfor place name search
What are the technical details for the service?

Access Authority
API Key received upon registration.
Protocol - REST based AJAX API

Minimum client script support

Supported Output Formats

Coordinate Reference Systems
British National Grid System (EPSG:27700)

Coordinate Ranges for Coverage
Axis Min Max
X 0 700000
Y 0 1300000

How do I report a bug?

To report an issue because you think that there might be a bug, announce it first in the forum because other developers will then be able to confirm whether or not there is a problem with your code. If the issue cannot be resolved, then the OS OpenSpace Team will investigate it.

How do I debug my code?

Debugging can be done by using the Firebug Lite JavaScript library, obtained at http://www.getfirebug.com/lite.html

The Firebug Lite script must be included before the OS OpenSpace API script, and, depending on the browser using it, must be included from the same domain as your application.

This will then allow the OpenLayers.Console namespace to be used for debugging and error logging. For instance

OpenLayers.Console.log("This is a test");

will display "This is a test" in either the Firebug console (where available) or the Firebug Lite console.

We have also provided a debud a debug facility to inspect un-minified code. To do this add &debug=true to the URL; osopenspacepro.ordnancesurvey.co.uk/osmapapi/openspace.js?key=your_api_key_here&debug=true

How do I call a tile count?

There is also a support service which has a function that can be called to get the current tile count and tile limit. The tile count may be a cached value, but is likely to be accurate to within a few minutes. This function is probably best called when the page is first loaded to check if there are any tiles left and then display some form of error message. The service calls a user-supplied callback function that takes two integer parameters.

To call the service:

var supportService = new OpenSpace.SupportService(); 

The callback function

function tileCountResults(tilesUsed, maxTiles) 
 var s = "Tiles Used: " + tilesUsed + " of " + maxTiles; 
Can I use localhost to develop?

Local host is used for development purposes and OS OpenSpace has been configured to work using local host prior to go live. Once you have completed your development you need to ensure that your registered url is the host url for your website. Once you have checked this you will need to add all your code to your site.

To add your code to your site you can use an ftp client, most hosts/providers supply an ftp service free of charge however some do charge.

Use the ftp client to upload your html file.

Once you have uploaded your html file to a server using an FTP client you will need to add a script to your page. In your web site page, where you want the web-map to appear, insert the following script into the body of the page or blog html editor.

You’ll only need to do this once.

Back to top
© Ordnance Survey 2016
Be sure to take a look at our Terms of Use and Privacy Policy