OK I found the answer myself.
If you want to show directions from the user's current location, leave the field saddr
blank and in the field daddr
you can enter the destination coordinates.
This is how I did it
if (UIApplication.sharedApplication().canOpenURL(NSURL(string:"comgooglemaps://")!)) {
UIApplication.sharedApplication().openURL(NSURL(string:
"comgooglemaps://?saddr=&daddr=(place.latitude),(place.longitude)&directionsmode=driving")!)
} else {
NSLog("Can't use comgooglemaps://");
}
}
for any further queries you can refer to this link Google Map URL Scheme
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…