iOS: How to offer directions from annotation view? - ios

Basically what I'm wondering is how to offer the user an option to get directions in Maps from an annotation (like that little car icon inside of the annotation that opens up directions)

You can use left/right callout accessory view to add your icon and when you tap on it you can implement your direction logic.

Related

Custom MGLAnnotationView

How can I open new View, by tapping on Annotation Point in MapBox. I need to show the personal page of this or that place on the map. Can someone help me with that?
This example from the Mapbox website shows how to give the callout some functionality. The example just shows an alert when you tap it but you would just trigger your segue instead.

Make a Mapbox RMAnnotation display its callout programmatically

I'm making an iOS app (using Swift) that has a map in the Mapbox iOS SDK. I've gotten to the point of displaying several markers on the map. Now, I want the user to be able to select a marker from the list, panning to that marker (easy), which also makes the marker's callout bubble appear automatically without the user having to touch it (not so easy).
It's this last task I'm having trouble with. While I've found the RMMarker class's showLabel() method, I can't seem to directly access a RMAnnotation's associated RMMarker object, so I'm not sure where or how to call this method.
Does anyone know how this is done?
Ignore the showLabel() API — this is not the callout in use, but rather a text label that's possible directly on the annotation.
You probably want -[RMMapView selectAnnotation:animated:] with a NO in the animated argument.

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 create custom annotation and callout bubble in iphone?

I want to create a customized annotation and callout bubble on MKMapView. I need to use a customized view rather than default annotation pin and annotaion view(which is limited to show only title and a single line description). When user tap on an annotation, I would like to display more information on the callout bubble.
I passed by this control but I haven't used it:
http://cocoacontrols.com/platforms/ios/controls/custom-callout
I've found some pretty good controls at that site.

Resources