GLMapLabel
Objective-C
@interface GLMapLabel : GLMapDrawable
Swift
class GLMapLabel : GLMapDrawable
GLMapLabel
draws a label on map.
-
Initializes empty label that will be displayed with given drawOrder
Declaration
Objective-C
- (nonnull instancetype)initWithDrawOrder:(int32_t)drawOrder;
Swift
init(drawOrder: Int32)
Parameters
drawOrder
drawOrder of object
-
Initializes image that will be injected into map tile data (for example you can set vector object that can be displayed under map elements)
Declaration
Objective-C
- (nonnull instancetype)init;
Swift
init()
-
Sets text to draw
See
Declaration
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) async
Parameters
text
New text
style
A style object used for text
completion
A block called when text is replaced.
-
Creates a new string with line breaks near position
Declaration
Objective-C
+ (nonnull NSString *)breakLine:(nonnull NSString *)text position:(NSInteger)position;
Swift
class func breakLine(_ text: String, position: Int) -> String
Parameters
text
- text to break
position
- position where line break will be placed
Return Value
new string with break
-
Creates a new string with line breaks near default position
Declaration
Objective-C
+ (nonnull NSString *)breakLine:(nonnull NSString *)text;
Swift
class func breakLine(_ text: String) -> String
Parameters
text
- text to break
Return Value
new string with break