Google Maps SDK doesnt return directions - ios

I've installed Google Maps SDK for iOS thinking that I would get the directions between two places, like , the web API but following the tutorial what it seems is that it just opens the Google Maps app, which can also be done without the SDK.
Am I understanding it wrong or the Google Maps SDK only offers open the app?
Thanks

Well, it depends exactly what you mean and want by "directions".
The Google Maps SDK for iOS does not itself do any sort of directions.
What you can do is use the Google Maps Directions web service to obtain information, then use that information to create a GMSPolyline which then can be rendered atop your in-app map. So basically it can show the line between point A and B, which is some level of directions, but may or may not be what you're wanting. Here's a YouTube video from Google that shows how to do this, and some sample code from Google's Mano Marks.
But if what you want are turn-by-turn directions, spoken directions, etc., no, the SDK cannot do that; you have to launch the external Google Maps app.

Related

City search in iOS

Is there any native city name search feature in iOS SDK?
For example, in lafourchette application - https://itunes.apple.com/fr/app/lafourchette-reservation-restaurants/id424850908?mt=8
How in this application done search feature?
(you can see it at attached gif Example of city name search)
It is use native Apple SDK for retrieving cities or some outside internet service?
You can use both the iOS Maps SDK or a third-party service such as Google Maps SDK or even Foursquare API. I'm not sure which one lafourchette uses but here are some useful links to get you started:
iOS Maps SDK (CLGeocoder or MKReverseGeocoder)
https://developer.apple.com/library/ios/documentation/userexperience/conceptual/LocationAwarenessPG/UsingGeocoders/UsingGeocoders.html#//apple_ref/doc/uid/TP40009497-CH4-SW2
Google Maps SDK
https://developers.google.com/maps/documentation/ios/start
Foursquare API
https://developer.foursquare.com/resources/libraries
The concept you are talking about is called Reverse Geocoding, and can be found in the iOS docs. There are also several third party companies like Google who do this as well.

Get directions in my app when someone uses Google Maps directions

When someone uses the Google Maps app on iOS to get directions, I would like to know in real time the destination of the user and the direction. The goal is not for him to use my app to navigate but for my app to suggest him places in real time along his route (and in advance).
Do you think this is feasible with the Google Maps API for iOS? If yes, how would you do it? And if no, do you have other ideas?
Thank you !
Nope. There is no way to monitor what other apps are doing in iOS.
This isn't possible in the way that you're framing the question, but it is possible to include Google Maps in your own application if you combine the Google Maps SDK for iOS, the Google Directions API (on the web), and either the Google Places API or the Yelp API.
Use the Google Directions API to get directions (a list of lat/lng points in JSON form), plot these points as Polyline using the Google Maps SDK for iOS, and use those points to search for nearby points of interest with the Google Places API or the Yelp API.

Streetview from Google Maps SDK for iOS?

Looks like this question hasn't been asked in a while...
Any way to get streetview from the Google Maps SDK for iOS?
I have a client who is specifically interested in the Google Maps Streetview feature for his app, but, like most clients, he really doesn't want the feature to require going outside of the app. (This is where Android is one up on iOS, with their omnipresent back button. Sigh.)
The need for streetview is driven by a clear benefit in this app to being able to see actual images of buildings, lots, etc. as opposed to the 3D satellite imagery in Apple Maps, which is cool but not well suited for this app's purposes, as the buildings, lots, etc. are distorted.
I combed through the documentation for the iOS Google Maps SDK, looking for a way to get streetview.
I also downloaded the SDK and ran through the demos.
No dice on either account.
I see that I can get to a streetview image using Google Street View Image API, which is better than nothing:
https://developers.google.com/maps/documentation/streetview/
Here is a sample call from the documentation:
http://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,%20-73.988354&fov=90&heading=235&pitch=10&sensor=false
But building something into the app to let the user modify things like the size (via zoom), heading, pitch, etc. sure feels like I would be "reinventing the wheel" and is something that would be available in an SDK...
Thanks!
Del
Google Maps iOS SDK 1.4 (released a few hours ago) has this feature:
Street View in iOS SDK
The best option currently available for accessing streetview from google maps ios sdk seems to be using the Google Maps URL scheme which will call the official google maps app for iphone based on the values provided by the user from the custom maps app(using ios sdk). The input values that can be used with the url scheme include:
1, mapmode : here streetview option can be chosen to show the map in streetview mode
2, center : center latitude,longitude point for the map to be displayed
3, zoom
4, views

Is there a 3rd party google maps API for iOS

I need to remove mapkit from my iOS app but still need google maps. In this particular instance I merely need satellite views that are zoomable and scrollable. Markers would be nice, but not required.
I can use a webview with javascript, but I'd prefer a mapkit-like API so I can simply transition away from mapkit without significant effort.
Are there third party google map APIs I can use that allow me to use google maps on iOS devices without invoking Apple's built in mapping API?
Google released their new Maps SDK for iOS yesterday. It can be found here: https://developers.google.com/maps/documentation/ios/
If you are looking for an alternative library, there are a few:
RouteMe which is open source and supports multiple map sources.
MapBox is a third party service with an iOS SDK
The Google Maps terms of service specifically prevents direct tile access. You will not be able to legally use Google Maps tiles on iOS outside of MapKit.

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

Resources