java.lang.Object | |||
↳ | com.carto.styles.StyleBuilder | ||
↳ | com.carto.styles.BillboardStyleBuilder | ||
↳ | com.carto.styles.MarkerStyleBuilder |
A builder class for MarkerStyle.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MarkerStyleBuilder()
Constructs a MarkerStyleBuilder object with all parameters set to defaults.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MarkerStyle |
buildStyle()
Builds a new instance of the MarkerStyle object using previously set parameters.
| ||||||||||
synchronized void | delete() | ||||||||||
float |
getAnchorPointX()
Returns the horizontal anchor point of the marker.
| ||||||||||
float |
getAnchorPointY()
Returns the vertical anchor point of the marker.
| ||||||||||
Bitmap |
getBitmap()
Returns the bitmap of the marker.
| ||||||||||
float |
getClickSize()
Returns the size of the marker used for click detection.
| ||||||||||
BillboardOrientation |
getOrientationMode()
Returns the orientation mode of the marker.
| ||||||||||
BillboardScaling |
getScalingMode()
Returns the scaling mode of the marker.
| ||||||||||
float |
getSize()
Returns the size of the marker.
| ||||||||||
void |
setAnchorPoint(float anchorPointX, float anchorPointY)
Sets the anchor point for the marker.
| ||||||||||
void |
setAnchorPointX(float anchorPointX)
Sets the horizontal anchor point of the marker.
| ||||||||||
void |
setAnchorPointY(float anchorPointY)
Sets the vertical anchor point of the marker.
| ||||||||||
void |
setBitmap(Bitmap bitmap)
Sets the bitmap that will be used for drawing the marker.
| ||||||||||
void |
setClickSize(float size)
Sets the size for the marker that will be used for click detection.
| ||||||||||
void |
setOrientationMode(BillboardOrientation orientationMode)
Sets the orientation mode for the marker.
| ||||||||||
void |
setScalingMode(BillboardScaling scalingMode)
Sets the scaling mode for the marker.
| ||||||||||
void |
setSize(float size)
Sets the size for the marker.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Constructs a MarkerStyleBuilder object with all parameters set to defaults.
Builds a new instance of the MarkerStyle object using previously set parameters.
Returns the horizontal anchor point of the marker.
Returns the vertical anchor point of the marker.
Returns the size of the marker used for click detection.
Returns the orientation mode of the marker.
Returns the scaling mode of the marker.
Returns the size of the marker.
Sets the anchor point for the marker. Values will be clamped to [-1, 1] range.
anchorPointX | The new horizontal anchor point for the marker. -1 means the left side, 0 the center and 1 the right side of the marker. The default is 0. |
---|---|
anchorPointY | The vertical anchor point for the marker. -1 means the bottom, 0 the center and 1 the top of the marker. The default is -1. |
Sets the horizontal anchor point of the marker.
anchorPointX | The new horizontal anchor point for the marker. -1 means the left side, 0 the center and 1 the right side of the marker. The default is 0. |
---|
Sets the vertical anchor point of the marker.
anchorPointY | The vertical anchor point for the marker. -1 means the bottom, 0 the center and 1 the top of the marker. The default is -1. |
---|
Sets the bitmap that will be used for drawing the marker. The default is "default_marker.png".
bitmap | The new bitmap for the marker. |
---|
Sets the size for the marker that will be used for click detection.
Units are screen density independent pixels (DP or DIP). If set to -1 the click size will be
calculated automatically. The default is -1.
size | The new point size in dp. |
---|
Sets the orientation mode for the marker. The default is BillboardOrientation::FACE_CAMERA_BILLBOARD.
orientationMode | The new orientation mode for the marker. |
---|
Sets the scaling mode for the marker. The default is BillboardScaling::CONST_SCREEN_SIZE.
scalingMode | The new scaling mode for the marker. |
---|
Sets the size for the marker. The units depend on the scaling mode, if it's set to BillboardScaling::WORLD_SIZE,
the size is in meters near the equator, the size will not be stretched near the poles. If it's set to
BillboardScaling::SCREEN_SIZE or BillboardScaling::CONST_SCREEN_SIZE then the size is in screen density
independent pixels (dp or dip) or normal pixels, depending whether setScaleWithDPI was set to true or false
respectively. If set to -1, unpadded bitmap width will be used instead. The default is -1.
size | The new marker size. |
---|