iOS 7 Maps: 'Directions not available, Cannot Locate The End Location' - ios

I've been moving an app over to iOS 7 recently, and whilst the majority is working fine now there's a section of code that calls out to Maps to show directions. The code worked fine under iOS 6, and I can't spot any major changes but I might be missing something, I create a MKMapItem and store it as an instance variable and then retrieve it when the user taps on the annotation view. At that stage Maps does load, and throws the directions not available error.

I encountered this a couple of times. I realised that the MKPlacemark I was using to create the MKMapItem had info in the address dictionary which wasn't matching whatever Apple could lookup.
In the end I didn't use any address information, I used only coordinates and then supplied a name to the MKPlacemark (to appear in the annotation in Maps).

Related

How to access custom NMAVenue3dVenue created with HERE Venue Map Admin Tool with Here Maps iOS Premium SDK?

Already done:
Step 1:
Create or edit NMAVenue3dVenue with HERE Venue Map Admin Tool
Step 2:
Get App ID, App Code and License ID with the same account that was used to create the custom venue.
Step 3:
Integrate data from step 2 into ios project
Step 4:
Make sure here maps SDK is loading without any errors
Step 5:
Restart Xcode and clean cache
Result:
NMAVenue3dService listener function venueServiceDidInitialize(_ venueService: NMAVenue3dService!, withResult result: NMAVenue3dServiceInitializationStatus) (with result online success) and venueService(_ venueService: NMAVenue3dService!, didGet venue: NMAVenue3dVenue!, with venueInfo: NMAVenue3dVenueInfo!, with status: NMAVenue3dServiceVenueLoadStatus) getting calls but always with an unexpected venue. (The coordinates for this venue are okay)
I was also trying to obtain custom created NMAVenue3dVenue by manually asking NMAVenue3dService for it to find with specific coordinates and radius or unique id. It seems like NMAVenue3DService is not able to find the custom venue.
Please help me to get connection between custom created private or edited public venue and here maps sdk ios.
Thank you
Assuming the custom map being created is a image-based indoor maps , then it would not be available via the Mobile SDK.
Reference Documentation: https://indoor.here.com/#/tools/help-text-2
Custom image-based indoor maps are only meant for testing deployment
and indoor positioning in HERE Indoor Radio Mapper. The image-based
indoor map will not be exposed to applications via HERE Mobile SDK.

Default MkMapView Region

Please tell me what is the default map location when it simply add to the view.
I added mapview like this
MKMapView *mapView = [[MKMapView alloc] initWithFrame:CGRectMake(0, self.searchBar.frame.size.height, 320, 180)];
mapView.mapType=MKMapTypeStandard;
mapView.delegate=self;
[self.view addSubview:mapView];
what location will show on map ?
Is this according to device coordinates or by other
Thanks
After done so googling and reading apple map doc.
I found the solution the default location is the device local that is International in Settings -> general ->International->ResionFormat-> select your country.
map will focus according to this setting.
I think the system makes a call and Apple's servers return this info.
I've made a little test with simulator (Extra info: I'm in Spain):
Test 1
Turn off internet access
iOS simulator > Reset content and settings
Build and run app w/mapview
Turn on internet access
Little scroll on map (just for change region a little and begin with map tiles downloading)
United states is being displayed on screen
Test 2 (wihtout turning off internet)
iOS simulator > Reset content and settings
Build and run app w/mapview
Spain is being displayed on screen
I don't think that Apple's getting user location without consent. It could be a request for default location IP based as a part of operative system.
I'm pretty sure it's lat/long 0, 0 which is somewhere in the ocean above Africa. You see this as a bug in a surprising number of apps which don't set the lat long and you end up seeing a map showing just blue - the sea.
Suggest you just test it!
No answer seems to be correct, at least with iOS8. Apple does not provide documented information on the default region of a mapView, but I believe that MapKit makes a request to the Apple server to get the current country code. In fact, if you try to turn off Internet connection and open a viewcontroller with a simple map just allocated and added as subview to the main view, the debugger will display this message:
Could not determinates current country code: Error Domain = GEOErrorDomain Code = 2 "The operation could not be completed. (GEOErrorDomain error -2.)
There's something unknown that gets the current country code and shows that country as initial region in a mapview. This "current country code" is not related with the user location, as the message is also shown by disabling location services (unless Apple takes the user's location without user authorization, which is impossible). Maybe it uses the IP address of the Internet connection to make IP tracert. I will try to use a proxy to verify.

Get human readable address using Google maps iOS sdk

I am developing an iOS app which integrates google maps iOS sdk .
In my GMSMapView I have dropped a GMSMarker, I want to set the title of the marker with location name . I have tried GMSAddress, GMSGeocoder and GMSReverseGeocodeResult but I could not get the exact location name. How can get the complete address of the current location.
This post should have what you're after. Basically upgrade to v1.7 and use GMSAddress
The linked post includes a code sample you can use as well.

Google Maps SDK for iOS doesn't display map content

I'm using the current version 1.1.2 of Google Maps SDK for iOS. The map only displays the Google logo, the current location and the added marker. But no map content whatsoever:
I correctly registered the API key:
BOOL result = [GMSServices provideAPIKey:#"<my key>"];
the result is YES and I verified that the bundleIdentifier matches with the API console. I load the GMSMapView from a storyboard and set the camera in my -viewDidLoad:
self.mapView.camera = [GMSCameraPosition cameraWithLatitude:0 longitude:0 zoom:2];
This is logged by GMSMapView:
Failed to make complete framebuffer object 8cd6
Failed to make complete framebuffer object 8cd6
Google Maps SDK for iOS version: 1.1.2.2533
GMSZoomTableQuadTree lacks root zoom table for tile type (mapType: 10)
GMSZoomTableQuadTree lacks root zoom table for tile type (mapType: 15)
Any idea what could cause this problem?
Found the solution myself.
I'm using Auto Layout. Apparently, in -viewDidLoad the Auto Layout hasn't yet done its work and my GMSMapView still had a CGRectZero frame. GMSMapView seems to react very picky on a zero frame.
[self.view layoutIfNeeded];
prior to setting the camera solved the problem for me.
This could also be caused by not having the right bundle ID entered under the API key in your Google API Console.
Just in case someone comes here and nothing works...
I was having this problem and got bored so I unzoomed the map and discovered I messed up with the location and my map center was in the middle of a desert!
Map was working just fine.
So try to unzoom, just in case.
If you have included both GoogleMaps.framework and GoogleMapsM4B.framework (Maps for Business) in your XCode project, remove GoogleMapsM4B.framework.
Otherwise you'll need to enable Google Maps Mobile SDK for Work through Enterprise Support portal instead of Google Maps SDK for iOS from Cloud Console.
I also had the same problem.The issue was I used two iOS Api keys in 2 different places in code.Please check whether you have used correct API Key (iOS Key) from google Api console.Use the same key through out your app.

How to integrate new Google map app with ios app

Google Map is now available in Appstore for IOS 6. I have a application which utilises MAPKIT and WebView to show Driving direction using Google webservices.
For showing Route in Native Apple MAP app, i use codes similar to this..
MKMapItem *mapItem = [[MKMapItem alloc]initWithPlacemark:place];
NSDictionary *options = #{
MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving
};
[mapItem openInMapsWithLaunchOptions:options];
I want to show Route to the user in the New Google MaP App installed on user device, embeed its UI within a View in my app.
Do guide me.
Goole have released latest API for IOS 6.0 and up.
For that follow the step below
You have to registered your app and get the keys from Map IOS access.
Refer the following link for further detail
New way to add google maps in iOS 6 app
For displaying the directions within the GoogleMaps app, using the new GoogleMaps URL scheme along the lines of:
comgooglemaps://?saddr=Google+Inc,+8th+Avenue,+New+York,+NY&daddr=John+F.+Kennedy+International+Airport,+Van+Wyck+Expressway,+Jamaica,+New+York&directionsmode=transit
Taken from the documentation should help you. A short browse from there, you will also notice that Google have released an SDK for the new GoogleMaps, with access tokens being rolled out slowly. Doc
seemed to cut off the end of my answer, but #Hi Ren has filled in the end with the link to the documentation to the new SDK.

Resources