Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Google Maps indeed displays "Grey" area's when it's placed inside a dynamic element (for example: One that resizes, fades etc.). You're right about triggering the "resize" function, which should be called once the animation is complete (the <code>shown.bs.modal</code> event in Bootstrap 3 or the <code>shown</code> <a href="http://twitter.github.com/bootstrap/javascript.html#modals" rel="nofollow noreferrer">event</a> in Bootstrap 2):</p> <pre><code>$("#myModal").on("shown.bs.modal", function () { google.maps.event.trigger(map, "resize"); }); </code></pre> <p>In Bootstrap 2, you will do:</p> <pre class="lang-js prettyprint-override"><code>$('#myModal').on('shown', function () { google.maps.event.trigger(map, "resize"); }); </code></pre> <p>(where <code>map</code> is the variable name of your map (see <a href="https://developers.google.com/maps/documentation/javascript/reference#event" rel="nofollow noreferrer">Google Maps documentation</a> for further details), and <code>#myModal</code> the ID from your element).</p> <p><strong>UPDATE 2018-05-22</strong></p> <p>With a new renderer release in version 3.32 of Maps JavaScript API the resize event is no longer a part of <code>Map</code> class.</p> <p>The documentation states</p> <blockquote> <p>When the map is resized, the map center is fixed</p> <ul> <li><p>The full-screen control now preserves center.</p></li> <li><p><strong>There is no longer any need to trigger the resize event manually.</strong></p></li> </ul> </blockquote> <p>source: <a href="https://developers.google.com/maps/documentation/javascript/new-renderer" rel="nofollow noreferrer">https://developers.google.com/maps/documentation/javascript/new-renderer</a></p> <p><code>google.maps.event.trigger(map, "resize");</code> doesn't have any effect starting from version 3.32</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload