GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSPlaceFeature
@interface GMSPlaceFeature : NSObject <GMSFeature>
An interface representing a place feature (a feature with a Place ID).
-
Declaration
Swift
var featureType: FeatureType { get }
-
Declaration
Swift
var placeID: String { get }
Objective-C
@property(nonatomic, readonly) NSString *placeID
-
Create a feature layer instance for testing.
This method should be used for your unit tests only. In production, GMSPlaceFeature
instances
should only be created by the SDK.
Declaration
Swift
convenience init(featureType: FeatureType, placeID: String)
Objective-C
- (nonnull instancetype)initWithFeatureType:(nonnull GMSFeatureType)featureType
placeID:(nonnull NSString *)placeID;
-
Declaration
Objective-C
- (instancetype)init NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE;
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\u003eGMSPlaceFeature\u003c/code\u003e represents a place feature with a Place ID and is a subclass of \u003ccode\u003eGMSFeature\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt provides access to the feature type and the Place ID.\u003c/p\u003e\n"],["\u003cp\u003eWhile there's an initializer available for testing, in production, \u003ccode\u003eGMSPlaceFeature\u003c/code\u003e instances are created by the SDK itself.\u003c/p\u003e\n"]]],["`GMSPlaceFeature` represents a feature with a Place ID. It has two key properties: `featureType`, which defines the type of feature, and `placeID`, a unique string identifier. Instances can be created via `initWithFeatureType:placeID:`, intended solely for unit testing; production instances are SDK-created. Direct initialization with `init` is unavailable. The interface adopts the `GMSFeature` protocol.\n"],null,["# GoogleNavigation Framework Reference\n\nGMSPlaceFeature\n===============\n\n\n @interface GMSPlaceFeature : NSObject \u003c../Protocols/GMSFeature.html\u003e\n\nAn interface representing a place feature (a feature with a Place ID).\n- `\n ``\n ``\n `\n\n ### [featureType](#/c:objc(cs)GMSPlaceFeature(py)featureType)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var featureType: FeatureType { get }\n\n Objective-C \n\n @property(nonatomic, readonly) ../Type-Definitions/GMSFeatureType.html featureType\n\n- `\n ``\n ``\n `\n\n ### [placeID](#/c:objc(cs)GMSPlaceFeature(py)placeID)\n\n `\n ` \n\n #### Declaration\n\n Swift \n\n var placeID: String { get }\n\n Objective-C \n\n @property(nonatomic, readonly) NSString *placeID\n\n- `\n ``\n ``\n `\n\n ### [-initWithFeatureType:placeID:](#/c:objc(cs)GMSPlaceFeature(im)initWithFeatureType:placeID:)\n\n `\n ` \n Create a feature layer instance for testing.\n\n This method should be used for your unit tests only. In production, `GMSPlaceFeature` instances\n should only be created by the SDK. \n\n #### Declaration\n\n Swift \n\n convenience init(featureType: FeatureType, placeID: String)\n\n Objective-C \n\n - (nonnull instancetype)initWithFeatureType:(nonnull ../Type-Definitions/GMSFeatureType.html)featureType\n placeID:(nonnull NSString *)placeID;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMSPlaceFeature(im)init)\n\n `\n ` \n Unavailable \n\n #### Declaration\n\n Objective-C \n\n - (instancetype)init NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE;"]]