tangram icon indicating copy to clipboard operation
tangram copied to clipboard

map wobbles during incremental zoom

Open meetar opened this issue 9 years ago • 4 comments
trafficstars

Most noticeable with very slow zooms, and most often detected during the ease-out of touchpad zooms.

Interestingly, a Leaflet marker placed on the map also wobbles, but in a different, more jittery pattern:

wobble

meetar avatar Jun 30 '16 00:06 meetar

Perhaps an artifact of rounding?

dmvaldman avatar Jun 30 '16 16:06 dmvaldman

I think the theory from the last time we looked at it was that it's a series of conversions (for example: screen -> latlng -> mercator) that has a cumulative error. But it needs more investigation.

@meetar - can't remember, but can you try this with zooming set to be fixed on map center point (it's a Leaflet option somewhere), it will be useful to know if this also happens in that case.

bcamper avatar Jun 30 '16 16:06 bcamper

This is a problem due to rounding in Leaflet. There's an ongoing discussion about it here

dmvaldman avatar Oct 11 '16 20:10 dmvaldman

Confirmed - commenting out Leaflet's point class _round function removes both map wobble and marker wobble.

meetar avatar Feb 15 '17 19:02 meetar