"Failed to make complete framebuffer" error using Google maps SDK for iOS
I wonder if it might be because you initialize the map view with a frame of CGRectZero
. I think using CGRectZero
is meant to be used when the view is the view controller's root view, meaning it will be resized to the full size of the screen. Maybe you need to set a size, eg:
[GMSMapView mapWithFrame:CGRectMake(0, 0, 300, 300) camera:camera];
For me, this gets the map working/loading the proper coordinates, but still throws the 8cd6 error. Setup: Xcode 4.6.1 iOS 6.1 using storyboard
I have a view inside of a main view/viewcontroller.
Make sure the UIView (the sub view that is to be the map) under the attribute tab -->class = GMSMapView and is linked to the property *mapView below
YourViewController.h:
#import <UIKit/UIKit.h>
#import <GoogleMaps/GoogleMaps.h>
@interface YourViewController : UIViewController
//other @properties
@property (strong, nonatomic) IBOutlet GMSMapView *mapView;//linked to storyboard
@end
YourViewController.m:
#import "YourViewController.h"
#import <GoogleMaps/GoogleMaps.h>
@interface YourViewController()
@end
/*.. ..other setup code ..*/
-(void)viewDidLoad{
[super viewDidLoad];
GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:-33.8683 longitude:151.2086 zoom:10];
self.mapView.camera = camera;
}
the 8cd6 error has to do with the frame/bounds (obviously). Something isn't getting called (or set?) if you try to initWithFrame. Loading the view hangs and then defaults to the place near London. I did not edit the setMapView for this solution, I merely skipped setting the bounds and let storyboard take care of that.
Still hope someone finds a fix that clears up the 8cd6 error though.