GLMapVectorStyle
Objective-C
@interface GLMapVectorStyle : NSObject
Swift
class GLMapVectorStyle : NSObject
GLMapVectorStyle defines appearance of text and icons (e.g. for GLMapMarkerLayer).
Map rendering style is stored in DefaultStyle.bundle/Style.mapcss. 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 a 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
styleStyle 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
styleStyle rule in MapCSS format.
errorOutput: error if the style cannot be created.
Return Value
New
GLMapVectorStyleobject. -
Adds a custom function that can be called from MapCSS.
Declaration
Objective-C
+ (void)addCustomFunctionWithName:(nonnull NSString *)name flags:(FunctionFlag)flags callback:(nonnull GLMapFunction)callback;Swift
class func addCustomFunction(withName name: String, flags: FunctionFlag, callback: @escaping GLMapFunction)Parameters
nameFunction name.
flagsFunction flags.
callbackFunction implementation.
-
Creates a style with a given icon and tint color.
Declaration
Objective-C
- (nonnull instancetype)initWithIconName:(nonnull NSString *)iconName andIconTint:(GLMapColor)iconTint;Swift
init(iconName: String, andIconTint iconTint: GLMapColor)Parameters
iconNameIcon name.
iconTintTint color.
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