September 16, 200917 yr Ok, I've got a situation where I have a database of map references, of the format 'AB 123 456' (i.e. two letters, three numbers, three numbers). I need to display each map reference as a map on a web page. I can achieve a similar sort of thing with Google Maps using a postcode, and that works quite nicely, but I need to use the map reference instead, and Google Maps doesn't seem to know what to do with a map reference. Multimap does know what to do with map references of this type, but I'm having difficulty automating it so that I can just plug in any of my grid references (of which there are around 700). Multimap does give me the option of embedding a map on a web page, but from a little experimental reverse-engineering it's clear that just changing the map reference in the iframe url isn't enough - it's got a map id as well that goes with each map, which presumably they use for their own purposes, and keeping the map id the same and changing the map reference just breaks it. I can't generate the map id myself, by the looks of it, and I haven't found a map API like Google Maps' to be able to get around it. So, any suggestions? What can I try next? Are there any other mapping systems out there that I could try embedding?
September 16, 200917 yr Google Maps use Eastings and Northings like -1.943539, 51.029749 and you should be able to calculate these relative to the map references like AB 345 567. Have a look at the map and see if the info to convert them is there. Eastings are related to the Greenwich meridian so my -1.943539 is west of London; don't know about Northings.
September 16, 200917 yr Author Thanks Wickham. I've actually been able to resolve the problem by finding an online conversion tool to convert the Landranger map reference I've got to Eastings-Northings format that Google Maps will accept. I had to sign up for an API key (which was free), but now nearby.org.uk is doing the conversion on-the-fly and sending the result back to me, which I can then use to plug into the Google Maps API to generate an embedded map. A little long-winded, perhaps, but it works! Yay! When this system is finished and online I'll maybe post about it here so you can all marvel at it...
Create an account or sign in to comment