displayModel
Constructor and Description |
---|
Marker(LatLong latLong,
Bitmap bitmap,
int horizontalOffset,
int verticalOffset) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Point center,
Point point) |
void |
draw(BoundingBox boundingBox,
byte zoomLevel,
Canvas canvas,
Point topLeftPoint)
Draws this
Layer on the given canvas. |
Bitmap |
getBitmap() |
int |
getHorizontalOffset() |
LatLong |
getLatLong() |
LatLong |
getPosition()
Gets the geographic position of this layer element, if it exists.
|
int |
getVerticalOffset() |
void |
onDestroy() |
void |
setBitmap(Bitmap bitmap) |
void |
setHorizontalOffset(int horizontalOffset) |
void |
setLatLong(LatLong latLong) |
void |
setVerticalOffset(int verticalOffset) |
isVisible, onAdd, onLongPress, onRemove, onTap, requestRedraw, setDisplayModel, setVisible, setVisible
public Marker(LatLong latLong, Bitmap bitmap, int horizontalOffset, int verticalOffset)
latLong
- the initial geographical coordinates of this marker (may be null).bitmap
- the initial Bitmap
of this marker (may be null).horizontalOffset
- the horizontal marker offset.verticalOffset
- the vertical marker offset.public void draw(BoundingBox boundingBox, byte zoomLevel, Canvas canvas, 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 Bitmap getBitmap()
Bitmap
of this marker (may be null).public int getHorizontalOffset()
public LatLong getLatLong()
public LatLong getPosition()
Layer
The default implementation of this method returns null.
getPosition
in class Layer
public int getVerticalOffset()
public void setBitmap(Bitmap bitmap)
bitmap
- the new Bitmap
of this marker (may be null).public void setHorizontalOffset(int horizontalOffset)
horizontalOffset
- the new horizontal offset of this marker.public void setLatLong(LatLong latLong)
latLong
- the new geographical coordinates of this marker (may be null).public void setVerticalOffset(int verticalOffset)
verticalOffset
- the new vertical offset of this marker.Copyright © 2015 mapsforge.org