iOS: how to detect double tap on marker in GoogleMaps - ios

I using GoogleMaps.framework in my iOS app. I need detect double tap on marker to do some action.
I try to find some public method to do it, but I am not lucky. Have any way to do it?

By referring to the delegate functions provided by the google map you can detect the if a marker has been clicked on :)

Assuming the marker is a view, can you not add a UITapGestureRecognizer to it and then set the number of taps required to trigger the recognizer to two?

Related

Swift - GoogleMaps SDK get single or double finger tap gestures

I am using Google Maps SDK in my project. I want to check and detect when tap on google map that is used single finger or double finger ?
My requirement is, disable single finger use and enable double finger use. I want all Gestures work on double finger not on single finger.
First, disable all gesture on your GMSMapView instance. Documentation says:
You can disable the default gestures on the map by setting properties of the GMSUISettings class, which is available as a property of the GMSMapView
Source: https://developers.google.com/maps/documentation/ios-sdk/controls
Then you may be able to add some UITapGestureRecognizer:
Source: https://developer.apple.com/documentation/uikit/uitapgesturerecognizer
Don't forget to set numberOfTouchesRequired to 2 !
Source: https://developer.apple.com/documentation/uikit/uitapgesturerecognizer/1623580-numberoftouchesrequired

Can I disable map panning when select annotations

I just started using SKMap library on IOS recently.
One behavior of the function didSelectAnnotation (from the SKMapViewDelegate Protocol), is that whenever an annotation got selected, the center of the map's visible region will move to the location of that annotation.
Is there any way that I can disable this?
It's actually not a feature of didSelectAnnotationfunction, but rather of showCalloutForAnnotation function. Just set parameter animated in the function to NO.

ios MapKit have annotation description visible on launch and not on tap

I am using map on my IOS application. I can see the annotation on my map, and when I tap on that there is the description, which I have set. My question is whether I can have this description visible when map first loads and not make the user tap on the annotation to view it?
is that possible?
Thanks.
use an overlay instead of an annotation

Remove selected annotation from mapView by double click

I need help regarding removing annotation by double click.
Once I click on any existing annotation on my map, how do I differentiate which annotation/pin selected (double click)?
or any other suggested/common way to delete pins from mapView?
thanks in advance!!
double tap gesture recognizer is reserved by map kit framework to zooming in map view by default, but you can suppress that by using "hittest" in custom "MKPinAnnotationView" class.
I prepeared an example to show how to make callout touchable in map view with "hittest".
you can achieve this problem with the same way as I can do for callouts.
Detect tap on title of callout

how to find where the user tapped on the screen in ios

I want to find where user tapped on MapKit. I cannot find a action to make a connection so i am wondering there is an alternate method for the same. please let me know.
As #Disco S2 says, add the instance of MKMapView as a subview to your view. To know where your user tapped on the map, use this method:
- (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view
Put the mapkit inside a view and listen for touches in that view. There is then a method to convert the touch in the mapView to a touch in the view and vice versa. I can't remember the method for converting but it will be in the map kit documentation

Resources