Leaflet.MapCenterCoord icon indicating copy to clipboard operation
Leaflet.MapCenterCoord copied to clipboard

Crosshairs jiggle when map 'thrown' with mouse

Open tstibbs opened this issue 8 years ago • 0 comments

  1. Go to http://xguaita.github.io/Leaflet.MapCenterCoord/
  2. Click and drag on one of the maps. Notice that the crosshairs icon stays relatively stable.
  3. Click and drag very quickly and release the mouse - the map should keep moving for a bit even after you've released the mouse button. Notice that the crosshairs icon jiggles all over the place. This happens on chrome and firefox, and also chrome on android.

It seems that when the map is 'thrown' like that with the mouse, the map centre isn't being updated quickly enough and this causes the cross hairs to move with the map, and then jump back to the centre. I can't help but wonder if there's an alternative method that will just overlay the icon on the map without actually adding it to a layer?

tstibbs avatar Jun 10 '16 12:06 tstibbs