Reputation: 195
I have a GMSMapView on my storyboard
@property (strong, nonatomic) IBOutlet GMSMapView *gmsMapViewUI;
Using the instructions I am unable to get my this mapView to update to the new coordinates. This had been working for me in the past but I have since restructured the function and seem to be missing some crucial detail to get the map to load correctly again. There are so few lines to my call I must have missed one thing or another. Google SDK doesn't give me any clear information either.
GMSCameraPosition *newCam=[GMSCameraPosition cameraWithLatitude:33 longitude:122 zoom:16];
self.gmsMapViewUI=[GMSMapView mapWithFrame:self.gmsMapViewUI.bounds camera:newCam];
self.gmsMapViewUI.delegate=self;
Upvotes: 0
Views: 543
Reputation: 37
You can also try this to move to a new cameraPosition.
[self.gmsMapViewUI animateToCameraPosition:newCam];
Upvotes: 0
Reputation: 49
Have you tried to set the camera only instead of throwing away the GMSMapView created by the storyboard? Like
self.gmsMapViewUI.camera = newCam;
Upvotes: 1