add a condition into the loop to check if element already exists before creating it
Thanks. Just gave that ago and got an offsetWidth error.
I tried this line to trigger before the loop.
if(document.getElementById("googleMap") == null)
The problem I think involved this line.
google.maps.event.addDomListener(window, 'load', getLocation);
This function then calls all the other functions connected to load. any thoughts?