GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSFeature
@protocol GMSFeature <NSObject>
An interface representing a feature’s metadata.
Do not save a reference to a particular feature object because the reference will not be stable.
-
Declaration
Swift
func featureType() -> FeatureType
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\u003eGMSFeature\u003c/code\u003e is a protocol used to represent the metadata of a feature on a map.\u003c/p\u003e\n"],["\u003cp\u003eIt's crucial to avoid storing direct references to feature objects due to their instability.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003efeatureType\u003c/code\u003e property indicates the category or type of the feature.\u003c/p\u003e\n"]]],["The `GMSFeature` protocol represents a feature's metadata, but references to specific feature objects are unstable and should not be saved. It provides a method `featureType` that returns the type of the feature. This method's implementation varies slightly between Swift and Objective-C, but essentially, it allows retrieval of a feature's designated type.\n"],null,["# GoogleNavigation Framework Reference\n\nGMSFeature\n==========\n\n @protocol GMSFeature \u003cNSObject\u003e\n\nAn interface representing a feature's metadata.\n\nDo not save a reference to a particular feature object because the reference will not be stable.\n- `\n ``\n ``\n `\n\n ### [-featureType](#/c:objc(pl)GMSFeature(im)featureType)\n\n `\n ` \n Type of this feature. \n\n #### Declaration\n\n Swift \n\n func featureType() -\u003e FeatureType\n\n Objective-C \n\n - (nonnull ../Type-Definitions/GMSFeatureType.html)featureType;"]]