GLMapInfo


@interface GLMapInfo : NSObject

GLMapInfo is a class with general information about all resources of vector map and states of that resources. It works with map data and navigation data. In future versions it could be extended to work with contour lines and hill shades. Returned by -[GLMapManager cachedMapList]

  • Plain -init is disabled

    Declaration

    Objective-C

    - (instancetype _Nonnull)init;
  • A dictonairy with names of this map (read-only).

    Key value is a language code

    Declaration

    Objective-C

    @property (readonly, atomic) NSDictionary *_Nullable names;
  • Identification number of the offline map (read-only).

    Declaration

    Objective-C

    @property (readonly, atomic) int64_t mapID;
  • The timestamp of the offline map on the server (read-only).

    Declaration

    Objective-C

    @property (readonly, atomic) NSTimeInterval serverTimestamp;
  • The latitude and longtitude of the centre of the map (read-only).

    Declaration

    Objective-C

    @property (readonly, atomic) GLMapGeoPoint location;
  • The array contains sub-regions of the current offline map (read-only).

    Sub-regions are used for the offline maps with the large file size (approximitaly more than 300 MB)

    Declaration

    Objective-C

    @property (readonly, atomic) NSArray<GLMapInfo *> *_Nonnull subMaps;
  • Parent of sub-region or nil if not a sub-region.

    Declaration

    Objective-C

    @property (readonly, atomic) GLMapInfo *_Nullable parent;
  • The path to the map data set on the disk (read-only).

    Declaration

    Objective-C

    - (NSString *_Nullable)pathForDataSet:(GLMapInfoDataSet)dataSet;

    Parameters

    dataSet

    data set

    Return Value

    Returns path of data set

  • Declaration

    Objective-C

    - (GLMapInfoState)stateForDataSet:(GLMapInfoDataSet)dataSet;

    Parameters

    dataSet

    data set

    Return Value

    Returns state of data set

  • Timestamp on the disk and timestamp on the server differs in case of a map update on the server appears.

    Declaration

    Objective-C

    - (NSTimeInterval)timestampForDataSet:(GLMapInfoDataSet)dataSet;

    Parameters

    dataSet

    data set

    Return Value

    Returns timestamp of the map data set on the disk (read-only).

  • Timestamp on the disk and timestamp on the server differs in case of a map update on the server appears.

    Declaration

    Objective-C

    - (NSTimeInterval)serverTimestampForDataSet:(GLMapInfoDataSet)dataSet;

    Parameters

    dataSet

    data set

    Return Value

    Returns timestamp of the map data set on the server (read-only).

  • Declaration

    Objective-C

    - (int64_t)sizeOnDiskForDataSets:(GLMapInfoDataSetMask)dataSets;

    Parameters

    dataSets

    data set mask

    Return Value

    Returns size of the decompressed data sets

  • Maps are stored on the server in compresed format

    Declaration

    Objective-C

    - (int64_t)sizeOnServerForDataSets:(GLMapInfoDataSetMask)dataSets;

    Parameters

    dataSets

    data set mask

    Return Value

    Returns size of the map data sets on the server.

  • Check states in all data sets in sets mask. And returns YES if state of any of them equals state.

    Declaration

    Objective-C

    - (BOOL)haveState:(GLMapInfoState)state inDataSets:(GLMapInfoDataSetMask)sets;

    Parameters

    state

    State to check

    sets

    Data set mask

    Return Value

    Returns YES if state of any of data set in sets mask equals state.

  • Checks states of all data sets. And returns mask of sets with state equal to state.

    Declaration

    Objective-C

    - (GLMapInfoDataSetMask)dataSetsWithState:(GLMapInfoState)state;

    Parameters

    state

    State to check

    Return Value

    Returns mask of data sets in state equal to state.

  • Changes storage path

    Declaration

    Objective-C

    + (void)setStoragePath:(NSString *_Nonnull)storagePath;

    Parameters

    storagePath

    A path to folder where offline maps is stored

  • A path to folder where offline maps is stored

    Declaration

    Objective-C

    + (NSString *_Nonnull)storagePath;
  • Returns name of the map in requested language.

    Declaration

    Objective-C

    - (NSString *_Nullable)nameInLanguage:(NSString *_Nonnull)language;

    Parameters

    language

    preffered language

    Return Value

    localised name of the map.

  • Declaration

    Objective-C

    - (NSString *_Nonnull)name;

    Return Value

    Returns name of the map in native language.

  • Returns name of the map according language priority settings. It checks for aviability of translated name from first language in priority list to the last one until first translated name is found.

    Declaration

    Objective-C

    - (NSString *_Nullable)localizedName:(GLMapLocaleSettings *_Nonnull)settings;

    Parameters

    settings

    language order settings

    Return Value

    localised name of the map.

  • Distance from center of the map to the given location.

    Declaration

    Objective-C

    - (double)distanceFrom:(GLMapGeoPoint)location;

    Parameters

    location

    Some location

    Return Value

    distance in meters

  • Distance from border of the map to the given point.

    Declaration

    Objective-C

    - (double)distanceFromBorder:(GLMapPoint)location;

    Parameters

    location

    Point on the map

    Return Value

    Distance to the map border measured in internal units. Returns 0 if point is inside map border.