google map zoom event: Ignored attempt to cancel a touchend event with cancelable=false

*爱你&永不变心* 提交于 2021-01-05 13:13:28

问题


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

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

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!


回答1:


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

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)?



来源:https://stackoverflow.com/questions/39005292/google-map-zoom-event-ignored-attempt-to-cancel-a-touchend-event-with-cancelabl

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