gpxstudio.github.io icon indicating copy to clipboard operation
gpxstudio.github.io copied to clipboard

More smooth Zoom in map

Open Volodymyr-13 opened this issue 2 years ago • 9 comments

Can zoom be smooth like in Google Maps? Or at least decrease zoom step..

giphy-downsized-large

Volodymyr-13 avatar May 18 '22 13:05 Volodymyr-13

Unfortunately this is the only behavior of Leaflet, the map library that this project uses.

vcoppe avatar May 19 '22 15:05 vcoppe

@vcoppe

Okay, I created ticket on their repo, hope they will fix this.

Since, I was sure that you know all about this https://leafletjs.com/reference.html#map-zoomdelta And so this is not helping at all, right? That's why you was not waiting for my response and closed this ticket so fast? I mean maybe just reduce zoomDelta to some lower value or something? Or no..

Screen Shot

Volodymyr-13 avatar May 19 '22 15:05 Volodymyr-13

I had already tried to play with this setting but it does not affect the scroll zoom, which I think is the one mostly used. Plus, it doesn't seem to work with values < 1. I would happily integrate this feature if there is a workaround, or if it gets fixed in the future.

vcoppe avatar May 19 '22 15:05 vcoppe

I see, hope they will fix this, maybe you can add more info to my bug?

Volodymyr-13 avatar May 19 '22 15:05 Volodymyr-13

@vcoppe please take a look https://github.com/Leaflet/Leaflet/issues/8252#issuecomment-1132817477

Volodymyr-13 avatar May 20 '22 18:05 Volodymyr-13

It works with the extra parameters mentioned, but I cannot get a behavior as smooth as Google Maps. For now, it gives me headache... See my attempt here: https://jsfiddle.net/tgz2d0mf/23/

vcoppe avatar May 23 '22 09:05 vcoppe

@vcoppe Thanks for the update, this looks definitely a right direction.. but I'm not an expert in this at all.. could you please maybe create a bug or continue thread here https://github.com/Leaflet/Leaflet/issues/8252 with IvanSanchez ?

This is definitely something what requires a general improvement. Zoom in map should be smooth and nice, we are in 2022.. I had old navigators maps with jumping views due to some hardware limitations.. but now there is no such limits even on any smartphone on this planet)

Volodymyr-13 avatar May 23 '22 09:05 Volodymyr-13

Hey @vcoppe is it possible for now just to tune current zoom step?

When I click +- buttons it's zooms too much, so I can't fit my route on a full available view in browser.

ezgif com-gif-maker

Volodymyr-13 avatar Jun 06 '22 12:06 Volodymyr-13

@vcoppe any updates?

Volodymyr-13 avatar Jul 21 '22 10:07 Volodymyr-13

I have just upgraded Leaflet to its latest version in which a bug about the zooming was fixed. So now I have decreased the zoom step. I also tried to play with the parameters to create a smooth zoom but it is always quite laggy.

vcoppe avatar Feb 04 '23 16:02 vcoppe

@vcoppe well... that zoom looks like on old GPS navigator from 90s.. not smooth and modern.. that's pity man..

Volodymyr-13 avatar Feb 04 '23 21:02 Volodymyr-13