GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSFeatureStyle
@interface GMSFeatureStyle : NSObject <NSCopying, NSMutableCopying>
Specifies how a map feature should appear when displayed on a map.
-
Declaration
Objective-C
+ (nonnull instancetype)styleWithFillColor:(nullable UIColor *)fillColor
strokeColor:(nullable UIColor *)strokeColor
strokeWidth:(CGFloat)strokeWidth;
-
Declaration
Swift
init(fill fillColor: UIColor?, stroke strokeColor: UIColor?, strokeWidth: CGFloat)
Objective-C
- (nonnull instancetype)initWithFillColor:(nullable UIColor *)fillColor
strokeColor:(nullable UIColor *)strokeColor
strokeWidth:(CGFloat)strokeWidth;
-
Initializes a default style.
Declaration
Objective-C
- (nonnull instancetype)init;
-
Specifies the fill color, including the alpha channel.
Declaration
Swift
@NSCopying var fillColor: UIColor? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) UIColor *fillColor;
-
Specifies the border color, including the alpha channel.
Declaration
Swift
@NSCopying var strokeColor: UIColor? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) UIColor *strokeColor;
-
Specifies the border width, in screen points.
Declaration
Swift
var strokeWidth: CGFloat { get }
Objective-C
@property (nonatomic, readonly) CGFloat strokeWidth;
-
Specifies the radius of a point. Only applies to point geometries.
Declaration
Swift
var pointRadius: CGFloat { get }
Objective-C
@property (nonatomic, readonly) CGFloat pointRadius;
-
Declaration
Swift
func copy() -> FeatureStyle
Objective-C
- (GMSFeatureStyle *)copy;
-
Declaration
Swift
func mutableCopy() -> MutableFeatureStyle
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eGMSFeatureStyle\u003c/code\u003e defines the visual appearance of map features, such as fill color, border color, and border width.\u003c/p\u003e\n"],["\u003cp\u003eIt can be used to style points, lines, and polygons on a Google Map.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can create and customize \u003ccode\u003eGMSFeatureStyle\u003c/code\u003e instances to achieve desired visual effects.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGMSFeatureStyle\u003c/code\u003e class provides properties to control fill color, stroke color, stroke width, and point radius.\u003c/p\u003e\n"],["\u003cp\u003eIt is immutable and can be copied to create modified versions using \u003ccode\u003emutableCopy\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# GoogleNavigation Framework Reference\n\nGMSFeatureStyle\n===============\n\n\n @interface GMSFeatureStyle : NSObject \u003cNSCopying, NSMutableCopying\u003e\n\nSpecifies how a map feature should appear when displayed on a map.\n- `\n ``\n ``\n `\n\n ### [+styleWithFillColor:strokeColor:strokeWidth:](#/c:objc(cs)GMSFeatureStyle(cm)styleWithFillColor:strokeColor:strokeWidth:)\n\n `\n ` \n Creates a new style. \n\n #### Declaration\n\n Objective-C \n\n + (nonnull instancetype)styleWithFillColor:(nullable UIColor *)fillColor\n strokeColor:(nullable UIColor *)strokeColor\n strokeWidth:(CGFloat)strokeWidth;\n\n- `\n ``\n ``\n `\n\n ### [-initWithFillColor:strokeColor:strokeWidth:](#/c:objc(cs)GMSFeatureStyle(im)initWithFillColor:strokeColor:strokeWidth:)\n\n `\n ` \n Initializes a new style. \n\n #### Declaration\n\n Swift \n\n init(fill fillColor: UIColor?, stroke strokeColor: UIColor?, strokeWidth: CGFloat)\n\n Objective-C \n\n - (nonnull instancetype)initWithFillColor:(nullable UIColor *)fillColor\n strokeColor:(nullable UIColor *)strokeColor\n strokeWidth:(CGFloat)strokeWidth;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMSFeatureStyle(im)init)\n\n `\n ` \n Initializes a default style. \n\n #### Declaration\n\n Swift \n\n init()\n\n Objective-C \n\n - (nonnull instancetype)init;\n\n- `\n ``\n ``\n `\n\n ### [fillColor](#/c:objc(cs)GMSFeatureStyle(py)fillColor)\n\n `\n ` \n Specifies the fill color, including the alpha channel. \n\n #### Declaration\n\n Swift \n\n @NSCopying var fillColor: UIColor? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) UIColor *fillColor;\n\n- `\n ``\n ``\n `\n\n ### [strokeColor](#/c:objc(cs)GMSFeatureStyle(py)strokeColor)\n\n `\n ` \n Specifies the border color, including the alpha channel. \n\n #### Declaration\n\n Swift \n\n @NSCopying var strokeColor: UIColor? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) UIColor *strokeColor;\n\n- `\n ``\n ``\n `\n\n ### [strokeWidth](#/c:objc(cs)GMSFeatureStyle(py)strokeWidth)\n\n `\n ` \n Specifies the border width, in screen points. \n\n #### Declaration\n\n Swift \n\n var strokeWidth: CGFloat { get }\n\n Objective-C \n\n @property (nonatomic, readonly) CGFloat strokeWidth;\n\n- `\n ``\n ``\n `\n\n ### [pointRadius](#/c:objc(cs)GMSFeatureStyle(py)pointRadius)\n\n `\n ` \n Specifies the radius of a point. Only applies to point geometries. \n\n #### Declaration\n\n Swift \n\n var pointRadius: CGFloat { get }\n\n Objective-C \n\n @property (nonatomic, readonly) CGFloat pointRadius;\n\n- `\n ``\n ``\n `\n\n ### [-copy](#/c:objc(cs)GMSFeatureStyle(im)copy)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n func copy() -\u003e FeatureStyle\n\n Objective-C \n\n - (GMSFeatureStyle *)copy;\n\n- `\n ``\n ``\n `\n\n ### [-mutableCopy](#/c:objc(cs)GMSFeatureStyle(im)mutableCopy)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n func mutableCopy() -\u003e MutableFeatureStyle\n\n Objective-C \n\n - (../Classes/GMSMutableFeatureStyle.html *)mutableCopy;"]]