Showing a Google Map in a modal created with Twitter Bootstrap

前端 未结 11 1068
再見小時候
再見小時候 2020-11-29 17:53

I\'m trying to insert a Google map into a modal using Twitter Bootstrap. The modal shows up with the shape of the map present, but only part of the map is displayed, the res

11条回答
  •  悲&欢浪女
    2020-11-29 18:19

    The accepted answer got rid of the gray boxes, but does not center the map at the right coordinates for me. My solution was just to wait to render the map until after the modal is finished displaying.

    $('#modal').on('shown', function () {
        initialize();
    });
    

提交回复
热议问题