谷歌地图缩放事件:忽略取消cancelable = false的触摸结束事件的尝试 [英] google map zoom event: Ignored attempt to cancel a touchend event with cancelable=false

查看:72
本文介绍了谷歌地图缩放事件:忽略取消cancelable = false的触摸结束事件的尝试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Ionic 2应用程序中使用了Google地图,我希望根据地图的缩放级别显示/消失标记.因此,我在函数"ionViewDidEnter"中添加了以下行:

I'm using google map in my ionic 2 app, and I want my markers to display/disappear depending on the map's zoom level. So I added the following line in the function "ionViewDidEnter":

    this.map.addListener('idle', this.adjustMarkerVisibility);

但是,当我缩放地图(甚至只是滚动地图)时,会收到警告

However, when I zoom the map (or even just scrolling it), I get a warning

被忽略的尝试取消带有cancelable = false的touchend事件的尝试,例如,因为滚动正在进行并且无法中断."

"Ignored attempt to cancel a touchend event with cancelable=false, for example because scrolling is in progress and cannot be interrupted."

,并且永远不会调用this.adjustMarkerVisibility().我搜索了一段时间,但没有出现与Google Map相关的错误.有任何建议吗?谢谢!

and this.adjustMarkerVisibility() is never called. I've searched the error for a while but nothing relating with google map has come up. Anyone with any suggestions? Thanks!

推荐答案

我会将其发布为评论,但是我还没有50名代表这样做:(

I would post this as a comment, but I don't have the 50 rep to do so yet :(

我的团队自己也遇到了与Google Maps相同的问题,并且在Chromium中遇到了这个特定错误(我们在触摸屏系统上使用了具有硬设置分辨率的Kiosk模式),发现的奇怪之处在于,仅在原始浏览器选项卡中启动时抛出此错误,如果它在浏览器启动后在新选项卡中启动,则这些警告消失,一切都会正常进行.我们将继续调查,但似乎可能与初始启动时未在初始选项卡上正确设置视口大小有关.这是否也符合您的经验(也许我们可以在这里为我们俩一起找到解决方案)?

My team has run into the same issue ourselves with Google Maps and this particular error in Chromium (we are using Kiosk Mode with a hard set resolution on a touchscreen system) and the odd thing we've discovered is that it seems to only throw this error when launched in the original browser tab, if it launches in a new tab created after the browser has started then these warnings go away and everything works as it should. We continue to investigate but it seems like it may have something to do with viewport sizing not being properly set on the initial tab at initial launch. Does this match your experience as well (perhaps we can find a solution for both of us together here)?

这篇关于谷歌地图缩放事件:忽略取消cancelable = false的触摸结束事件的尝试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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