Routing Data for MKMapKit in iOS6 - ios

I have done routing in iOS apps before, but with iOS6 we are now displaying Apple maps - which causes a problem because we are using Google routing data and if we use Google data, we are supposed to be displaying it on a Google map.
I have been searching but as far as I can tell, Apple does not provide any routing data. The closest thing to an answer so far seems to be when Apple says Apps that consume direction information do so by sending an appropriate request to the Maps app, which then handles the task of displaying that information to the user. - which, to me, means that the Maps app would be opened to display the route, and taking the user out of our app.
Where can we get on-the-fly routing data that is acceptable to use on iOS6 apps using Apple's maps?

You could use MapQuest's Open Directions API. It is free and it does not seem to have any limit. They also have a licensed API with a free daily limit.
I believe you are only required to put their logo somewhere on your app.

Unfortunately MapKit does not provide routing data.
In iOS 6 and later, Map Kit offers support for providing map-based
directions to the user. Apps can be a provider of directions or they
can use the Maps app itself to provide directions. Apps that consume
direction information do so by sending an appropriate request to the
Maps app, which then handles the task of displaying that information
to the user. However, if you are implementing a navigation app of your
own, you can register your app as a routing app—that is, a provider of
directions. When the Maps app receives direction requests from the
user (or other apps), it can then forward those requests to your app
for display.
Source
So, your best bet here is to use external routing data, or the maps app. Since Google prohibits using their routing data without displaying on a Google map, you may want to check the bing API's (here). It is not immediately apparent that they require you to use bing maps with the bing routing data, but they do also provide a static map api as well (here).
Alternately, you may want to look at this project on github. It shows how to load google map tiles in a map view.
Best of luck.

Apple may provide routing information in the future, but for now it's only available in the Maps app.
One solution is to use Google tiles in your map view. The code for ClassicMap has a complete implementation of this, and is available with a liberal license. Use it as a stopgap until Apple provides routing information.

You are correct, the Google API terms of service state in 10.1.1 point g:
(g) No Use of Content without a Google Map. You must not use or display the Content without a corresponding Google map, unless you are
explicitly permitted to do so in the Maps APIs Documentation, or
through written permission from Google. In any event, you must not use
or display the Content on or in conjunction with a non-Google map. For
example, you must not use geocodes obtained through the Service in
conjunction with a non-Google map. As another example, you must not
display Street View imagery alongside a non-Google map, but you may
display Street View imagery without a corresponding Google map because
the Maps APIs Documentation explicitly permits you to do so.
The access to the Google APIs was until iOS 6 transparent and accessed via the MapKit framework by Apple, who handled all the licensing, fees etc for us the developers, we didn't need to worry about this.
Now that Apple are using their own mapping service, we don't have access to Google APIs via the MapKit framework, like you say, and routing isn't possible with MapKit in the way you want to use it.
So you must keep the communication with Google, but the problem is now you will be using Google data without a Google Map.
This is a problem, and if your app's popular, and Google realise, they may choose to make a problem with you.
There isn't a correct way around it for now, some apps are tiling Google maps onto Apple maps, but then you will need to register your app with Google for an API key I assume, which limits your number of requests and potentially you may have to pay Google for the API usage.

Related

Bing maps API Traffic information

I am running several apps that use Google Maps. On Android and Windows Phone it's easy to show current traffic information as an overlay on the map. But in iOS this is not a viable option.
Recently Microsoft has added Nokia Traffic data to Bing Maps, and i am wondering if it's possible to use these maps including the traffic overlay on iOS? (via the iOS map control).
If you have any idea or pointers: greatly appreciated!
You can use the Bing Maps Traffic tile data on iOS however the only allowed method of doing this is to use the Bing Maps V7 AJAX control with PhoneGap. This is actually the recommended approach for developing Bing Maps on iOS and performs well. Take a look at this blog post to get started. You can then make use of the Traffic module to pull in the traffic flow data onto the map. You can also access the Bing Maps REST Traffic service to pull in traffic incident data.

is it possible to develop turn by turn navigation for ios app?

I am trying to develop turn by turn navigation app for iphone and ipad.
I have been searching these whole day but it seemed like there is no way to build it without having map data api. (I don't think google map provides that api)
Although I can launch google map app in my app but I would like to do it without using google map app. (without using [UIApplication sharedapplicaiton] openURl...etc)
I just would like to ask if it is possible and feasible to build an ios turn by turn navigation app.
Thank you very much
It's pretty difficult to imagine making a navigation app without some source of map data. An alternative to Google Map API is the OpenStreetMap API. Here is a page on developing OpenStreetMap apps for iOS, which includes a list of currently existing apps. So yes, it's feasible.
A large company with many resources can build this type of app. Apple does not provide any type of API for this. You would need a data source for your maps and a data source and algorithm to give directions. You cannot use Google Maps directions in IOS directly. So the answer is yes it's possible but unlikely to make any money in the app store due to the large initial investment and strong competition.
now iOs 6.0 has replaced google map with built in maps that very easy to implement and a lot of features are also built in

Blackberry Maps for India

I am planning to develop a blackberry application which primarily uses map. Its an India centric application. After some googling I came to know there where no maps support for blackberry for India as of now.
I planned to use Google map API Static and Mobile Maps. As of now I'm loading the maps in browser field. Sometimes the google maps can't plot the direction for the given two co ordinates. I am not able to handle the response.
I like to know whether there are any other option to display maps in India. To show direction from one place to another place. I am getting necessary details from google Maps and Places API.
There are some countries which blackberry can't show in its maps. You can use google maps instead. If you want it then go to web browser of device and type: m.google.com/maps and download and install it.
Then search code for accessing them. I have done it myself

What do the Google Maps Terms of Service mean in practice for an iOS app developer?

I want to use the MapViewController in an iOS app (to allow the user to find the adress of where he is currently at) and came across the "Google Maps Terms of Service for iPhone SDK", but I am a bit lost what some of this means in practice, i.e. what do I need to be aware of and what do I need to do when using a MapViewController. Specifically:
9.2 Reporting. You must implement those reporting mechanisms that Google
has set forth and may update from time
to time in these Terms and in the Maps
API Documentation. For example, as
specified in the Maps API
Documentation, you agree to provide
reports to Google if your Maps API
Implementation enables a device to
detect its own location through use of
a sensor (including but not limited to
GPS, cell triangulation, WiFi or
similar functionality) to display the
location of the device on a map or to
calculate a route.
Obviously I am enabling the device to detect its own location by showing the map with the current location marker. I got lost trying to find some details on what that "reporting" means and if and what kind of it I am supposed implement.
Thanks,
Timo
Taken from Google Maps API Terms of Service:
How does the Google Maps APIs key system work?
Google Maps API keys are only required when using the JavaScript Maps API v2 and the Maps API for Flash [emphasis added].
In order to obtain a Google Maps API key, you must sign in to your Google Account and agree to our Terms of Service. There is no limit to the number of keys you may obtain under a single account.
When you use MKMapView as part of the iPhone SDK, you are using it under Apple's license with Google for the map service. Therefore you do not need to separately agree to the Google Maps API Terms of Service or implement any functionality to meet this requirement.

Using Google Earth API inside iPad app's

I need to create an iPad application that uses Google Earth at its core. So Basically when the app opens it will need to run Google Earth.
Then I would need to add additional features tailored to our business such as photos of our different hotels and offers and different icons and various features.
Is this at all possible and how difficult would it be for a C# developer do you think?
Do you know of any other similar app's besides Google Earth?
This is not possible as Google Earth and the Google Earth Plug-in are, to date, not supported on the iPad. There is a Google Earth iPhone application that works on the iPad but this has no public api. You can however load custom Kml into the application and that may be enough for your needs.
I don't know of any other solutions.

Resources