0
当用户拖动地图时,更改光标的正确方法是什么?下面的例子并不是那么好,因为它只有在指针拖动开始拖动时触发,然后在没有事件125毫秒后将其改回。有没有其他方法?在透明层拖动时更改光标3
var timer = null;
this.map().on("pointerdrag",() => {
this.map().getViewport().style.cursor = "-webkit-grabbing";
clearTimeout(timer);
timer = setTimeout(() => this.map().getViewport().style.cursor = "-webkit-grab", 125);
});