The google map has a problem with the parent "display: none".
initialize your card after showing the modal for the first time. add a class for buttons or links that show modal.
$('.modal-opener-btn').one('click', function(){
NOTICE: use the "one" and do not use the "on"
NOTICE: You can also use the modal "featured" listener if this solution does not work
$('#myModal7').on('shown', function(){
Just change the bottom tag and script contents to:
<script type="text/javascript"> function init(){ var address = 'Japan'; var map = new google.maps.Map(document.getElementById('map'), { zoom: 16 }); var geocoder = new google.maps.Geocoder(); geocoder.geocode({ 'address': address }, function(results, status) { if(status == google.maps.GeocoderStatus.OK) { new google.maps.Marker({ position: results[0].geometry.location, map: map }); google.maps.event.trigger(map, 'resize'); map.setCenter(results[0].geometry.location); } }); } $('#myModal7').on('shown.bs.modal', function(){ init(); }); </script>
source share