GLMapVectorStyle
Objective-C
@interface GLMapVectorStyle : NSObject
Swift
class GLMapVectorStyle : NSObject
GLMapVectorStyle is used to define appearance of text inside GLMapMarkerLayer or GLMapView.
Style is used to render a map, which is stored inside DefaultStyle.bundle/Style.mapcss file. Detailed MapCSS specification is located at:
http://www.mapcss.org
-
Unavailable
Please use
[GLMapVectorStyle createStyle:]and[GLMapVectorStyle createStyle:error:]Default -init is disabled.
Declaration
Objective-C
- (nonnull instancetype)init; -
Creates style object.
GLMapVectorStyle *style = [GLMapVectorStyle createStyle(@"{font-size:12;}"];Declaration
Objective-C
+ (nullable instancetype)createStyle:(nonnull NSString *)style;Swift
class func createStyle(_ style: String) -> Self?Parameters
styleNSString with style rule in MapCSS format
Return Value
New
GLMapVectorStyleobject -
Creates style object.
Declaration
Objective-C
+ (nullable instancetype)createStyle:(nonnull NSString *)style error:(NSError *_Nullable *_Nullable)error;Swift
class func createStyle(_ style: String, error: ()) throws -> SelfParameters
styleNSString with style rule in MapCSS format
errorError is filled if object cannot be created
Return Value
New
GLMapVectorStyleobject -
Adds custom function
Declaration
Objective-C
+ (void)addCustomFunctionWitName:(nonnull NSString *)name flags:(FunctionFlag)flags callback:(nonnull GLMapFunction)callback;Swift
class func addCustomFunctionWitName(_ name: String, flags: FunctionFlag, callback: @escaping GLMapFunction)Parameters
namename of function
flagsflags of function
callbackfunction callback
-
Creates style with given iconName and iconTint
Declaration
Objective-C
- (nonnull instancetype)initWithIconName:(nonnull NSString *)iconName andIconTint:(GLMapColor)iconTint;Swift
init(iconName: String, andIconTint iconTint: GLMapColor)Parameters
iconNamename of icon
iconTinttint color of icon
Return Value
New
GLMapVectorStyleobject -
Resolved value of ‘icon-image’ attribute.
Declaration
Objective-C
@property (readonly) GLMapValue *_Nullable iconName;Swift
var iconName: GLMapValue? { get } -
Resolved value of ‘icon-tint’ attribute.
Declaration
Objective-C
@property (readonly) GLMapColor iconTint;Swift
var iconTint: GLMapColor { get } -
Resolved value of ‘icon-scale’ attribute.
Declaration
Objective-C
@property (readonly) CGFloat iconScale;Swift
var iconScale: CGFloat { get } -
Resolved value of ‘text’ attribute.
Declaration
Objective-C
@property (readonly) GLMapValue *_Nullable text;Swift
var text: GLMapValue? { get } -
Subset of parameters that defines only text style
Declaration
Objective-C
@property (readonly) GLMapVectorStyle *_Nullable textStyleSubset;Swift
var textStyleSubset: GLMapVectorStyle? { get } -
Resolved value of ‘details-text’ attribute.
Declaration
Objective-C
@property (readonly) GLMapValue *_Nullable detailsText;Swift
var detailsText: GLMapValue? { get } -
Resolved value of ‘details-description’ attribute.
Declaration
Objective-C
@property (readonly) GLMapValue *_Nullable detailsDescription;Swift
var detailsDescription: GLMapValue? { get }
Install in Dash
GLMapVectorStyle Class Reference