Leaflet - modal opens behind map

喜欢而已 提交于 2019-12-02 11:45:28

问题


I'm using leaflet and modalcss to display a modal within a map. This worked like a charm with leaflet v0.7.7. See this Plunker: click --> Click the button under the zoom controls.

When I switch to leaflet v1.2.0 the modal gets opened but behind the map. See this Plunker: click

Why is this happening? Any idea on how to show the modal in front of the map like in the old version of leaflet? Thanks!


回答1:


Apply this CSS rules to map and model:

#map{ z-index:1; }
#modal{ z-index:2; }


来源:https://stackoverflow.com/questions/46646035/leaflet-modal-opens-behind-map

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!