在Leaftlet上打开一个全屏的bootstrap模式。

问题描述 投票:0回答:1

我正在使用Boostrap 4和Leaflet。

在Leaflet上,我可以通过点击标记bindPopup打开模式。

在Leaflet的Fullscreen中,模式也可以打开,但是在地图后面。

有可能在全屏状态下,在地图上打开模版吗?

我试过--删除类名 leaflet-fullscreen-on。

$('#map').removeClass('leaflet-fullscreen-on');
  • 改变模态的z-index

    $('#modal').css('z-index',100000)。

不成功

有人知道吗?

Ps.对不起我的英语, 我是法国人(被限制) ;-) 对不起,我的英语,我是法国人(限制);-)

leaflet bootstrap-modal fullscreen
1个回答
0
投票

使用Bootstrap 3和Leaflet.fullscreen。https:/github.comLeafletLeaflet.fullscreen 我通过调用地图div内的modal来实现。

<div id = "map" class = "map">
<? php include ("include / modal / mymodal.php"); ?>
</div>

结果是:

- 在全屏模式下,模式出现在地图上。

- 当禁用全屏模式时,模态的访问会因为背景屏幕而被阻止,如果模态中包含表单、链接等,这可能会很烦人。要移除背景屏幕,你必须在模式中添加参数data-backdrop="false",并在模式中添加一个关闭按钮。

<div id="modal" class="modal fade" data-backdrop="false">

演示。 https:/www.gpstraces.nethow-to-open-a-bootstrap-modal-in-a-leaflet-full-screen-map-tutorial-1

Voili voilou

© www.soinside.com 2019 - 2024. All rights reserved.