Reputation: 469
I am working on an app where I give direcctions in a country. Directions in that country is not available from apple so i decided to use google api on an apple map. However as you can see from my sceenshot. Although I find the location on my iphone mmap i just get straight lines versus following the route that google does.
Does this have anything to do with using google API on Apple Maps? I have no reason why this is happening.
this is the link I pass to the web from my app
Upvotes: 1
Views: 928
Reputation: 1
I know this is an old thread, but you are not getting 'weird' polylines.. You drawn them manually from the steps. If you look closely on the right map, you see the 'white' dots ? Your polylines follow these dots, you can name them the direction steps.
I have the same issue when I simulate the directions :) That's how I got here. For just drawing, draw routeRequest.routes[0].polyline directly to the map, and it looks good :)
Upvotes: 0
Reputation: 2362
If you are using MKMapView, you should check out the following examples: http://www.meonbinary.com/2014/02/route-directions-with-ios7-mapkit-and-google-maps-api http://sugartin.info/2011/10/12/drawing-route-on-google-map-mkmapview/
If you are using GMSMapView, check out this stack question: Drawing Route Between Two Places on GMSMapView in iOS
Upvotes: 1