GLMapTagsContainer

Objective-C

@interface GLMapTagsContainer : NSObject

Swift

class GLMapTagsContainer : NSObject

GLMapTagsContainer is a base class for objects that contain tags.

  • Holds all properties set by setValue:forKey: or initialized from GeoJSON.

    Declaration

    Objective-C

    @property (readonly) NSDictionary *_Nonnull properties;

    Swift

    var properties: [AnyHashable : Any] { get }
  • Sets properties of the object. This can be used by MapCSS to apply different styles. Read details at: https://globus.software/docs/mapcss/

    Declaration

    Objective-C

    - (void)setValue:(NSString *_Nullable)value forKey:(nonnull NSString *)key;

    Swift

    func setValue(_ value: String?, forKey key: String)

    Parameters

    value

    The value to be set, or nil to remove the value.

    key

    The key to be set.

  • Returns the value of the object style.

    Declaration

    Objective-C

    - (GLMapValue *_Nullable)valueForKey:(nonnull NSString *)key;

    Swift

    func value(forKey key: String) -> GLMapValue?

    Parameters

    key

    The key string.

    Return Value

    The value that is set by [GLMapVectorObject setValue:forKey:] or loaded from GeoJSON.

  • Returns an array of values of the object style. Map data on OpenStreetMap could contain multiple values for the same tag. According to the standard, they should be divided with a semicolon. Internally, it’s represented as multiple values for the same tag.

    Declaration

    Objective-C

    - (NSArray<GLMapValue *> *_Nullable)valuesForKey:(nonnull NSString *)key;

    Swift

    func values(forKey key: String) -> [GLMapValue]?

    Parameters

    key

    The key string.

    Return Value

    The values of the tag.

  • Returns the localized name of the search result.

    Declaration

    Objective-C

    - (GLMapValue *_Nullable)localizedName:
        (nonnull GLMapLocaleSettings *)localeSettings;

    Swift

    func localizedName(_ localeSettings: GLMapLocaleSettings) -> GLMapValue?

    Parameters

    localeSettings

    The locale settings used to find the name.

    Return Value

    The object name.

  • Copies all properties from another tags container object.

    Declaration

    Objective-C

    - (void)copyProperties:(nonnull GLMapTagsContainer *)other;

    Swift

    func copyProperties(_ other: GLMapTagsContainer)

    Parameters

    other

    Other tags container.