在ios中集成google地图

在ios中集成google地图,ios,iphone,google-maps,Ios,Iphone,Google Maps,在视图上,我又添加了一个视图mapView\u googlemaps。我已将此视图分配给xib文件中的GMSMapView&也分配给outlet 在viewDidLoad中,我添加了以下代码 GMSCameraPosition *camera=[GMSCameraPosition cameraWithLatitude:18.554863 longitude:73.804679 zoom:12]; if(IS_IPHONE_5) { mapView_googlem

在视图上,我又添加了一个视图mapView\u googlemaps。我已将此视图分配给xib文件中的GMSMapView&也分配给outlet

在viewDidLoad中,我添加了以下代码

GMSCameraPosition *camera=[GMSCameraPosition cameraWithLatitude:18.554863 longitude:73.804679 zoom:12];

    if(IS_IPHONE_5)
    {
        mapView_googlemaps = [GMSMapView mapWithFrame:CGRectMake(0, 0, 320, 455) camera:camera];

    }
    else
    {
        mapView_googlemaps = [GMSMapView mapWithFrame:CGRectMake(0, 0, 320, 367) camera:camera];
    }
    mapView_googlemaps.myLocationEnabled = YES;
    mapView_googlemaps.trafficEnabled=YES;
    mapView_googlemaps.mapType = kGMSTypeNormal;
    mapView_googlemaps.buildingsEnabled=YES;
    mapView_googlemaps.settings.compassButton = YES;
    mapView_googlemaps.settings.myLocationButton=YES;
    mapView_googlemaps.delegate= self;
    mapView_googlemaps.accessibilityElementsHidden=NO;

 [self.view addSubview:mapView_googlemaps];
但只有当我在iphone上安装应用程序并首次使用时,它才会第一次出现错误。每一次它都会给出不同的错误。以下错误在不同时间出现,但仅在第一次出现

[__NSCFArray serverControlledParamsNotification:]: unrecognized selector sent to instance 0x15ff56a0

[__NSPathstore serverControlledParamsNotification:]: unrecognized selector sent to instance 0x15fuy6h9

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GMSx_PBMutableArray serverControlledParamsNotification:]: unrecognized selector sent to instance 0x157ce1a0'

-[OS_tcp_connection_destination serverControlledParamsNotification:]: unrecognized selector sent to instance 0x15f17aa0

-[__NSCFType serverControlledParamsNotification:]: unrecognized selector sent to instance 0x17feef30'

我认为这个错误是因为错误的初始化。我没有得到确切的错误。

尝试注释掉所有启动mapView的行。\u googlemaps.xxx=是/否,然后查看崩溃是否停止。取消注释,直到找到有罪的行。