Turn by turn navigation in iPhone application - iphone

I am developing an iPhone application for restaurants. I have used mapkit to show the locations of restaurants. User also have option to see route to a particular location (restaurant) from the current location. I need to add turn by turn navigation in it. I am using google maps and somewhere I read that iPhone does not show turn by turn navigation because that is restricted in Apple-Google contract for maps. Is it really true? If it is, then is there any other way or any 3rd party library, by which I can implement turn by turn navigation?
Thanks in advance
Regards,
PC

Your best option for navigation is to let the user choose the turn by turn they want:
- Apple Maps using the maps.apple.com
- Google Maps using the maps.google.com
other apps, such as Navigon, Tom tom.
It is a complicated feature and you're much better off not taking responsibility for any shortcomings of services.
Google Maps licence agreement prevents you from doing turn by turn.
Check Drawing a route in MapKit in iPhone SDK

Related

Getting routes and turn-by-turn navigation in an iPhone app

I'm developing an app that will focus heavily on giving users routes and turn-by-turn directions while driving. It is important that they stay within the app during their drive, so I really don't want to make them leave the app and go to the built-in Maps app. I have been doing a lot of research lately on how to include this functionality, and it is widely known that it is not easy, since Apple doesn't include this functionality in the SDK out of the box. It looks like my options are:
For providing routes (and directions) from one place to another
Use a UIWebView and load some web-based maps with JavaScript, and use the JavaScript API to draw a route
Use MapKit or the Google Maps iOS SDK, query for the route sepaartely through an API, and manually draw some kind of path or polyline on top of it.
Use a library that costs money (like MTDirectionsKit)
For providing turn-by-turn navigation
Use a proprietary library that comes with its own maps (like CloudMade)
Is there anything I'm missing here? What are the pros and cons of each, and how should I pick a solution?
Your insight is greatly appreciated. Thanks!
You say that you don't want to "make" the user leave the app and use the built in software for turn by turn navigation as though this is a bad user experience. A bad user experience would be getting forced to use a turn by turn nav from a webView or some API which would not show up as routing information on my lock screen if I lock the phone or cut into other applications to display banners telling me a turn is coming up, for example, while I'm listening to music on my phone. I strongly suggest you launch Apple maps and let the system handle what it is meant to handle instead of trying to build your own turn by turn navigation and heavily limiting the user from the freedom of exiting the application during a drive.
While on the subject of commercial libraries you might what to take a look at other options:
skobbler/telenav sdk - in-app routing and turn-by-turn navigation based on OpenStreetMap (same maps used by Cloudmade and Mapquest). Check out the demos and the licensing plans and figure out if it's the correct solution for you
(they have a Free Tier that might be good enough for your app - and if you go above that tier I think you should be considering monetizing you app)
and that's about it for the time being (besides the options already named): keep an eye out for Mapbox as they could provide an iOS sdk in the near future - with routing and navigation
I agree with Kris' response. Turn-by-turn navigation is probably best handled by the built-in app. However, for displaying a route and ETA on a 2D map, I think I'm going to go with the Mapquest iOS API, which offers this functionality for free. I didn't know this solution was available until today.

iPhone iOS should mapkit based apps look like the iPhone native maps app?

I'm building a map kit based app with a map view to display a list of pre-determined locations. I "borrowed" the look and feel of the maps app - the search bar with bookmarks list on top, the zoom to user location button in bottom left, the peel corner to reveal map type controls in bottom right.
To display a route to the map annotation, I'm opening the native maps app to plot the route.
Is this kind of "maps app" like look and feel of the maps app encouraged, or am I violating some clause ? I have not seen anything map specific in the app store review guidelines, but would like to make sure that I wont have any review trouble with my maps app.
Thank you for your input!
What does your app do? If all it does is let users search places and get directions to them, then yeah you're blatantly ripping off the built-in app. But if this is a small part of your app, and it does a bunch of other things with original UI, then sure - why not present the user with a familiar UI paradigm? It all depends on what your app does, and how much of it you're copying from other apps, and for what scenarios.
From the Location Awareness Programming Guide:
Important The Map Kit framework uses Google services to provide map data. Use of the framework and its associated interfaces binds you to the Google Maps/Google Earth API terms of service. You can find these terms of service at http://code.google.com/apis/maps/iphone/terms.html.
In my experience, what you're doing is just fine as long as you don't obscure the google logo at the bottom of the map.

Standard practice for showing a location in IOS - mapkit or link to google map?

I have an app that I want to have a button that will show you the location of somewhere (it's a conference app, so want to show the convention centre on google map). At the moment my link opens up google maps with the long/lat.
My question is, is that standard practice in IOS? or it against some design guideline (seeing as it opens another app). Should I embed a mapkit view instead? I'm under a really tight deadline so don't want to get my app rejected, so thought I'd ask which was the generally accepted practice.
Neither will get your app rejected but using an embedded map will make your users happier. You might also give a button which opens the location in the maps app so the user can get directions.

How to implement google maps in my iPhone application

I am totally confused with google maps and maps of iPhone...
i have read that iPhone uses google maps.....and also spent some time on it....
But it never display the items like location pictures, balloons etc.
EDIT
THIS is photo for of browser
and following is same place for iPhone maps
second one did not show the annotation added by people.....
(this is what i was asking for ballons or other pictures which people adds to location on oogle maps)
I want to display all those in my application....
what should i do...
if you suggests implement Google maps API, then please suggest a working link...or provide some sample code if possible.....if anybody has done it...then please mail me at yogeshkumau#gmail.com
waiting for answer......
Points of Interests(location, pictures and baloons) that you are talking about can be shown in your maps, if you acquire the license for Google maps premier api. In that case you'd have to use dynamic maps by using google's web services. However if you want to implement it using MapKit framework on iOS devices, you'd have to draw your custom POIs using core graphics.
Apple has a special agreement with Google to use their maps on their platform. The internet is packed with examples of usage of MKMapView along with annotations (pins, there're no baloons on iPhone).

Force MapKit use cached map tiles only/disable network programmatically

We have stumbled upon such a problem.
We are developing an application for travelling. To make sure the user doesn't spend much money on roaming charges in our app we decided to implement a settings option for user to view cached maps only. So we let the user decide whether he wants to load the maps from internet or he wants to save money and view cached maps (stored in Library/Caches/MapTiles/MapTiles.sqlitedb).
We can't find a way to implement this. Is there any way to disable network programmatically in this case? Or force MapKit use cached tiles only? We thought about changing APN programmatically for this option to force MapKit go offline. Is it possible to change APN programmatically?
Thank you!
iPhone SDK apps do not have access to the network adapter settings, and I know of nothing in the MapKit API that gives you control over its Internet usage. Your best option in this case is probably to present an alert suggesting that the user enable Airplane Mode or turn off data roaming.
use openstreetmap
think the commercial side of it Cloud-made allows offline maps
http://developers.cloudmade.com/projects/show/iphone-sdk
Libraries that help iPhone developers use OSM maps
route-me is an open-source library used in a number of iPhone applications to display OSM maps.
The CloudMade iPhone Maps Library is an open-source library that provides high-level access to CloudMade's OSM-based map tiles with different sizes and different styles.
John McKerrell has ported the routing algorithm from gosmore to run on the iPhone and has successfully generated basic routes. More complicated routes crash the iPhone at the moment
There are some ways. One is to use your own tile overlay and implement the caching algorithm either in URLForTilePath: or in loadTileAtPath:result:
It works very well with open domain and some private ones. Does not cache the standard Apple Maps.
Another way that will be able to cache everything is subclass NSURLProtocol. There are some tutorials and probably you may detect when is a map image and act accordingly
the google map app does the cache feature ... MapKit seem no , I think Apple will add this feature in next version SDK ...