public class BuildingLayer extends Layer implements VectorTileLayer.TileLoaderThemeHook, ZoomLimiter.IZoomLimiter
Layer.EnableHandler| Modifier and Type | Field and Description |
|---|---|
protected static int |
BUILDING_LEVEL_HEIGHT |
protected java.util.Map<java.lang.Integer,java.util.List<org.oscim.layers.tile.buildings.BuildingLayer.BuildingElement>> |
mBuildings |
protected ExtrusionRenderer |
mExtrusionRenderer |
static int |
MIN_ZOOM |
protected VectorTileLayer |
mTileLayer |
static boolean |
POST_AA
Use Fast Approximate Anti-Aliasing (FXAA) and Screen Space Ambient Occlusion (SSAO).
|
static boolean |
RAW_DATA
Use real time calculations to pre-process data.
|
static boolean |
TRANSLUCENT
Let vanish extrusions / meshes which are covered by others.
|
| Constructor and Description |
|---|
BuildingLayer(Map map,
VectorTileLayer tileLayer) |
BuildingLayer(Map map,
VectorTileLayer tileLayer,
boolean mesh,
boolean shadow) |
BuildingLayer(Map map,
VectorTileLayer tileLayer,
int zoomMin,
int zoomMax,
boolean mesh,
boolean shadow) |
| Modifier and Type | Method and Description |
|---|---|
void |
addZoomLimit()
Add zoom limit to tile manager to load these tiles.
|
void |
complete(MapTile tile,
boolean success)
Called on loader thread when tile loading is completed
|
static ExtrusionBuckets |
get(MapTile tile) |
ExtrusionRenderer |
getExtrusionRenderer()
Get the ExtrusionRenderer for customization.
|
protected java.lang.String |
getKeyOrDefault(java.lang.String key) |
protected java.lang.String |
getTransformedValue(MapElement element,
java.lang.String key)
Get the forward transformed value from tile source tag via the library tag key.
|
protected java.lang.String |
getValue(MapElement element,
java.lang.String key)
Get the tile source tag value via the library tag key.
|
boolean |
process(MapTile tile,
RenderBuckets buckets,
MapElement element,
RenderStyle style,
int level)
TileLoaderThemeHook
|
protected void |
processElement(MapElement element,
ExtrusionStyle extrusion,
MapTile tile)
Process map element.
|
protected void |
processElements(MapTile tile)
Process all stored map elements (here only buildings).
|
void |
removeZoomLimit()
Remove zoom limit from tile manager.
|
getRenderer, isEnabled, map, onDetach, setEnabled, setEnableHandlerprotected static final int BUILDING_LEVEL_HEIGHT
public static final int MIN_ZOOM
public static boolean POST_AA
public static boolean RAW_DATA
public static boolean TRANSLUCENT
RenderBucket.EXTRUSION: roofs are always translucent.
To better notice the difference, reduce the alpha value of extrusion colors in themes.
protected java.util.Map<java.lang.Integer,java.util.List<org.oscim.layers.tile.buildings.BuildingLayer.BuildingElement>> mBuildings
protected final ExtrusionRenderer mExtrusionRenderer
protected final VectorTileLayer mTileLayer
public BuildingLayer(Map map, VectorTileLayer tileLayer)
public BuildingLayer(Map map, VectorTileLayer tileLayer, boolean mesh, boolean shadow)
public BuildingLayer(Map map, VectorTileLayer tileLayer, int zoomMin, int zoomMax, boolean mesh, boolean shadow)
map - The map data to addtileLayer - The vector tile layer which contains the tiles and the map elementszoomMin - The minimum zoom at which the layer appearszoomMax - The maximum zoom at which the layer appearsmesh - Declare if using mesh or polygon renderershadow - Declare if using shadow rendererpublic void addZoomLimit()
ZoomLimiter.IZoomLimiteraddZoomLimit in interface ZoomLimiter.IZoomLimiterpublic void removeZoomLimit()
ZoomLimiter.IZoomLimiterremoveZoomLimit in interface ZoomLimiter.IZoomLimiterpublic boolean process(MapTile tile, RenderBuckets buckets, MapElement element, RenderStyle style, int level)
process in interface VectorTileLayer.TileLoaderThemeHookprotected void processElement(MapElement element, ExtrusionStyle extrusion, MapTile tile)
element - the map elementextrusion - the style of map elementtile - the tile which contains map elementprotected void processElements(MapTile tile)
tile - the tile which contains stored map elementspublic static ExtrusionBuckets get(MapTile tile)
tile - the MapTilepublic ExtrusionRenderer getExtrusionRenderer()
protected java.lang.String getKeyOrDefault(java.lang.String key)
protected java.lang.String getTransformedValue(MapElement element, java.lang.String key)
key - the library tag keyprotected java.lang.String getValue(MapElement element, java.lang.String key)
key - the library tag keypublic void complete(MapTile tile, boolean success)
VectorTileLayer.TileLoaderThemeHookcomplete in interface VectorTileLayer.TileLoaderThemeHook