Crash in Google maps cocoapod in iOS project

35 Views Asked by At

My project is using GoogleMap (8.3.0) version. It is working all good. But suddenly it is crashing with the error :

*** -[__NSDictionaryM setObject:forKeyedSubscript:]: key cannot be nil -[GMSStyleTableService checkStyleTableMemoryCacheForKey:callbackQueue:handler:]

Here is what i tried to make sure mapview is not nil :

if(self.mapView==nil) return;

self.mapView.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height);

GMSPath *path = [GMSPath pathFromEncodedPath:pathString];

GMSCoordinateBounds *bounds = [[GMSCoordinateBounds alloc] initWithPath:path];

GMSPolyline *polyline = [GMSPolyline polylineWithPath:path];
polyline.strokeWidth = 3;
polyline.strokeColor = color.blue;
polyline.map = self.mapView;

GMSCameraPosition *camera = [self.mapView cameraForBounds:bounds insets:UIEdgeInsetsMake(32, 32, 32, 32)];
self.mapView.camera = camera;

GMSMarker *myMarker = [[GMSMarker alloc] init];
myMarker.position = self.myCoords;
myMarker.icon = [UIImage imageNamed:@"dot.png"];
myMarker.map = self.mapView;
0

There are 0 best solutions below