diff --git a/modules/renderer/map.js b/modules/renderer/map.js index 70f29552d..9d6acd366 100644 --- a/modules/renderer/map.js +++ b/modules/renderer/map.js @@ -266,8 +266,6 @@ export function rendererMap(context) { function redraw(difference, extent) { if (!surface || !redrawEnabled) return; - clearTimeout(timeoutId); - // If we are in the middle of a zoom/pan, we can't do differenced redraws. // It would result in artifacts where differenced entities are redrawn with // one transform and unchanged entities with another. @@ -302,10 +300,7 @@ export function rendererMap(context) { } - var timeoutId; - function queueRedraw() { - timeoutId = setTimeout(function() { redraw(); }, 750); - } + var queueRedraw = _.debounce(redraw, 750); function pointLocation(p) {