Map of Maps

I’ve added a Map of Maps to go alongside my UK O-Events Map page. Both pages look similar as they have the same structural layout and stylesheet. The Map of Maps shows you your nearest orienteering maps registered with BOF, and from this lists your local clubs – possibly useful for someone wanting to join their local club or an existing orienteer moving house.

The Map of Maps page is much slower to render as it has to parse 3000+ maps. For each one it takes the OS grid reference, works out the latitude and longitude* and then the distance from your postcode, before ordering everything to find the 100 closest to you, showing them on a map, and on a handy table with weblinks to each club.

Map of Maps

The main problem remaining is the quality of the source data – there are numerous grid reference mistakes, many maps don’t have grid references at all which means they will never show up – there are spelling and capitalisation inconsistencies, entities listed in the clubs field which are not actually clubs, and older revisions of a particular map remaining alongside the newest one.

Most of these I’ve been able to deal with in an elegant way, by creating my own clubs database table with the appropriate metadata. The one hack I’ve had to leave hardcoded into the page is NOC, which is normally Nottingham Orienteering Club, but is also the National Orienteering Centre for some Scottish maps (and so not a club.) It also appears as NATCEN. Grr!

The initial work is now complete – it took a couple of days of effort, including quite a lot of learning about PHP arrays and lamda functions – I’d managed to get away with not using these before. I also took the opportunity to tidy up my existing code, into something which was more efficient, with a lot less duplication and sloppy coding, which I’ll be able to extend easily for future mashups.

The next feature will be a slightly more intelligent “local club” calculation, based on the number of maps a club has, weighted by their proximity to you, rather than simply the club with the closest map being your “most local club” in the present form. I also need to automate the collection and processing of data from BOF, although this is lower priority as I’m only planning on sync’ing with them every few months, unlike the events map which is sync’d, in theory, on a weekly basis.

Announcement of my original Map of Maps, way back in 2004 – before Google Map Mashups took off.

*Technically minded readers will realise I could do this when doing the initial load of BOF data into my database. I could – it’s on the list, and will be done if the Map of Maps page performance gets worse.

Categorized as Notes


  1. Interesting indeed – at least they’ve marked it as a closed club. Ideally, such maps would have a “club” of SOA instead. (i.e. the official 12 associations could be clubs for the purposes of map ownership. Then there are the unofficial associations, e.g. GMOA, ASOA, BSOA…)

  2. If you’re filtering out schools maps purely by name then you might want to also filter on academy and college.

    Could you add a column to show the grid reference you are using for each map. This would make it easier to spot what the problem is with dodgy refs.

  3. Paul – I’ve added in the gridref column and also marked “academy” and “college” maps as school maps – this affected 50 more maps (~1% of total.)

    I’m also working on a notification mechanism for alerting me of bad gridrefs, and have an override table set up. Having some problems though as my host has removed sendmail. Should be working in a couple of days.

Leave a comment

Your email address will not be published.