Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring zoom speed/step #4723

Closed
juho-hanhimaki opened this issue May 19, 2017 · 6 comments
Closed

Allow configuring zoom speed/step #4723

juho-hanhimaki opened this issue May 19, 2017 · 6 comments

Comments

@juho-hanhimaki
Copy link

Motivation

Zooming the map via scroll or double tap feels too slow most of the time. There is too much scrolling or double tapping to do. This is especially painful on devices with only touchpad.

Our use scenario has large fleet of assets that are situated around the globe. Users will often start with wide view of globe and then go into deep zoom levels to see more of the local context around specific asset. This process involves a lot of zooming in (and sometimes out too). It is common complaint for us that there is too much zooming to be done to get to desired level of zoom.

Design

Make zoom step/speed was configurable via map options or in the zoom handlers. At the moment it seems the scroll_zoom.js and dblclick_zoom.js use hard coded values instead of configurable values.

@andrewharvey
Copy link
Collaborator

I've found this varies by the pointer device/os a fair bit. For me it's the opposite the scroll wheel on the mouse is slow but the touchpad scroll is nice and fast.

Perhaps in your UI you could hint your users to use Shift+drag a box to speed up zooming in? as a workaround for it being configurable.

@stevage
Copy link
Contributor

stevage commented Jan 8, 2018

Also running into this. My experience is like Andrew's - with the touchpad it's easy to do a big swipe that zooms forever, whereas the wheel is much more work.

It seems to be related to how much data is being displayed. An empty map scrolls in and out quickly, while a very heavy one feels like it's skipping scroll events.

@Caerbannog
Copy link
Contributor

The title of this issue is about adding a configuration option.
I suspect that fixing the related issue #7572 (inconsistent scroll speed across browsers) might be a better solution for some of the people affected here.

@wisyr
Copy link

wisyr commented Dec 22, 2018

Current scrolling speed is way too low. Looking forward for this feature.

@mourner
Copy link
Member

mourner commented Jan 10, 2019

Here are the constants that have to be made configurable:

https://github.com/mapbox/mapbox-gl-js/blob/master/src/ui/handler/scroll_zoom.js#L19-L22

Adding a "good first issue" label — a PR would be welcome! You can see how handler options are implemented in other handlers like drag pan or drag rotate.

@ryanhamley
Copy link
Contributor

Closed by #7863 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants