Google Maps API v3点击事件在Ionic仿真器或设备中不起作用 [英] Google Maps API v3 click event not working in Ionic emulator or device
问题描述
我有一个谷歌地图实施与各种丢弃的针脚。点击后,用简单的字符串打开信息窗口。这一切在Ionic服务中运行良好并且非常棒。但在iOS模拟器中或在设备中运行时不会执行任何操作。在模拟器或设备上运行时,我不会收到任何错误消息或查看与该事件相关的任何消息。阅读这个问题,我在地图上的div上设置了 data-tap-disable =true
。似乎无法找到任何其他解决方案。我可以做些什么来解决这个问题?
I have a google maps implementation with various dropped pins. When clicked they open a information Window with a simple string. This all works well and dandy in the Ionic serve. But does not do anything in the iOS emulator or running in the device. When running on the simulator or device I get no error or see any message associated with the event. Reading up on this issue I did set data-tap-disable="true"
on the div we're the map resides. Can't seem to find any other solution. What can I do to fix this?
推荐答案
我和你有同样的问题,试着把数据-tap-disabled =true
在包含地图的div上。我必须更进一步,并且只有在信息窗口显示时才写入 data-tap-disabled =true
。
I had the same issue as you, try putting data-tap-disabled="true"
on the div that contains the map. I had to take it even a step further and write something to apply data-tap-disabled="true"
only when the info-window is showing.
注释我在使用 data-tap-disabled
的同时,在说您尝试了 data-tap-disable
。
Note I used data-tap-disabled
while you're saying you tried data-tap-disable
.
这篇关于Google Maps API v3点击事件在Ionic仿真器或设备中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!