Google maps api works with browser inspect element

后端 未结 1 1324
情话喂你
情话喂你 2021-01-19 05:41

I\'ve been struggling several day to try to fix google map canves plugin to in my app which uses twitter bootstrap.

The map is to buggy full of grey patches, and it\

相关标签:
1条回答
  • 2021-01-19 06:25

    I'm guessing your map is not shown by default, but code would be helpful. It sounds like you need to trigger resize when the map is shown. See resize under Events for the Map object:

    https://developers.google.com/maps/documentation/javascript/reference#Map

    [Added this script to work]

    $(document).ready(function () { 
      $('#mymodal').on('shown', function () { 
        google.maps.event.trigger(map, 'resize');  
      });   
    });
    
    0 讨论(0)
提交回复
热议问题