Class NCLocation - Navigine/Indoor-Navigation-iOS-Mobile-SDK-2.0 GitHub Wiki

NCLocation class is used for storing location parameters: identifier, version, name, a list of sublocations, etc. NCLocation instance can be obtained from NCLocationManager using NCLocationListeners' callback, when the location is loaded.

Referenced from: NCLocationManager.

@interface NCLocation : NSObject

- (nullable NCElevationGraph *)getElevationGraph:(nonnull NSString *)tag;

- (nonnull NSArray<NSString *> *)getGraphTags;

- (nullable NCSublocation *)getSublocationById:(int32_t)id;

- (nullable NCCategory *)getCategoryById:(int32_t)id;

@property (nonatomic, readonly) int32_t id;

@property (nonatomic, readonly) int32_t version;

@property (nonatomic, nonnull, readonly) NSString * name;

@property (nonatomic, nonnull, readonly) NSString * descript;

@property (nonatomic, nonnull, readonly) NSArray<NCCategory *> * categories;

@property (nonatomic, nonnull, readonly) NSArray<NCSublocation *> * sublocations;

@end

Public fields

  • id - location's id in personal account
  • version - location's version
  • name - location's name in personal account
  • descript - location's description in personal account
  • sublocations - array with sublocations of your location
  • categories - array with categories of your location

Public methods

Function getElevationGraph

- (nullable NCElevationGraph *)getElevationGraph:(nonnull NSString *)tag;

Function is used for getting elevation graph by tag.

Parameters
  • tag — the elevation graph tag.
Return value

The NCElevationGraph of the current location.

Function getGraphTags

- (nonnull NSArray<NSString *> *)getGraphTags;

Function is used for getting graph tags, like default, alternative, etc.

Return value

Array of names of graph tags.

Function getSublocationById

- (nullable NCSublocation *)getSublocationById:(int32_t)id;

Function is used for obtaining a sublocation with the specified identifier from the current location.

Parameters
  • id — the sublocation identifier.
Return value

The NCSublocation of the current location with the specified identifier, if it exists. If sublocation with the specified identifier doesn't exist, function returns null.

Function getCategoryById

- (nullable NCCategory *)getCategoryById:(int32_t)id;

Function is used for obtaining a category with the specified identifier from the current location.

Parameters
  • id — the category identifier.
Return value

The NCCategory of the current location with the specified identifier, if it exists. If category with the specified identifier doesn't exist, function returns null.

⚠️ **GitHub.com Fallback** ⚠️