Posting an Ordnance Survey route map

This procedure will allow you to publish a GPS tracklog or route as a full screen map on our site. It uses the Ordnance Survey API which is tied to our site but can be freely obtained from the OS. Unfortunately they only allow use of the 1:50k maps and not the more detailed 1:25k. But it’s a start….

  1. Obtain a gpx tracklog file for a route already covered (from a GPS unit or GPS phone) or a GPX of a proposed route (eg from Google Maps, PC software like Memory Map, Tracklogs, etc.)
  2. Upload your GPX file (without spaces in the filename) to the data directory of our FTP site (page only available if you are logged in)
  3. Create a new post or page (or entry in our GPX table).
    1. Switch to the HTML tab at the top of the editor.
    2. Type in a description for the ride.
    3. Highlight the description or the part that you want to underline as a link and click the “link” button in the toolbar.
    4. Type in http://knobblytarmac.co.uk/uploaded/maps/osmap.html followed by ?f=gpxfilename.gpx.
  4. To make the map appear in its own tab (or window, depending on your browser settings), edit the link and add target=blank into the URL, between the quotes after the gpx name and the “>” sign where the description begins. The link section should then look like this example: <a href=”http://knobblytarmac.co.uk/uploaded/maps/osmap.html?f=CleeveHillSun23Jan.gpx” target=”_blank”>OS Map of route</a>
  5. Type up any other notes you want to complete the post/page and publish it as usual.
  6. The script will then load the osmap.html page, look for the corresponding gpx file and display the route or track log on a page of its own. The map will be zoomed in to the maximum level possible to display the whole route on the screen but can be zoomed in or out to show more/less detail. You can also switch to a Google Map by clicking on the link in the RH corner.

Leave a Reply