Package org.oscim.layers.tile
Class MapTile
java.lang.Object
org.oscim.core.Tile
org.oscim.layers.tile.MapTile
Extends Tile class to hold state and data.
Used concurrently in: TileManager (Main Thread), TileLoader (Worker Thread)
and TileRenderer (GL Thread).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionList of TileData for rendering.floatcurrent distance from map centerlongUsed for fade-effectsbooleanTile is in view region.final MapTile.TileNodePointer to access relatives inTileIndexstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intfinal doubleabsolute tile coordinates: tileX,Y / Math.pow(2, zoomLevel)final double -
Constructor Summary
ConstructorsConstructorDescriptionMapTile(int tileX, int tileY, int zoomLevel) MapTile(MapTile.TileNode node, int tileX, int tileY, int zoomLevel) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddData(Object id, MapTile.TileData td) protected voidclear()CAUTION: This function may only be called byTileManagerstatic intGet the default ElementLayers which are added byVectorTileLoaderfloatgetProxy(int proxy, byte state) getProxyChild(int id, byte state) intgetState()booleanhasProxy(int proxy) Test whether it is save to access a proxy item through this.node.*booleanisActive()removeData(Object id) voidsetState(byte newState) state()booleanstate(int testState) Methods inherited from class org.oscim.core.Tile
calculateTileSize, equals, getBoundingBox, getBoundingBox, getMaxTileNumber, getOrigin, hashCode, toString
-
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 xabsolute tile coordinates: tileX,Y / Math.pow(2, zoomLevel) -
y
public final double y -
data
List of TileData for rendering. ElementLayers is always at first position (for VectorTileLayer). TileLoaderHooks may add additional data. See e.g.LabelTileLoaderHook. -
node
Pointer to access relatives inTileIndex -
distance
public float distancecurrent distance from map center -
isVisible
public boolean isVisibleTile is in view region. Set by TileRenderer. -
fadeTime
public long fadeTimeUsed for fade-effects
-
-
Constructor Details
-
MapTile
public MapTile(int tileX, int tileY, int zoomLevel) -
MapTile
-
-
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 byTileManager -
getBuckets
Get the default ElementLayers which are added byVectorTileLoader -
getData
-
addData
-
removeData
-
depthOffset
-
getGroundScale
public float getGroundScale()- Returns:
- the corresponding ground scale
-
getProxyChild
-
getParent
-
getProxy
-
state
-
setState
public void setState(byte newState)
-