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

Add center parameter to ScrollZoom and TouchZoomRotate handlers #3780

Closed
mohsen1 opened this issue Dec 11, 2016 · 7 comments
Closed

Add center parameter to ScrollZoom and TouchZoomRotate handlers #3780

mohsen1 opened this issue Dec 11, 2016 · 7 comments

Comments

@mohsen1
Copy link

mohsen1 commented Dec 11, 2016

Our app requires we persist the map center while zooming, touchZoom: 'center' and scrollWheelZoom: center is working great in Leaflet. It would be nice if GL had it as well.

@mollymerp mollymerp changed the title Add equivalent of Leaflet touchZoom: 'center' and scrollWheelZoom: 'center' options Add center parameter to ScrollZoom and TouchZoomRotate handlers Dec 12, 2016
@mohsen1
Copy link
Author

mohsen1 commented Dec 12, 2016

What's your timeline for this feature? I'm asking because it's impacting our decision for picking a map library. Thanks!

@lucaswoj
Copy link
Contributor

Regrettably, we do not yet have a timeline for adding this feature @mohsen1.

If this feature is blocking you I'd recommend implementing it yourself and submitting a PR. It shouldn't take more than several lines of code.

It'd be a shame to let several lines of code (contributed to the open source community!) stand between you and this awesome mapping library.

@mohsen1
Copy link
Author

mohsen1 commented Dec 12, 2016

I love to do that. I actually checked out the code and it was easy to find where the change needs to be made.

Unfortunately we have to support iOS 7, does GL renderer fall back to normal renderer in iOS7?

@lucaswoj
Copy link
Contributor

We do not have an automatic fallback for clients that don't support GL because it's impossible to get feature parity between a GL-based renderer and a raster-based renderer. All the building blocks are available for you to build such a fallback:

@mollymerp
Copy link
Contributor

@mohsen1 just out of curiosity, can you clarify whether your feature request is to fix the center (only while the map is moving/scrolling) to wherever the map's center is when zooming starts, and then release the fixed center onScrollEnd, or if you want to fix the map to an arbitrary center?

@mohsen1
Copy link
Author

mohsen1 commented Dec 12, 2016

@mollymerp basically we want to persist map center while zooming in/out. But use can change map center by panning the map.

@jfirebaugh
Copy link
Contributor

Implemented in #3876.

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

4 participants