Class MapTile

java.lang.Object
org.oscim.core.Tile
org.oscim.layers.tile.MapTile

public class MapTile extends Tile
Extends Tile class to hold state and data.

Used concurrently in: TileManager (Main Thread), TileLoader (Worker Thread) and TileRenderer (GL Thread).

  • Field Details

    • PROXY_CHILD00

      public static final int PROXY_CHILD00
      See Also:
    • PROXY_CHILD01

      public static final int PROXY_CHILD01
      See Also:
    • PROXY_CHILD10

      public static final int PROXY_CHILD10
      See Also:
    • PROXY_CHILD11

      public static final int PROXY_CHILD11
      See Also:
    • PROXY_PARENT

      public static final int PROXY_PARENT
      See Also:
    • PROXY_GRAMPA

      public static final int PROXY_GRAMPA
      See Also:
    • PROXY_HOLDER

      public static final int PROXY_HOLDER
      See Also:
    • x

      public final double x
      absolute tile coordinates: tileX,Y / Math.pow(2, zoomLevel)
    • y

      public final double y
    • data

      public MapTile.TileData data
      List of TileData for rendering. ElementLayers is always at first position (for VectorTileLayer). TileLoaderHooks may add additional data. See e.g. LabelTileLoaderHook.
    • node

      public final MapTile.TileNode node
      Pointer to access relatives in TileIndex
    • distance

      public float distance
      current distance from map center
    • isVisible

      public boolean isVisible
      Tile is in view region. Set by TileRenderer.
    • fadeTime

      public long fadeTime
      Used for fade-effects
  • Constructor Details

    • MapTile

      public MapTile(int tileX, int tileY, int zoomLevel)
    • MapTile

      public MapTile(MapTile.TileNode node, int tileX, int tileY, int zoomLevel)
  • Method Details

    • state

      public boolean state(int testState)
    • getState

      public int getState()
    • isActive

      public boolean isActive()
      Returns:
      true if tile is state is not NONE.
    • hasProxy

      public boolean hasProxy(int proxy)
      Test whether it is save to access a proxy item through this.node.*
    • clear

      protected void clear()
      CAUTION: This function may only be called by TileManager
    • getBuckets

      public RenderBuckets getBuckets()
      Get the default ElementLayers which are added by VectorTileLoader
    • getData

      public MapTile.TileData getData(Object id)
    • addData

      public void addData(Object id, MapTile.TileData td)
    • removeData

      public MapTile.TileData removeData(Object id)
    • depthOffset

      public static int depthOffset(MapTile t)
    • getGroundScale

      public float getGroundScale()
      Returns:
      the corresponding ground scale
    • getProxyChild

      public MapTile getProxyChild(int id, byte state)
    • getParent

      public MapTile getParent()
    • getProxy

      public MapTile getProxy(int proxy, byte state)
    • state

      public String state()
    • setState

      public void setState(byte newState)