GLMapLabel
Objective-C
@interface GLMapLabel : GLMapDrawable
Swift
class GLMapLabel : GLMapDrawable
GLMapLabel draws a label on the map.
-
Initializes an empty label that will be displayed with the given drawOrder.
Declaration
Objective-C
- (nonnull instancetype)initWithDrawOrder:(int32_t)drawOrder;Swift
init(drawOrder: Int32)Parameters
drawOrderThe drawOrder of the object.
-
Initializes a label that will be injected into the map tile data (for example, you can set a vector object that can be displayed under map elements).
Declaration
Objective-C
- (nonnull instancetype)init;Swift
init() -
Sets the text to draw.
See
GLMapVectorStyleDeclaration
Objective-C
- (void)setText:(nonnull NSString *)text withStyle:(nonnull GLMapVectorStyle *)style completion:(dispatch_block_t _Nullable)completion;Swift
func setText(_ text: String, with style: GLMapVectorStyle) asyncParameters
textThe new text.
styleThe style object used for the text.
completionA block called when the text is replaced.
-
Creates a new string with a line break near the position.
Declaration
Objective-C
+ (nonnull NSString *)breakLine:(nonnull NSString *)text position:(NSInteger)position;Swift
class func breakLine(_ text: String, position: Int) -> StringParameters
textThe text to break.
positionThe position where the line break will be placed.
Return Value
A new string with a break.
-
Creates a new string with a line break near the default position.
Declaration
Objective-C
+ (nonnull NSString *)breakLine:(nonnull NSString *)text;Swift
class func breakLine(_ text: String) -> StringParameters
textThe text to break.
Return Value
A new string with a break.
Install in Dash
GLMapLabel Class Reference