Gmap center and resize when block is collapsed

When you have a problem with google map when hiding or collapsing it within a block you need to do something to fix this. A way to do this is to make gmap block absolute in position and -10000 px in left like

    position: absolute;
   left: -10000px;

and then use jquery to show it with js script


and finally map is fixed and working.