Apple MapKit 3D flyover

后端 未结 4 815
滥情空心
滥情空心 2021-01-31 12:33

Is there any public iOS 8 API available to implement 3D flyover or at least 3D view as shown on Apple Maps App screenshot below?

4条回答
  •  北恋
    北恋 (楼主)
    2021-01-31 12:38

    Found this in the MapKit Reference:

    Reference Link

    showsBuildings A Boolean indicating whether the map displays extruded building information.

    Declaration SWIFT var showsBuildings: Bool OBJECTIVE-C @property(nonatomic) BOOL showsBuildings Discussion When this property is set to YES and the camera has a pitch angle greater than zero, the map extrudes buildings so that they extend above the map plane, creating a 3D effect. The mapType property must be set to MKMapTypeStandard for extruded buildings to be displayed. The default value of this property is YES.

    Import Statement import MapKit

    Availability Available in iOS 7.0 and later.

    MKMapCameraClass:

    pitch The viewing angle of the camera, measured in degrees.

    Declaration SWIFT var pitch: CGFloat OBJECTIVE-C @property(nonatomic) CGFloat pitch Discussion A value of 0 results in a camera pointed straight down at the map. Angles greater than 0 result in a camera that is pitched toward the horizon by the specified number of degrees. If the map type is MKMapTypeSatellite or MKMapTypeHybrid, the pitch value is clamped to 0.

    The value in this property may be clamped to a maximum value to maintain map readability. There is no fixed maximum value, though, because the actual maximum value is dependent on the current altitude of the camera.

    Import Statement import MapKit

    Availability Available in iOS 7.0 and later.

提交回复
热议问题