1
下面的代碼工作,以及在谷歌地圖iOS版SDK 1.8,但得到的錯誤版本1.4如何適應在地圖上的所有可見對象/界限(谷歌地圖iOS版SDK 1.4)
[mapView animateWithCameraUpdate:[GMSCameraUpdate fitBounds:bounds3]];
camera=[mapView cameraForBounds:bounds3 insets:UIEdgeInsetsZero];
CLLocationCoordinate2D mapCenter = camera.target;
camera = [GMSCameraPosition cameraWithLatitude:mapCenter.latitude
longitude:mapCenter.longitude
zoom:camera.zoom];
,但我不得不降級我的谷歌將iOS SDK版本映射到1.4以支持iOS 5.1並面對以下代碼行出現錯誤,看起來cameraForBounds功能在舊版本中不可用。
camera=[mapView cameraForBounds:bounds3 insets:UIEdgeInsetsZero];
那麼任何人都可以建議替代嗎?