Package globus.glmap
Class GLMapInfo
- java.lang.Object
-
- globus.glmap.GLNativeObject
-
- globus.glmap.GLMapInfo
-
public class GLMapInfo extends GLNativeObject
GLMapInfois 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 Classes Modifier and Type Class Description static interfaceGLMapInfo.DataSetstatic interfaceGLMapInfo.DataSetMaskstatic interfaceGLMapInfo.State
-
Field Summary
Fields Modifier and Type Field Description static longWorldMapID
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdataSetsWithState(int state)Checks states of all data sets.booleandeserializeState(int dataSet, byte[] data, android.content.res.AssetManager assetManager)Restore state of data setbooleanequals(java.lang.Object other)doublegetLat()java.lang.StringgetLocalizedName(GLMapLocaleSettings localeSettings)Return name of a map for given locale settings.doublegetLon()longgetMapID()GLMapInfo[]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.booleanisCollection()Map collection is created for big countries and contains regions maps.byte[]serializeState(int dataSet)Serialize state of data set-
Methods inherited from class globus.glmap.GLNativeObject
dispose
-
-
-
-
Method Detail
-
equals
public boolean equals(@Nullable java.lang.Object other)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
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()
-
getMaps
@Nullable public GLMapInfo[] getMaps()
- Returns:
- array of GLMapInfo with sub-maps of this collection
- See Also:
isCollection()
-
getLocalizedName
@NonNull public java.lang.String getLocalizedName(@NonNull GLMapLocaleSettings localeSettings)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
-
-