From OS OpenData developer wiki
How to contribute examples?
- osmap <div> should be max width: 600px; height: 400px.
- Add a description of the example in your email.
- Associated files i.e. csv, png, jpg, gpx, xml can be provided.
- No external links in examples please.
- If you want to add a link to your website, please use the Application Gallery section on the OpenSpace forum.
Basic Map Examples
You can use a marker to pinpoint a location on the map. The marker can be opened to show images or text. Many markers can be added to a map.
new Add your own marker style.
Add your own content to markers.
Adding more markers. In this case two markers.
Add lots of markers to a map from a .txt file. An example text file is attached. Use eastings, northings, pop up window text.
Same as above but manages the markers by clustering them.
You can show routes on the map by inserting waypoint coordinates within the code. A waypoint is usually where the route changes direction.
You can create your own polygon to show an area of interest. This is similar to creating a route except that, in addition, the polygon is closed and can be coloured in.
This allows you to display a single boundary or many boundaries.
new This example show three District Ward Boundaries. By changing the AREA_TYPE in the code and inserting the ADMIN_UNIT_ID of the area type, you can select multiple boundaries of the same type. To get the admin unit id's you will need to look in the lookup table.
A very useful application of boundary data is to use them to create thematic maps, based upon some external data for example income per ward. Although, this example uses some simple fictictious values, the principles can be applied to real data. The data needs to be held in .csv format and uses a primary key (ADMIN_UNIT_ID) to link to the boundaries.
Overlay the coordinates of the cursor on the map.
new Overlay a .gpx file. In this example the file is called gpxroute.gpx, so just replace it with your own route file.
Allows you to add an overview window on the map. Users can drag around the hashed box in the window to pan the map over larger distances.
Overlay the map with an image file tied to the map.
OS OpenSpace team examples
Select example to get code. Help yourself!
Please note that this example does use up a lot of CPU
The GML file in this code is called gb_outline.gml
OS OpenSpace User's Contributions
Shows data collected from GPX Data Loggers and Route Finders
Shows how maps can be adulterated - SO BEWARE !!!
Use the code snippet linked to by this title to make an OS grid reference. Use getEasting and getNorthing on a MapPoint to get the values to pass in to this, return is a string.
Use the routine linked to by this title to make an OpenSpace MapPoint from a grid reference string (1-5 digits). Return is null if the grid reference is not valid.
There are two sources of free Digital Terrain Matrix data for the UK. The SRTM (google for it) 3 arc second or 90m data and the new OS OpenData 50m DTM.
I have loaded both these data sets on to a Google App Engine service. See the page at  for a demo of the SRTM service, the identical OS OpenData service is at http://openukterrain.appspot.com rather than http://ukterrain.appspot.com. If any OpenSpace users wan't to use these, or their server side source code, please get in touch. I'm not quite sure yet which is the better data set for estimating hike/bike ascent and descent. The OS data will give slightly higher totals than the SRTM.
Google now offer a similar terrain profile service as part of the Google Maps API though you can only use this if you also use the Google Maps API. I believe Google use SRTM data.
See also this demo  which uses SRTM data.
Combining handling of mouse events and overlays, we display a fancy html context menu that appears when the user clicks on the map. The possibilities to use this in interactive applications are endless.