Skip to content

Delay when moving on the map #117

@AlanThouvenin

Description

@AlanThouvenin

When using this lib, I noticed that there was a systematic delay when moving on the map:

  • On drag start, the particles stop moving
  • On drag end, the particles jump to the position, still not moving
  • There is a delay after which the particles go back to their original place and restart moving
    This can be experienced in the demo.

I noticed the few lines that are responsible for this behavior, at the end of onDrawLayer (L.VelocityLayer.js):

    this._timer = setTimeout(function() {
      self._startWindy();
    }, 750); // showing velocity is delayed

The 750ms delay is actually intended. By removing it, there is no delay anymore and no other problem seems to appear.
Was there a specific reason for introducing this delay?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions