Main Content

Ordnance Survey - using a 'Get a map'

Archive - Originally posted on "The Horse's Mouth" - 2005-05-22 18:04:12 - Graham Ellis

Sunday, and a chance to play. I've been interested in the possibilities offered by Ordnance Survey's "Get a map" service - which allows (with limitations described on their site) their mapping to be captured and used on web sites in a not-for-profit way.

I've started to put up a whole load of pictures for visitors to Melksham and the surrounding area and I felt that I would like to be able to show where each of the pictures was taken on a map. So ... I've spent the last hour writing a PHP script to get my maths right.


Image produced from the Ordnance Survey Get-a-map service. Image reproduced with kind permission of Ordnance Survey and Ordnance Survey of Northern Ireland.


For the more technical readers, I've put a copy of the script into our PHP / graphics, etc training area. It takes care of all the letters and digits of a grid reference - e.g. ST914628, and you can give it any map captured from the OS provided that you tell it the centre grid reference of the image and how wide (in kilometres) the area covered is. It does the rest!