Package globus.glmap
Class GLMapInfo
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapInfo
@ParametersAreNonnullByDefault public class GLMapInfo extends GLNativeObject
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 Classes Modifier and Type Class Description static interfaceGLMapInfo.DataSetstatic interfaceGLMapInfo.DataSetMaskstatic interfaceGLMapInfo.State -
Method Summary
Modifier and Type Method Description intdataSetsWithState(int state)Checks states of all data sets.booleanequals(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.
-
Method Details
-
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
- Returns:
- array of GLMapInfo with sub-maps of this collection
- See Also:
isCollection()
-
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
-