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]
-
Unavailable
GLMapInfo returned by
[GLMapInfo 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 (atomic, readonly) NSDictionary *_Nullable names;
-
Identification number of the offline map (read-only).
Declaration
Objective-C
@property (atomic, readonly) int64_t mapID;
-
The timestamp of the offline map on the server (read-only).
Declaration
Objective-C
@property (atomic, readonly) NSTimeInterval serverTimestamp;
-
The latitude and longtitude of the centre of the map (read-only).
Declaration
Objective-C
@property (atomic, readonly) 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 (atomic, readonly) NSArray<GLMapInfo *> *_Nonnull subMaps;
-
Parent of sub-region or nil if not a sub-region.
Declaration
Objective-C
@property (atomic, readonly) GLMapInfo *_Nullable parent;
-
The array contains files assosiated with map
Declaration
Objective-C
@property (atomic, readonly) NSArray<NSURL *> *_Nonnull files;
-
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
- (uint64_t)sizeOnDiskForDataSets:(GLMapInfoDataSetMask)dataSets;
Parameters
dataSets
data set mask
Return Value
Returns size of the downloaded and decompressed data sets
-
Declaration
Objective-C
- (uint64_t)tempSizeOnDiskForDataSets:(GLMapInfoDataSetMask)dataSets;
Parameters
dataSets
data set mask
Return Value
Return size of temporary files for data sets *
-
Maps are stored on the server in compresed format
Declaration
Objective-C
- (uint64_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 equalsstate
.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 equalsstate
. -
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
.
-
Deprecated
use GLMapManager.sharedManager.storagePath
Changes storage path.
Declaration
Objective-C
+ (void)setStoragePath:(NSString *_Nonnull)storagePath;
Parameters
storagePath
A path to folder where offline maps is stored
-
Deprecated
use GLMapManager.sharedManager.storagePath
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.