Lost my way with Google Maps

By | November 29, 2011

Just a quick note about the use of a Javascript alternative to the standard Google IFRAMES option.

I did my map implementation for the Richardsons project using this because I wanted to (a) avoid the markup errors (iframes not available in Strict) and (b) wanted to find out more about the Google Maps API (incidently there are loads of tutorials out there, but the one I used was Google Maps API have a look).

It was initially a bit of a pain in the neck because needed to work out the co-ordinates of the postodes I wanted and also get a handle on the way it worked – but like all these things once you work it out its relatively straightforward (in fact the Google Maps page allows you to get the co-ordinates). The API also allows you to have popups with the location details + put other relevant info on the map – I included local parking info in mine, and this implementation can be seen here.

Also one other thing, getting it to work with javascript off – have a look at the code for the page above, particularly the CSS you will notice a background image on the DIV where the map is loaded… a simple workaround.

A better approach is (probably) to use a Google Maps JQuery – but I didn’t do that, but I may next time. This can be seen in Jim’s coursework.