Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Notify MGLMapView delegate about single and long taps on the map - #2280

Closed
maciekish wants to merge 1 commit into
mapbox:masterfrom
Hitta:map-taps
Closed

maciekish wants to merge 1 commit into
mapbox:masterfrom
Hitta:map-taps

Conversation

@maciekish

Copy link
Copy Markdown
Contributor

Adds two delegate methods for notifying the delegate about single- and long taps on the map.

- (void)mapView:(MGLMapView *)mapView singleTapOnMapAtCoordinate:(CLLocationCoordinate2D)coordinate;

- (void)mapView:(MGLMapView *)mapView longPressOnMapAtCoordinate:(CLLocationCoordinate2D)coordinate;

@Zakay

Zakay commented Sep 10, 2015

Copy link
Copy Markdown

Will these features find them selfes in Android version too? Or do they already exists? Would be great to see a feature/support matrix between android/ios. Sure mapbox gl's core is on both but the interaction features might differ between platforms.

@friedbunny

Copy link
Copy Markdown
Contributor

Thanks for the pull request, @maciekish. We're focusing on releasing v2.1.0 at the moment, so it may take a bit for us to get to this — thanks, too, for your patience.

@ljbade

ljbade commented Sep 14, 2015

Copy link
Copy Markdown
Contributor

@Zakay There is a ticket for adding more touch event hooks on Android, but I can't find it right now.

@bsudekum

Copy link
Copy Markdown

@incanus @1ec5 @friedbunny could we re-take a look at this PR? Seems like a very good addition.

@1ec5

1ec5 commented Oct 21, 2015

Copy link
Copy Markdown
Contributor

Thanks for the PR, @maciekish, but I’m leaning towards 👎 on this change. I think it would be more appropriate for the view controller to manage these gesture recognizers itself, as MBXViewController does. Folding these recognizers into MGLMapView hides properties like minimumPressDuration that would should be configurable, and it would open the door to MGLMapView providing coordinate-savvy versions of all the gesture recognizers, including ones that an application may never need. (The view controller might want full access to the UIEvent in any case.)

The situation on Android may be very different if it’s more difficult to stand up a gesture recognizer that’s consistent with the MapView’s built-in ones.

@1ec5 1ec5 closed this Oct 21, 2015
@maciekish
maciekish deleted the map-taps branch November 26, 2015 12:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature iOS Mapbox Maps SDK for iOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants