<bdo id='SXfy6'></bdo><ul id='SXfy6'></ul>
  • <small id='SXfy6'></small><noframes id='SXfy6'>

  • <legend id='SXfy6'><style id='SXfy6'><dir id='SXfy6'><q id='SXfy6'></q></dir></style></legend>

      <i id='SXfy6'><tr id='SXfy6'><dt id='SXfy6'><q id='SXfy6'><span id='SXfy6'><b id='SXfy6'><form id='SXfy6'><ins id='SXfy6'></ins><ul id='SXfy6'></ul><sub id='SXfy6'></sub></form><legend id='SXfy6'></legend><bdo id='SXfy6'><pre id='SXfy6'><center id='SXfy6'></center></pre></bdo></b><th id='SXfy6'></th></span></q></dt></tr></i><div id='SXfy6'><tfoot id='SXfy6'></tfoot><dl id='SXfy6'><fieldset id='SXfy6'></fieldset></dl></div>
      1. <tfoot id='SXfy6'></tfoot>

        谷歌地图在引导程序中显示为灰色内部模态

        google map appear with grey inside modal in bootstrap(谷歌地图在引导程序中显示为灰色内部模态)
              <bdo id='eZZKQ'></bdo><ul id='eZZKQ'></ul>
                <tfoot id='eZZKQ'></tfoot>

                  <small id='eZZKQ'></small><noframes id='eZZKQ'>

                  <legend id='eZZKQ'><style id='eZZKQ'><dir id='eZZKQ'><q id='eZZKQ'></q></dir></style></legend>
                    <tbody id='eZZKQ'></tbody>

                1. <i id='eZZKQ'><tr id='eZZKQ'><dt id='eZZKQ'><q id='eZZKQ'><span id='eZZKQ'><b id='eZZKQ'><form id='eZZKQ'><ins id='eZZKQ'></ins><ul id='eZZKQ'></ul><sub id='eZZKQ'></sub></form><legend id='eZZKQ'></legend><bdo id='eZZKQ'><pre id='eZZKQ'><center id='eZZKQ'></center></pre></bdo></b><th id='eZZKQ'></th></span></q></dt></tr></i><div id='eZZKQ'><tfoot id='eZZKQ'></tfoot><dl id='eZZKQ'><fieldset id='eZZKQ'></fieldset></dl></div>
                  本文介绍了谷歌地图在引导程序中显示为灰色内部模态的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用Bootstrap v3.3.5"(http://getbootstrap.com)版权所有 2011-2015 Twitter, Inc.对于我的网站,我想添加谷歌地图.我运行这段代码,所有地图都是灰色的.我不明白为什么这不适用于模态.有人可以帮我吗?

                  I use "Bootstrap v3.3.5 (http://getbootstrap.com) Copyright 2011-2015 Twitter, Inc. " for my site and i want to add google-map. I run this code, and all maps is grey. I dont understand why this not work with modal. Can someone help me?

                  我还包含了 <script src="https://maps.googleapis.com/maps/api/js"></script>.

                  HTML:

                  <body>
                    <a class="openmodal" href="#contact" data-toggle="modal" data-id="Peggy Guggenheim Collection - Venice">Contact</a>
                    <div class="modal fade" id="contact" role="dialog">
                      <div class="modal-dialog modal-lg">
                        <div class="modal-content" id="back">
                          <div class="modal-header">
                          <h4>Contact<h4>
                        </div>
                        <div class="modal-body">
                          <div id="map"></div>
                        </div>
                        <div class="modal-footer">
                          <a class="btn btn-default" data-dismiss="modal">Close</a>
                        </div>
                    </div>
                  </div>
                  

                  JS:

                  <script src="https://maps.googleapis.com/maps/api/js"></script>
                  <script>
                    function initialize() {
                      var mapCanvas = document.getElementById('map');
                      var mapOptions = {
                        center: new google.maps.LatLng(44.5403, -78.5463),
                        zoom: 8,
                        mapTypeId: google.maps.MapTypeId.ROADMAP
                      }
                      var map = new google.maps.Map(mapCanvas, mapOptions)
                    }
                    google.maps.event.addDomListener(window, 'load', initialize);
                  </script>
                  

                  CSS:

                  #map {
                    width: 500px;
                    height: 400px;
                  }
                  

                  推荐答案

                  这是上面的代码在一个工作小提琴 -> http://jsfiddle.net/wgur1z7n/ (bootstrap 3.3.5)

                  Here is the code above in a working fiddle -> http://jsfiddle.net/wgur1z7n/ (bootstrap 3.3.5)

                  模态显示后触发谷歌地图resize事件:

                  Trigger the google maps resize event after the modal is shown :

                  $('#contact').on('shown.bs.modal', function () {
                      google.maps.event.trigger(map, "resize");
                  });
                  

                  这篇关于谷歌地图在引导程序中显示为灰色内部模态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to make rooftext effect and valley text effect in HTML5 (or Fabric.js)(如何在 HTML5(或 Fabric.js)中制作屋顶文字效果和山谷文字效果)
                  Draw border around nontransparent part of image on canvas(在画布上的图像不透明部分周围绘制边框)
                  dragging and resizing an image on html5 canvas(在 html5 画布上拖动图像并调整其大小)
                  What#39;s the difference between a boolean as primitive and a boolean as property of an object?(作为原始对象的布尔值和作为对象属性的布尔值有什么区别?)
                  I want to do animation of an object along a particular path(我想沿特定路径对对象进行动画处理)
                  How to upload image into HTML5 canvas(如何将图像上传到 HTML5 画布中)
                  • <tfoot id='ErfFh'></tfoot>
                    1. <small id='ErfFh'></small><noframes id='ErfFh'>

                        <legend id='ErfFh'><style id='ErfFh'><dir id='ErfFh'><q id='ErfFh'></q></dir></style></legend>

                            <tbody id='ErfFh'></tbody>

                        1. <i id='ErfFh'><tr id='ErfFh'><dt id='ErfFh'><q id='ErfFh'><span id='ErfFh'><b id='ErfFh'><form id='ErfFh'><ins id='ErfFh'></ins><ul id='ErfFh'></ul><sub id='ErfFh'></sub></form><legend id='ErfFh'></legend><bdo id='ErfFh'><pre id='ErfFh'><center id='ErfFh'></center></pre></bdo></b><th id='ErfFh'></th></span></q></dt></tr></i><div id='ErfFh'><tfoot id='ErfFh'></tfoot><dl id='ErfFh'><fieldset id='ErfFh'></fieldset></dl></div>

                            <bdo id='ErfFh'></bdo><ul id='ErfFh'></ul>