GoogleMaps 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 on the map.\u003c/p\u003e\n"],["\u003cp\u003eIt includes properties for \u003ccode\u003efeatureType\u003c/code\u003e (e.g., building, point of interest) and \u003ccode\u003eplaceID\u003c/code\u003e for unique identification.\u003c/p\u003e\n"],["\u003cp\u003eAlthough there's a method \u003ccode\u003einitWithFeatureType:placeID:\u003c/code\u003e for testing, in real-world scenarios, the SDK is responsible for creating \u003ccode\u003eGMSPlaceFeature\u003c/code\u003e instances.\u003c/p\u003e\n"]]],[],null,["# GoogleMaps 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;"]]