Package globus.glmap

Class GLMapInfo


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.
  • Field Details

    • WorldMapID

      public static long WorldMapID
      ID of world map
  • Method Details

    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class 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

      @Nullable public GLMapInfo[] getMaps()
      Returns:
      array of GLMapInfo with sub-maps of this collection
      See Also:
    • getLocalizedName

      @NonNull public 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 check
      dataSetMask - 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 set
      data - serialized data
      assetManager - The AssetManager to be used while loading resources
      Returns:
      true on success
    • getPolygons

      @Nullable public MapPoint[][][] getPolygons()
      Return polygons with borders of map
      Returns:
      polygons with borders of map