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

PinchZoom: allow the view to stay at fractional zoom levels #6223

Closed
aAXEe opened this issue Dec 8, 2016 · 2 comments
Closed

PinchZoom: allow the view to stay at fractional zoom levels #6223

aAXEe opened this issue Dec 8, 2016 · 2 comments

Comments

@aAXEe
Copy link
Contributor

aAXEe commented Dec 8, 2016

Currently the ol.interaction.PinchZoom zooms to the next whole-number zoom after the pinch completes.
This is of course good for classic image tiles but not for vector maps. A concrete user request for this: http://stackoverflow.com/questions/40882212/openlayers3-fractional-zoom-on-touch-device-using-pinch-gesture

I suggest to add a parameter like keepFractionalZoomLevel to the ol.interaction.PinchZoom constructor so that the user can choose whether to keep the fractional zoom or not.

I already tested this idea: aAXEe#1
A fiddle with a working example: https://jsfiddle.net/wm78prro/7/

@ahocevar
Copy link
Member

ahocevar commented Dec 8, 2016

Since wheel zooming now also does not restrict to integer zoom levels any more, I think such a change would make sense. Would you be able and willing to create a pull request?

@aAXEe
Copy link
Contributor Author

aAXEe commented Dec 9, 2016

As discussed in #6224 keeping the fractional zoom is now default.

To get the old behavior set the new constrainResolution parameter.

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

2 participants