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.
Related
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
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.
Is there any control to show messages on iOS, similar to the SMS app and a lot of other apps (Viber, ICQ)? It seems many of them are using the same control for this.
To expand Noah's Answer, there may not be a control like that in the iOS SDK, but there are people on github, bitbucket, and cocoa controls who have rolled their own. See here for a pretty accurate clone of the messages.app that comes bundled with the iPhone.
Layer is one of the easiest ways to integrate chat and messaging features in your apps. With the recent launch of Atlas, it is even easier to integrate Layer in your app using its fully featured, high performance, 100% customizable UI kit. The important controllers that you can use to simplify chat UI are:
ATLConversationListViewController: A controller that provides an editable list of all Conversations for the authenticated user.
ATLConversationViewController: A controller that a scrollable, auto-paginating view of the Messages in a Conversation.
ATLParticipantTableViewController: A controller that provides a sortable, searchable table view for selecting a set of participants to communicate with.
For full implementation details about integrating Atlas and Layer in your app, see Implementing Chat/Messaging in iOS apps with Layer.
No such control exists in the iOS SDK; the third-party implementations you mention are just mimicking the SMS app’s UI. Most implementations of this are based on a UITableView; you’ll pretty much have to roll your own version of it starting from there.
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 ...
So I'm looking at writing an iPhone application that shows things on a map. What frameworks/methodologies are out there for doing this?
Searching around on Google, I could only find this one:
http://code.google.com/p/iphone-google-maps-component/
Which according to the issues list is slow, and stops working after a while. Does anyone know of something better, or have any experience with the library above?
I'm pretty sure your only options for now are:
Call openURL: to switch to the Maps app
Use the Google Maps component you linked to
Roll your own thing
Wait for Apple to expose a "MapKit" framework
WARNING: Embedding Google Maps inside an application may violate the Google Maps terms of service.
I have written a full mapping UIView on the iPhone (the application is on the AppStore) and it is not easy (this would be option #3 "Roll your own thing"). Getting good performance is really difficult. I would like to OpenSource my map component but right now the F-NDA is preventing that.
I have been chasing this for a while now, and here's the best solution I've found out there:
http://code.google.com/p/touchcode/
There is a component in there called TouchMap and it comes with a demo that shows it off. It's tiles are loaded directly from Microsoft Virtual Earth.
Edit: #schwa, I just a look at your profile to find your email address, and then realised that you actually released this software. Nice work
I've just found route-me which looks like a large(30+) active community of ppl developing an open source mapping app for the iPhone. It can take tiles from OpenStreetMap, Virtual Earth(Bing) or Cloudmade.
just use mapkit framework.really good
alternatively: [[uiapplication sharedapplication]openurl:#"www.maps.google.com];
that will open the google map,but one problem with this is that it will navigate you to safari and your application will be exited and if you want to move back to your application from this web page,then it won't be possible .you again need to run the app.