Google map modal issue

前端 未结 10 1390
别那么骄傲
别那么骄傲 2020-12-11 02:48

I am trying to display google map into the Twitter bootstrap modal. When user first click on the button Show map then he is able to see the map successfuly as i

10条回答
  •  萌比男神i
    2020-12-11 03:28

    I also had this issue and came up with this easy solution.

    Wait until your modal is completely loaded and then set the timeOut event on map function.

    $('#MyModal').on('loaded.bs.modal',function(e){
       setTimeOut(GoogleMap,500);
    });
    

    I am very sure It will work out in all cases.

提交回复
热议问题