public class MapElement extends GeometryBuffer
MapElement is created by TileDataSource(s) and passed to MapTileLoader via ITileDataSink.process(). This is just a buffer that belongs to TileDataSource, so don't keep a reference to it when passed as parameter or make sure to use a copy.
GeometryBuffer.GeometryType| Modifier and Type | Field and Description |
|---|---|
PointF |
centroidPosition |
PointF |
labelPosition |
int |
layer
layer of the element (0-10) overrides the theme drawing order.
|
TagSet |
tags |
index, indexCurrentPos, pointNextPos, points, type| Constructor and Description |
|---|
MapElement() |
MapElement(float[] points,
int[] index) |
MapElement(int numPoints,
int numIndices) |
MapElement(MapElement element) |
| Modifier and Type | Method and Description |
|---|---|
MapElement |
clear()
Reset buffer.
|
java.lang.Float |
getHeight(IRenderTheme theme) |
java.lang.Float |
getMinHeight(IRenderTheme theme) |
boolean |
isBuilding() |
boolean |
isBuildingPart() |
MapElement |
scale(float scaleX,
float scaleY)
Scale.
|
void |
setCentroidPosition(float x,
float y) |
void |
setLabelPosition(float x,
float y) |
void |
setLayer(int layer)
Set the layer of the element (0-10) to override theme drawing order.
|
java.lang.String |
toString() |
MapElement |
translate(float dx,
float dy)
Translate.
|
addPoint, addPoint, addPoint, area, ensureIndexSize, ensurePointSize, getNumPoints, getPoint, getPoint, getPointsSize, getPointX, getPointY, isClockwise, isLine, isPoint, isPoly, isTris, makeCircle, makeCircle, removeLastPoint, reverse, setPoint, simplify, startHole, startLine, startPoints, startPolygonpublic PointF centroidPosition
public PointF labelPosition
public int layer
public final TagSet tags
public MapElement()
public MapElement(int numPoints,
int numIndices)
public MapElement(float[] points,
int[] index)
public MapElement(MapElement element)
element - the map element to copypublic java.lang.Float getHeight(IRenderTheme theme)
public java.lang.Float getMinHeight(IRenderTheme theme)
public boolean isBuilding()
public boolean isBuildingPart()
public void setCentroidPosition(float x,
float y)
public void setLabelPosition(float x,
float y)
public void setLayer(int layer)
public MapElement clear()
GeometryBufferclear in class GeometryBufferpublic MapElement scale(float scaleX, float scaleY)
GeometryBufferscale in class GeometryBufferscaleX - the x scale.scaleY - the y scale.public MapElement translate(float dx, float dy)
GeometryBuffertranslate in class GeometryBufferdx - the x translation.dy - the y translation.public java.lang.String toString()
toString in class GeometryBuffer