TGCameraPosition


@interface TGCameraPosition : NSObject <NSCopying>

A camera position defining a viewpoint for a map.

  • Initialize a camera position with a location and orientation.

    Declaration

    Objective-C

    - (instancetype)initWithCenter:(CLLocationCoordinate2D)center
                              zoom:(CGFloat)zoom
                           bearing:(CLLocationDirection)bearing
                             pitch:(CGFloat)pitch;

    Swift

    init!(center: CLLocationCoordinate2D, zoom: CGFloat, bearing: CLLocationDirection, pitch: CGFloat)

    Parameters

    center

    The location at the center of the map view

    zoom

    The zoom level of the map view, lower values show more area

    bearing

    The orientation of the map view in degrees clockwise from North

    pitch

    The tilt of the map view in degrees away from straight down

  • The coordinate at the center of the map view.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CLLocationCoordinate2D center;

    Swift

    var center: CLLocationCoordinate2D { get set }
  • The zoom level of the map view. Lower values show more area.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat zoom;

    Swift

    var zoom: CGFloat { get set }
  • The orientation of the map view in degrees clockwise from North.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CLLocationDirection bearing;

    Swift

    var bearing: CLLocationDirection { get set }
  • The tilt of the map view in degrees away from straight down.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGFloat pitch;

    Swift

    var pitch: CGFloat { get set }