How do I create a show full screen button to toggle my google maps page to be full screen?

后端 未结 5 2031
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 08:54

I have a google map integrated on part of my page. I would like to create a toggle button to toggle the map between full screen and normal size. So when you click on it - th

5条回答
  •  我在风中等你
    2020-12-29 09:33

    If you have a map on your page all you need to do is write some javascript to resize the DIV that holds the map. I haven't implemented an example that resizes the DIV to fill the browser, but here is one that toggles the size of a map div from javascript (I use mooTools to set the style.width on the element, but you can use whatever you prefer to manipulate the DOM).

提交回复
热议问题