新しいGoogleMapsSDKで作成されたiOSアプリをどうにかしてズームアウトするオプションはありますか?たとえば、全世界を表示したいですか?
1479 次
1 に答える
3
GMSCameraPosition.h には 2 つの const が含まれています
/**
* The maximum zoom (closest to the Earth's surface) permitted by the map
* camera.
*/
FOUNDATION_EXTERN const CGFloat kGMSMaxZoomLevel;
/**
* The minimum zoom (farthest from the Earth's surface) permitted by the map
* camera.
*/
FOUNDATION_EXTERN const CGFloat kGMSMinZoomLevel;
次のように言うと、ズームアウトできます。
self.googleMap.camera = [GMSCameraPosition
cameraWithLatitude:self.googleMap.camera.target.latitude
longitude:self.googleMap.camera.target.longitude
zoom:kGMSMinZoomLevel
bearing:self.googleMap.camera.bearing
viewingAngle:self.googleMap.camera.viewingAngle];
self.googleMap が GMSMapView の場合。(もっと簡単な方法があるかもしれませんが、これはうまくいきます)
さらにズームアウトして 3D 地球儀や smtg を表示する方法はありません。そのためには Google Earth が必要です。
于 2013-03-17T18:53:59.427 に答える