let start=parseInt(this.map.getView().getZoom());
let end=this.map.getView().getZoom();
this.map.on(['movestart', 'moveend'], function(e) {
if (e.type == 'movestart') {
start=parseInt(e.map.getView().getZoom());
} else if (e.type == 'moveend') {
end=parseInt(e.map.getView().getZoom());
if (start!==end) {
console.log(end);
//SharedEventBus.$emit('change-resolution', end);
// Update cluster distances
me.updateClusters(end);
}
}
});
Works at the moment but is too clunky: