如何在GMSMapView

时间:2015-07-11 21:06:36

标签: ios xcode google-maps-sdk-ios

到目前为止,我想在Google Maps for iOS中锁定相机,但没有成功。

目标是将相机对准一个位置,并防止用户自己移动相机。过了一会儿,我想给用户一个相机控制回来

由于

GMSCameraPosition *camera = [GMSCameraPosition cameraWithTarget:location.coordinate zoom:mapView_.camera.zoom];    
[mapView_ animateToCameraPosition:camera];
//here i would like to lock the camera
//do some stuff
//give the user the control back

1 个答案:

答案 0 :(得分:2)

查看GMSUISettings上的setAllGesturesEnabled方法。例如:

[mapView_.settings setAllGesturesEnabled: NO];