ZMSCameraPosition
Objective-C
@interface ZMSCameraPosition : NSObject <NSCopying>
Swift
class ZMSCameraPosition : NSObject, NSCopying
カメラ位置情報クラス
カメラの位置情報を保持する。
Note
初期化不可。イニシャライザーに有効範囲外の数値が設定された場合、有効範囲内に正規化される。
-
座標 (読み取り専用)
カメラ位置の緯度/経度を指定する。
Note
緯度 / 経度Declaration
Objective-C
@property (nonatomic, readonly) CLLocationCoordinate2D target;
Swift
var target: CLLocationCoordinate2D { get }
-
ズームレベル (読み取り専用)
地図の縮尺を変更する。
Note
有効範囲: 2.0 - 21.0 (2.0が最も引いた状態)
有効範囲を超えた分は有効範囲内に正規化される。Declaration
Objective-C
@property (nonatomic, readonly) float zoom;
Swift
var zoom: Float { get }
-
方位角 (読み取り専用)
地図の北を指定した角度に回転させる。
Note
有効範囲: 0 - 360度 (時計回り)
デフォルト値: 0
有効範囲を超えた分は循環し、360度以内に正規化される。Declaration
Objective-C
@property (nonatomic, readonly) CLLocationDirection bearing;
Swift
var bearing: CLLocationDirection { get }
-
傾き角度 (読み取り専用)
地図の平面を指定した角度に傾ける。
Note
有効範囲: 0 - 30度 (0度は地図平面に対して直角)
デフォルト値: 0
超えた分は有効範囲内に正規化される。Declaration
Objective-C
@property (nonatomic, readonly) double viewingAngle;
Swift
var viewingAngle: Double { get }
-
ZMSCameraPositionのイニシャライザー
Declaration
Objective-C
- (nonnull instancetype)initWithTarget:(CLLocationCoordinate2D)target zoom:(float)zoom bearing:(CLLocationDirection)bearing viewingAngle:(double)viewingAngle;
Swift
init(target: CLLocationCoordinate2D, zoom: Float, bearing: CLLocationDirection, viewingAngle: Double)
Parameters
target:
座標(緯度/経度)
zoom:
ズームレベル
bearing:
方位角
viewingAngle:
傾き角度
-
座標とズームレベルでZMSCameraPostionを生成する
Declaration
Objective-C
+ (nonnull instancetype)cameraWithTarget:(CLLocationCoordinate2D)target zoom:(float)zoom;
Swift
class func camera(withTarget target: CLLocationCoordinate2D, zoom: Float) -> Self
Parameters
target:
座標(緯度/経度)
zoom:
ズームレベル
Return Value
カメラ位置情報
-
緯度と経度とズームレベルでZMSCameraPostionを生成する
Declaration
Objective-C
+ (nonnull instancetype)cameraWithLatitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude zoom:(float)zoom;
Swift
class func camera(withLatitude latitude: CLLocationDegrees, longitude: CLLocationDegrees, zoom: Float) -> Self
Parameters
latitude:
緯度
longitude:
経度
zoom:
ズームレベル
Return Value
カメラ位置情報
-
座標とその他カメラプロパティでZMSCameraPostionを生成する
Declaration
Objective-C
+ (nonnull instancetype)cameraWithTarget:(CLLocationCoordinate2D)target zoom:(float)zoom bearing:(CLLocationDirection)bearing viewingAngle:(double)viewingAngle;
Swift
class func camera(withTarget target: CLLocationCoordinate2D, zoom: Float, bearing: CLLocationDirection, viewingAngle: Double) -> Self
Parameters
target:
座標(緯度/経度)
zoom:
ズームレベル
bearing:
方位角
viewingAngle:
傾き角度
Return Value
カメラ位置情報
-
緯度と経度とその他カメラプロパティでZMSCameraPostionを生成する
Declaration
Objective-C
+ (nonnull instancetype)cameraWithLatitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude zoom:(float)zoom bearing:(CLLocationDirection)bearing viewingAngle:(double)viewingAngle;
Swift
class func camera(withLatitude latitude: CLLocationDegrees, longitude: CLLocationDegrees, zoom: Float, bearing: CLLocationDirection, viewingAngle: Double) -> Self
Parameters
latitude:
緯度
longitude:
経度
zoom:
ズームレベル
bearing:
方位角
viewingAngle:
傾き角度
Return Value
カメラ位置情報
-
Deprecated
緯度と経度とその他カメラプロパティでZMSCameraPostionを生成する
Declaration
Objective-C
+ (nonnull instancetype)cameraWithLatitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude bering:(CLLocationDirection)bearing zoom:(float)zoom;
Swift
class func camera(withLatitude latitude: CLLocationDegrees, longitude: CLLocationDegrees, bering bearing: CLLocationDirection, zoom: Float) -> Self
Parameters
latitude:
緯度
longitude:
経度
bearing:
方位角
zoom:
ズームレベル
Return Value
カメラ位置情報