Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Add isHorizontalScrollingEnabled option to mapView #107

Closed
malwoodsantoro opened this issue Dec 16, 2019 · 2 comments
Closed

Add isHorizontalScrollingEnabled option to mapView #107

malwoodsantoro opened this issue Dec 16, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@malwoodsantoro
Copy link

malwoodsantoro commented Dec 16, 2019

This is a feature request for the ability to easily disable horizontal scrolling. It’s currently possible to do this by 1) restricting the bounds of the map (defining a northeast coordinate with a latitude of 90 and a southwest coordinate with a latitude of -90), but the scrolling behavior is not smooth. With this approach it’s necessary to swipe straight up and down or you bump into the east and west bounds.

It’s also possible to disable horizontal scrolling 2) using a custom UIPanGestureRecognizer. This proves challenging as it’s necessary to figure out how to gradually decrease the speed of the scroll to mimic the default scroll behavior.

It would be great to expose a simple option on the mapView for this behavior

cc @captainbarbosa

Android equivalent: mapbox/mapbox-gl-native-android#105

@julianrex
Copy link
Contributor

julianrex commented Jan 16, 2020

@captainbarbosa @malwoodsantoro can we mark this as fixed?

@malwoodsantoro
Copy link
Author

👍 This has been implemented #108

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants