当 Google Maps Full Screen 为 true 时,Google Maps AutoComplete 下拉菜单隐藏 [英] Google Maps AutoComplete dropdown hidden when Google Maps Full Screen is true

查看:27
本文介绍了当 Google Maps Full Screen 为 true 时,Google Maps AutoComplete 下拉菜单隐藏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在地图上实现了一个带有自动完成功能的谷歌地图,并且我已经将 FullScreenControl 选项设置为true"(您可以在下图中的右侧看到 FullScreenControl)

我的问题是,当我通过单击 FullScreenControl 切换到全屏模式时,下拉菜单隐藏在谷歌地图后面.ZIndex 似乎太低,但将其设置为非常大的数字似乎并不能解决问题.您可以从下图中看到下拉菜单存在,但仅在全屏谷歌地图后面.

我确实找到了一个类似的问题,其中有人使用了普通下拉菜单而不是谷歌地图自动完成.]4

解决方案

我通过将 z-index 添加到 .pac-container 来修复它

请参阅此处

 .pac-container, .pac-item{z-index:2147483647 !重要;}

I've implemented a google maps with autocomplete onverlayed on the map and I've set the FullScreenControl option to "true" (You can see the FullScreenControl on the right in the image below)

My problem is that when I switch to FullScreen mode by clicking the FullScreenControl, the dropdown is hidden behind the google map. It seems that the ZIndex is too low but setting it to a very large number does not seem to fix the issue. You can see from the image below that the dropdown exists, but only behind the fullscreen google map.

I did find a similar question with answer where someone used a normal dropdown and not the google map autocomplete. Similar Question and answer

However the solution didn't work for me. Setting the ZIndex doesn't seem to work. I'm using TypeScript with Angular2.

Thank you.

]4

解决方案

i was fix it with add z-index to .pac-container

see here

 .pac-container, .pac-item{
    z-index: 2147483647 !important;
 }

这篇关于当 Google Maps Full Screen 为 true 时,Google Maps AutoComplete 下拉菜单隐藏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆