Maps Shortcuts: Directions and the Google Maps iOS SDK
Why Stack Overflow recommends it
Stack Overflow users link it as the canonical walkthrough for drawing a route between two points on a Google Map in iOS, since the SDK itself has no directions feature.
Recommended by 5 people across 5 different months, 2013 to 2016.
What it is
A 10-minute episode of Google's Maps Shortcuts series in which Mano Marks shows how to call the Google Maps Directions web service from an iOS app and display the returned route with the Google Maps iOS SDK. It comes with sample code on GitHub.
What people said
Recommends Redbug · 2013-06 · Stack Overflow · on “Google Maps SDK for iOS and routes”
As Saxon Druce's answer, you can use the Google Maps Directions web service to find the route and draw them by polylines. This episode [this video] shows you how to realize it, and you can download the example code from this github repository [LINK] .
Recommends AdamG · 2013-10 · Stack Overflow · on “Google Maps IOS Show Routes”
Yes. This video [this video] is a tutorial that shows how to do this and is linked to a github that has source code. You basically have to write wrappers to do server requests to get a polyline between two locations and then you add it to the map. Also, look here [LINK] for the full documentation and basic code snippets. Good luck!
Recommends try catch finally · 2014-02 · Stack Overflow · on “iOS, how to display route between two points using Google Places Api?”
You can get this [LINK] tutorial of a google developer for reference. And you can check this [this video] youtube tutorial for guidance. Hope this helps. Cheers :)
Recommends hsoi · 2014-09 · Stack Overflow · on “Google Maps SDK doesnt return directions”
Well, it depends exactly what you mean and want by "directions". The Google Maps SDK for iOS does not itself do any sort of directions. What you can do is use the Google Maps Directions web service [LINK] to obtain information, then use that information to create a GMSPolyline which then can be rendered atop your in-app map. So basically it can show the line between point A and B, which is some level of directions, but may or may not be what you're wanting. Here's a YouTube video from Google that shows how to do this [this video] , and some sample code from Google's Mano Marks [LINK] . But if what you want are turn-by-turn directions, spoken directions, etc., no, the SDK cannot do that; you have
Recommends abielita · 2016-09 · Stack Overflow · on “Google Maps SDK avoid highways and tolls (iOS)”
You can see in this video: Maps Shortcuts: Directions and the Google Maps iOS SDK [this video] on how to load and display information from the Directions web service in your app. You can read in this documentation [LINK] the avoid parameter which indicates that the calculated route(s) should avoid the indicated features. It supports the following arguments: tolls indicates that the calculated route should avoid toll roads/bridges. highways indicates that the calculated route should avoid highways. Check this related thread: How to avoid both tolls and highways for Restrictions in Google Directions API? [LINK] Hope this helps!
Cites DaViDa · 2014-03 · Stack Overflow · on “Saving data online for IOS”
I'm new to IOS (Xcode) programming and have been searching information about the online storage of data. So far I came across Core Data and SQLLite. However every search results into a storage file on the device itself. I want to make an app that stores routes with the Google Maps API. Because eventually there will be a lot of routes I think it is going to take a lot of storage, even though it is saved as url. I am using: [this video] Within those routes people can post messages on the route it's wall, so that data has to be saved too. I am used to websites using phpmyadmin with tables for example or Java and postgressql/mysql. Is there anything like that for IOS and if so what is the best approa
Cites David V · 2014-07 · Stack Overflow · on “Google Maps - Make route line follow streets when map zoomed in”
I'm getting the same issue as described in following SO questions: (The route lines is not following the streets when I zoom in) MapKit - Make route line follow streets when map zoomed in [LINK] and Route drawing on Google Maps for iOS not following the street lines [LINK] But seems there are no any answer which solved mentioned issue. I'm adding to points to the my GMSMapView map by following function: -(void) addPointToMap:(CLLocationCoordinate2D) coordinate { CLLocationCoordinate2D position = CLLocationCoordinate2DMake( coordinate.latitude, coordinate.longitude); GMSMarker *marker = [GMSMarker markerWithPosition:position]; marker.map = mapView_; [waypoints_ addObject:marker]; NSString *po
Cites popote · 2015-08 · Stack Overflow · on “Google directions' URL returning "ZERO RESULTS"”
I've followed this tutorial - [this video] Trying to draw route on map and I do successfully send latitude/longitude of origin/destination. The problem is its generated URL. I keep getting this [LINK] But as far as I know, the URL should end with |45.566346,18.667512 something like that. I don't know what I'm doing wrong because the tutorial claims it works and its by Google I think. - (void)setDirectionsQuery:(NSDictionary *)query withSelector:(SEL)selector withDelegate:(id)delegate{ NSArray *waypoints = [query objectForKey:@"waypoints"]; NSLog(@"***waypoints : %@", waypoints); NSString *origin = [waypoints objectAtIndex:0]; int waypointCount = [waypoints count]; int destinationPos = waypointCou
Cites Abdul Karim · 2015-10 · Stack Overflow · on “how to plot a route between source to destination with respect to GMSMarker or annotation in iOS Google Map sdk”
With the help of this tutorial link [this video] I am able to draw a route between Source (New York) to Destination (Washington) but here is it possible to draw route with respect to GMSMarker for example drawing route between New York to Washington via lakewood and vineland or were ever user drop a pin platform - iOS ,SDK - Google Map ,language - Objective -C i searched but cannot find.... Thank you in advance.....