Jump to the following:

Ordnance Survey logo

Discover Ordnance Survey

Site Search

About OS OpenSpace layers and look-up services

The following mapping layers are available with OS OpenSpace

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

The mapping layers are divided into tiles. A tile of data is a square of a digital map with a size between 200 and 256 square pixels. Each OS OpenSpace map is displayed on your screen by joining multiple adjacent tiles.

By default, osMap variable provides the following mapping layers at the following zoom levels or resolutions.

 

Product Name

Zoom level

Resolution

Local

StreetView

10

1

 

StreetView resampled

8

2

District

VectorMap District

 

5

 

VectorMap District Resampled

 

10

Regional

50k raster

8

2.5

 

50k raster Resampled

7

4

 

250k raster

6

25

 

250k raster Resampled

5

50

National

Miniscale

4

100

 

Minsicale Resampled

3

200

 

Overview map 1

2

500

 

Overview map 2

1

1000

 

Overview map 3

0

2500

Using product resolutions to configure map layers
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 Resolution. 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 in high to low order.

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

var options = {resolutions: [2500, 1000, 500, 200, 
100, 50, 25, 10, 5, 4, 2.5, 2, 1]};
osMap = new OpenSpace.Map('map', options);             

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

var options = {resolutions: [10, 5, 4, 2.5, 2, 1]};
osMap = new OpenSpace.Map('map',options);

Look-up services
The API has its own gazetteer look-up service that includes all the place names in the 1:50 000 Scale Gazetteer, which contains over 250 000 entries with every name featured on the 1:50 000 Scale Colour Raster product. (zoom level 7-8).

When you query the gazetteer with the name of the place you need to find, the API will return the matching place name(s) and their National Grid reference.

You can use the gazetteer to search for place name locations up to a 1 000 times every day.

The gazetteer service can be called via an AJAX-style call. There are currently two functions, getLocations() which returns a list of GazetteerEntry objects that contain information about matching placenames, and getLonLat(), which will get the position of the first match.

Example:

var gazetteer = new OpenSpace.Gazetteer();
function searchGazetteer(query)
{
    // Query the gazetteer and call the callback
function
    gazetteer.getLocations(query.value, onResult);
    return false;
}
function onResult(locations)
{
    if (locations != null && locations.length > 0)
    {
        for (var i=0; i < locations.length; i++)
        {
            // Extract result fields
            var name = locations[i].name;
            var county = locations[i].county;
            var location = locations[i].location
            var coordStr = location.toCoordString();
            // Do something with the info
            ……
        }
        // (Or optionally)
        // Set centre of the map to the first point
        osMap.setCenter(locations[0].location, 6);
    }
}

The results of a gazetteer search are returned in order of cities, towns, others, and finally unknowns. Further information on the type can be obtained from the type field of a GazetteerEntry

where:

  • CITY = "C"
  • TOWN = "T"
  • OTHER = "O"
  • ANTIQUITY = "A"
  • FOREST = "F"
  • FARM = "FM"
  • HILL = "H"
  • ROMAN = "R"
  • WATER = "W"
  • UNKNOWN = "X"

Understanding grid references
If you look at the Examples, you will see bits of code similar to:

centrePoint = new OpenSpace.MapPoint(506040, 361635);

The numbers in it, are a type of Our Grid Reference - this type is known as Eastings and Northings

If you do not know about Grid References, start by looking at http://www.ordnancesurvey.co.uk/oswebsite/gi/nationalgrid/nationalgrid.pdf or at http://www.ordnancesurvey.co.uk/oswebsite/gi/nationalgrid/nghelp1.html

To see how you can get from Letters to Numbers, look at our Coordinate overlay information - as you move the mouse around, you will see the numeric Eastings and Northings shown at the top right hand corner of the map.

Finding the location of a place
A postcode look-up service is available with the OS OpenSpace API.

The API will accept a postcode e.g. SO16 4GU and return a single corresponding easting and northing which is the nominal centre of that postcode area.

The API will accept a postal districte.g.SO16 and return a single corresponding easting and northing calculated from the average of the postcodes that relate to the given postal district.

The API will not allow a postal district search of postal districts from Northern Ireland, Jersey, Guernsey or Isle Of Man (postal areas "BT", "JE", "GY", "IM" respectively)

For general enquiries, complaints, feedback or suggestions, email: customerservices@ordnancesurvey.co.uk or call us on 08456 05 05 05