diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-26 17:56:46 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-26 17:56:46 -0800 |
commit | a662508ddde4043ece36d8ea9b424368891d892c (patch) | |
tree | a6d7b857d59a2d9ea638bd68fe2b4b38392ef576 /platform/macos/src/MGLMapView.h | |
parent | 00598432b0cc7b8aefd63b5162ad317917eb1154 (diff) | |
parent | 042831604bab0983262146047d6be0e453b0d55d (diff) | |
download | qtlocation-mapboxgl-a662508ddde4043ece36d8ea9b424368891d892c.tar.gz |
Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.1-master
Diffstat (limited to 'platform/macos/src/MGLMapView.h')
-rw-r--r-- | platform/macos/src/MGLMapView.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/platform/macos/src/MGLMapView.h b/platform/macos/src/MGLMapView.h index efe83d1573..7440ffe793 100644 --- a/platform/macos/src/MGLMapView.h +++ b/platform/macos/src/MGLMapView.h @@ -45,6 +45,21 @@ NS_ASSUME_NONNULL_BEGIN your Mapbox account. They also deter other developers from using your styles without your permission. + Adding your own gesture recognizer to `MGLMapView` will block the corresponding + gesture recognizer built into `MGLMapView`. To avoid conflicts, define which + gesture recognizer takes precedence. For example, you can subclass + `NSClickGestureRecognizer` and override `-[NSGestureRecognizer shouldRequireFailureOfGestureRecognizer:]`, + so that your subclass will be invoked only if the default `MGLMapView` click + gesture recognizer fails: + + ```swift + class MapClickGestureRecognizer: NSClickGestureRecognizer { + override func shouldRequireFailure(of otherGestureRecognizer: NSGestureRecognizer) -> Bool { + return otherGestureRecognizer is NSClickGestureRecognizer + } + } + ``` + @note You are responsible for getting permission to use the map data and for ensuring that your use adheres to the relevant terms of use. */ |