Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Twitter bootstrap 在google地图上显示引导警报_Twitter Bootstrap_Google Maps - Fatal编程技术网

Twitter bootstrap 在google地图上显示引导警报

Twitter bootstrap 在google地图上显示引导警报,twitter-bootstrap,google-maps,Twitter Bootstrap,Google Maps,是否有人成功地在谷歌地图上显示引导警报?我试过: <div id="map" style="height:100%"> <div class="alert alert-success"> <strong>Success!</strong> Indicates a successful or positive action. </div> &

是否有人成功地在谷歌地图上显示引导警报?我试过:

 <div id="map" style="height:100%">
            <div class="alert alert-success">
                <strong>Success!</strong> Indicates a successful or positive action.
            </div>
        </div>

成功表示成功或积极的行动。
也有很高的z指数,但没有运气。

地图只不过是谷歌想要注入的任何东西的容器。地图初始化时,您在其中放置的任何标记都将被删除

相反,将地图与警报标记一起放置在父容器中,然后将警报设置为具有
位置:绝对
和一些额外样式(如位置)<不需要代码>z索引

这通常是您将一个元素放置在另一个元素之上的方式,完全没有区别,因为它是一个google maps容器:

<div class="map-cnt">
  <div id="map" style="height:100%"></div>  
  <div class="alert alert-success map-alert">
     <strong>Success!</strong> Indicates a successful or positive action.
  </div>  
</div>  

.map-cnt {
  height: 200px;
}
.map-alert {
  position: absolute; 
  left: 20%;
  top: 30%; 
}