public class GroupLayer extends Layer
Modifier and Type | Field and Description |
---|---|
java.util.List<Layer> |
layers
The group of other layers.
|
displayModel
Constructor and Description |
---|
GroupLayer() |
Modifier and Type | Method and Description |
---|---|
void |
draw(org.mapsforge.core.model.BoundingBox boundingBox,
byte zoomLevel,
org.mapsforge.core.graphics.Canvas canvas,
org.mapsforge.core.model.Point topLeftPoint)
Draws this
Layer on the given canvas. |
void |
onDestroy() |
boolean |
onLongPress(org.mapsforge.core.model.LatLong tapLatLong,
org.mapsforge.core.model.Point layerXY,
org.mapsforge.core.model.Point tapXY)
GroupLayer does not have a position, layerXY is null.
|
boolean |
onTap(org.mapsforge.core.model.LatLong tapLatLong,
org.mapsforge.core.model.Point layerXY,
org.mapsforge.core.model.Point tapXY)
GroupLayer does not have a position, layerXY is null.
|
void |
setDisplayModel(DisplayModel displayModel)
The DisplayModel comes from a MapView, so is generally not known when the layer itself is created.
|
getDisplayModel, getPosition, isVisible, onAdd, onRemove, requestRedraw, setVisible, setVisible
public final java.util.List<Layer> layers
public void draw(org.mapsforge.core.model.BoundingBox boundingBox, byte zoomLevel, org.mapsforge.core.graphics.Canvas canvas, org.mapsforge.core.model.Point topLeftPoint)
Layer
Layer
on the given canvas.draw
in class Layer
boundingBox
- the geographical area which should be drawn.zoomLevel
- the zoom level at which this Layer
should draw itself.canvas
- the canvas on which this Layer
should draw itself.topLeftPoint
- the top-left pixel position of the canvas relative to the top-left map position.public boolean onLongPress(org.mapsforge.core.model.LatLong tapLatLong, org.mapsforge.core.model.Point layerXY, org.mapsforge.core.model.Point tapXY)
onLongPress
in class Layer
tapLatLong
- the geographic position of the long press.layerXY
- the xy position of the layer element (if available)tapXY
- the xy position of the tappublic boolean onTap(org.mapsforge.core.model.LatLong tapLatLong, org.mapsforge.core.model.Point layerXY, org.mapsforge.core.model.Point tapXY)
public void setDisplayModel(DisplayModel displayModel)
Layer
setDisplayModel
in class Layer
displayModel
- the displayModel to use.