MaplyLabel
Objective-C
@interface MaplyLabel : NSObject
Swift
class MaplyLabel : NSObject
This is a 3D label.
The Maply Label is a 3D object that sits on top of the globe (or map) at a specified location. If you want a 2D label that sits on top of everything else, you want the MaplyScreenLabel. Seriously, you probably want that.
-
The location (in geographic) for this label.
The Maply Label is a 3D object and this is its location on the globe or map. The coordinates are in geographic (lon/lat) and the actual layout is controleld by justify.
Declaration
Objective-C
@property (nonatomic) MaplyCoordinate loc;
Swift
var loc: MaplyCoordinate { get set }
-
Size of the label in display units.
The Maply Label is a 3D object placed on top of the globe or map. This controls the size of that label in display coordinates. For the globe display coordinates are based on a radius of 1.0.
One or both values of the size can be set. Typically you want to set the height and let the toolkit calculate the width.
Declaration
Objective-C
@property (nonatomic) CGSize size;
Swift
var size: CGSize { get set }
-
The text to display on the globe or map at the given location.
Declaration
Objective-C
@property (nonatomic, strong) NSString *_Nullable text;
Swift
var text: String? { get set }
-
Text can be accompanied by an optional icon image.
If set, we’ll put this image to the left of the text in the label. The UIImage (or MaplyTexture) will be tracked by the view controller and reused as needed or disposed of when no longer needed.
The name had to change because Apple’s private selector search is somewhat weak.
Declaration
Objective-C
@property (nonatomic, strong) id _Nullable iconImage2;
Swift
var iconImage2: Any? { get set }
-
An option color override.
If set, this color will override the color passed in with the NSDictionary in the view controller’s add method.
Declaration
Objective-C
@property (nonatomic, strong) UIColor * __nullable color
Swift
var color: UnsafeMutablePointer<Int32>? { get set }
-
Label selectability. On by default
If set, this label can be selected by the user. If not set, this label will never appear in selection results.
Declaration
Objective-C
@property (nonatomic) _Bool selectable;
Swift
var selectable: Bool { get set }
-
The text justification based on the location. Text can be placed around the location based on this value.
Justify Value Description MaplyLabelJustifyLeft The label will be placed with its left side on the location. MaplyLabelJustifyMiddle The label will be centered on the location. MaplyLabelJustifyRight The label will be placed with its right side on the location. Declaration
Objective-C
@property (nonatomic) MaplyLabelJustify justify;
Swift
var justify: MaplyLabelJustify { get set }
-
User data object for selection
When the user selects a feature and the developer gets it in their delegate, this is an object they can use to figure out what the label means to them.
Declaration
Objective-C
@property (nonatomic, strong) id _Nullable userObject;
Swift
var userObject: Any? { get set }