While I am using Google Maps SDK, I am trying to get driving direction between two locations on iOS. I know we can do this using two methods:-
1.) Using URL Scheme, for which it is necessary that Google Maps App is installed on your device.
2.) Using Directions API, via Request-Response and then parsing the JSON. Displaying markers to show the direction.
Now, my question is there any other way by which I can do this on iOS? I need to show the direction from my current location to a particular location of which i have the Lat/Long.
I mean is it really not possible to simply pass 2 location as parameter and Google Maps SDK, will give me the directions?
Thanks,
I had done it as it also shows PINS DISTANCE AND DURATION on map with DIRECTION ROUTE. But dont forget to set your GOOGLE DIRECTION API TO ENABLED in your GOOGLE DEVELOPER CONSOLE
These lines shows location between a given latitude / longitude and user location;
Create a key in google developer console make sure your project is created with App bundleID after that add the following code