Package globus.glmap
Class GLMapInfo
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapInfo
GLMapInfo is information object about an offline map. Presents information and state
of an offline map. Name, position, size and state of a map.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceResource associated with mapstatic @interfaceMask for data setsstatic @interfaceState of map resource -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintdataSetsWithState(int state) Checks states of all data sets.booleandeserializeState(int dataSet, byte[] data, android.content.res.AssetManager assetManager) Restore state of data setbooleandoublegetLat()getLocalizedName(GLMapLocaleSettings localeSettings) Return name of a map for given locale settings.doublegetLon()longgetMapID()getMaps()longgetSizeOnDisk(int dataSetMask) longgetSizeOnServer(int dataSetMask) intgetState(int dataSet) longgetTempSize(int dataSetMask) inthashCode()booleanhaveChild(long childID) Check if this collection contains childbooleanhaveState(int state, int dataSetMask) Check states in all data sets in `sets` mask.booleanMap collection is created for big countries and contains regions maps.byte[]serializeState(int dataSet) Serialize state of data setMethods inherited from class globus.glmap.GLNativeObject
dispose
-
Field Details
-
WorldMapID
public static long WorldMapIDID of world map
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
isCollection
public boolean isCollection()Map collection is created for big countries and contains regions maps.Also, there are collections for parts of the world with lot of small countries, like Oceania and Carribean.
- Returns:
- true if this maps is collection
- See Also:
-
getMaps
- Returns:
- array of GLMapInfo with sub-maps of this collection
- See Also:
-
getLocalizedName
Return name of a map for given locale settings.- Parameters:
localeSettings- Locale settings that define priority of localizations- Returns:
- Localized name of the map
-
getMapID
public long getMapID()- Returns:
- ID of the map
-
getLon
public double getLon()- Returns:
- Longitude of the center of a map
-
getLat
public double getLat()- Returns:
- Latitude of the center of a map
-
getState
public int getState(int dataSet) - Parameters:
dataSet- data set- Returns:
- state of a data set
-
haveState
public boolean haveState(int state, int dataSetMask) Check states in all data sets in `sets` mask. And returns YES if state of any of them equals `state`.- Parameters:
state- State to checkdataSetMask- Data set mask- Returns:
- Returns `true` if state of any of data set in `dataSetMask` mask equals `state`.
-
haveChild
public boolean haveChild(long childID) Check if this collection contains child- Parameters:
childID- child to test- Returns:
- `true` if contains child
-
dataSetsWithState
public int dataSetsWithState(int state) Checks states of all data sets. And returns mask of sets with state equal to `state`.- Parameters:
state- State to check- Returns:
- Returns mask of data sets in state equal to `state`.
-
getSizeOnServer
public long getSizeOnServer(int dataSetMask) - Parameters:
dataSetMask- data set mask- Returns:
- Size of compressed data sets on server
-
getSizeOnDisk
public long getSizeOnDisk(int dataSetMask) - Parameters:
dataSetMask- data set mask- Returns:
- Size of data sets on disk
-
getTempSize
public long getTempSize(int dataSetMask) - Parameters:
dataSetMask- data set mask- Returns:
- Size of temporary download data for data sets
-
serializeState
@NonNull public byte[] serializeState(int dataSet) Serialize state of data set- Parameters:
dataSet- data set- Returns:
- serialized data
-
deserializeState
public boolean deserializeState(int dataSet, @NonNull byte[] data, android.content.res.AssetManager assetManager) Restore state of data set- Parameters:
dataSet- data setdata- serialized dataassetManager- The AssetManager to be used while loading resources- Returns:
- true on success
-