JavaScript - How to change a dom node back to an existing Google Map?
Posted
by
David Robertson
on Stack Overflow
See other posts from Stack Overflow
or by David Robertson
Published on 2012-04-01T17:25:51Z
Indexed on
2012/04/01
17:29 UTC
Read the original article
Hit count: 386
I set a div to a class which shows a spinning animated when the map is loading some data, the question is, how can I set the div back to the map (I don't want to load a new map, but load the existing one, which is assigned to a var 'map')?
//map is assigned originally like this:
map = new google.maps.Map(document.getElementById('map3'),options);
//animated graphic is assigned to map div on load of data:
document.getElementById('map3').className = "loading";
but how to get the map back?
Thanks for any tips!
David
© Stack Overflow or respective owner