0

I need to include routes in my app. Native apple MKDirection works well, but only on iOS7. I would like my app to work both on iOS6 and iOS7.

Then I tried to implement Google routes (Google Maps API) on my iOS application by this tutorial.

Here is my result:

map screenshot

Why is the route not following the roads?

Leigh
  • 12,038
  • 4
  • 28
  • 36
Romowski
  • 1,518
  • 5
  • 25
  • 50
  • 1
    Do you have correct Polylines? It seems to me that you don't have polylines, polylines are the set of coordiates for route.. For google api the polylines are encoded, you need to decode it see this http://stackoverflow.com/a/9219856/790842 – iphonic May 27 '14 at 04:34

2 Answers2

0

You can use this API to support iOS 6 as well.

Deepak Khiwani
  • 734
  • 1
  • 8
  • 33
0

You can use Google Direction API extract the Overview polyline string decode it and plot as an image with ContextRef on apple map and for iOS7 we can try to check the device version and if its iOS7 we can use latest iOS7 MKDirection API to plot the route map from one location to another location. I found a very good tutorial for this please find the link below : MKDirection Tutorial

creative_rd
  • 695
  • 6
  • 13