GMap Hiding Code

Code Snippet

November 7
blog author


GMap Hiding Code

Simple steps to hide and view GMap. More information about this topic is on this blog post.

When hiding, try to avoid using the hide function. Instead of hiding it, move the view off screen with:

$(this).css("position", "absolute");
$(this).css("left", "-10000px");

This will keep the view as if it is still on the screen. But it will be out of the view area so nobody can really see it. When you need to show it just move it back with

$(this).css("position", "relative");
$(this).css("left", "0px");

and the view should now display at the position where you want it to show.