4

是否可以选择以某种方式缩小使用新的 Google Maps sdk 创建的 iOS 应用程序?比如展示整个世界?

4

1 回答 1

3

GMSCameraPosition.h 包含两个常量

/**
 * 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 地球。

于 2013-03-17T18:53:59.427 回答