问题描述
我的mapbox gl(1.10)应用程序中有一个缩放侦听器
True
我尝试过var colorWindow = Ti.UI.fetchSemanticColor("windowBackgroundColor");
var bgColor = Ti.UI.fetchSemanticColor("viewColor");
var win = Ti.UI.createWindow({
title: 'Demo App',backgroundColor: colorWindow
});
var view = Ti.UI.createView({
height: 300,width: 300,backgroundColor: bgColor
});
win.add(view);
win.open();
和{
"windowBackgroundColor": {
"dark": "#666666","light": "#ff0000"
},"viewColor":{
"dark": "#00ff00","light": "#0000ff"
}
}
。我还尝试了听this.map.on('zoom' e => {
if (suchAndSuch()) {
stopTheZoomFromHappening(e);
}
})
事件。缩放不会取消。
我知道有e.originalEvent.preventDefault()
和其他e.originalEvent.stopPropagation()
,但是以这种方式禁用似乎很麻烦。
有没有一种方法可以阻止单个缩放事件对地图产生影响?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)