Google Maps SDK for iOS doesn't display map content - ios

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.

Related

Google Maps Blank but still has location on Simulator

I have been trying just about every tutorial I can find but I have no luck rendering the google map tiles behind the map in the view. I have double checked google console etc. But I have no luck
As you can see I can get the location to load up correctly, but the actual map behind it doesn't work at all. I have run out of ideas :(
try
check it on real device
double check that API Key of google maps correct and you enable google maps form google console
self.view = mapView in didLayoutSubView Method

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.

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

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).

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.

disabling ipad from creating placemarks on google map

I have a google map that I created with KML:
Here is a link to the map:
http://goo.gl/maps/dkfjU
Here is the complete KML file:
https://dl.dropbox.com/u/94943007/02bb39645a3c9d95afeed5cb9bd5d07c040d8ca8a4ee56b9fb367d38.kml
When browsing this map with my IPAD using safari, for some reason when I tap anywhere on the map, it creates a point there on the map.
How do I disable point creation on the map so that IPAD users are not able to do this?
I checked the link as well and Marcelo seems to be correct. To have a maps with the ability to turn on and off layers you will need to build your own site and perhaps use Javascript and the Google-maps API to build it. Maybe start here: https://developers.google.com/maps/documentation/javascript/tutorial
You cannot disable adding a place mark if you are browsing the map in safari
You can control it if you use map kit iOS API of the iOS SDK.
For importing KML-Data into that SDK, you can use Sample Code from
Apple:
http://developer.apple.com/library/ios/#samplecode/KMLViewer/Introduction/Intro.html
But there is no built-in KML Import in iOS SDK. You can use other
frameworks as mapbox/Simple-KML here
https://github.com/mapbox/Simple-KML
If you want to do this in safari, then you're lost, unless you can manipulate that using JavaScript!!!

Resources