자동 완성 API에서 Google 지역 정보를로드 한 다음 내지도를 확대하려면 장소 세부 정보를 찾습니다.GMSMapView가 확대되지 않음
내보기 컨트롤러를 실행할 때 볼 수있는 내 XIB에 GMSMapView
이 정의되어 있습니다.
이다 말을 내 디버거에도 불구하고 축소 상태를 유지 4. 에있다?
(lldb) po self.map
<GMSMapView: 0x7f8c62a9ebc0; frame = (0 73.3333; 414 576.667); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x7f8c67029fc0>; layer = <GMSMapLayer: 0x7f8c62a57aa0>>
(lldb) po self.map.camera
GMSCameraPosition 0x7f8c62d2d030: target:(29.741, -95.374) bearing:0.000 zoomLevel:2.000 viewingAngle:0.000
- (void)viewDidLoad {
[super viewDidLoad];
[self setupButtons];
self.map.delegate = self;
self.client = [GMSPlacesClient sharedClient];
[self.client lookUpPlaceID:self.prediction.placeID callback:^(GMSPlace * _Nullable result, NSError * _Nullable error) {
[self showResult:result];
}];
}
- (void)showResult:(GMSPlace *)place {
self.place = place;
GMSCameraPosition *position = [[GMSCameraPosition alloc] initWithTarget:place.coordinate zoom:0.2 bearing:0 viewingAngle:0];
[self.map setCamera:position];
[self.map animateWithCameraUpdate:[GMSCameraUpdate setTarget:place.coordinate zoom: 0.15]];
[self.map moveCamera:[GMSCameraUpdate setTarget:place.coordinate zoom: 0.15]];
}
'setCamera :'또는'[self.map animateWithCameraUpdate : [GMSCameraUpdate setTarget : place.coordinate zoom : 0.15]]와 같은 메소드를 사용해 보셨습니까? – emotality
animateWithCameraUpdate 및 setCamera 시도했습니다 - 위에서 편집 한 ^ – quantumpotato