public class

BillboardStyleBuilder

extends StyleBuilder
java.lang.Object
   ↳ com.carto.styles.StyleBuilder
     ↳ com.carto.styles.BillboardStyleBuilder
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

A base class for BillboardStyleBuilder subclasses.

Summary

Public Methods
synchronized void delete()
AnimationStyle getAnimationStyle()
Returns the animation style of the billboard.
float getAttachAnchorPointX()
Returns the horizontal attaching anchor point of the billboard.
float getAttachAnchorPointY()
Returns the vertical attaching anchor point of the billboard.
float getHorizontalOffset()
Returns the horizontal offset of the billboard.
int getPlacementPriority()
Returns the placement priority of the billboard.
float getVerticalOffset()
Returns the vertical offset of the billboard.
boolean isCausesOverlap()
Returns the state of the causes overlap flag.
boolean isHideIfOverlapped()
Returns the state of the allow overlap flag.
boolean isScaleWithDPI()
Returns the state of the scale with DPI flag.
void setAnimationStyle(AnimationStyle animStyle)
Sets the animation style of the billboard.
void setAttachAnchorPoint(float attachAnchorPointX, float attachAnchorPointY)
Sets the attaching anchor point for the billboard.
void setAttachAnchorPointX(float attachAnchorPointX)
Sets the horizontal attaching anchor point of the billboard.
void setAttachAnchorPointY(float attachAnchorPointY)
Sets the vertical attaching anchor point of the billboard.
void setCausesOverlap(boolean causesOverlap)
Sets the state of the causes overlap flag.
void setHideIfOverlapped(boolean hideIfOverlapped)
Sets the state of the hide if overlapped flag.
void setHorizontalOffset(float horizontalOffset)
Sets the horizontal offset for the billboard.
void setPlacementPriority(int placementPriority)
Sets the placement priority for the billboard.
void setScaleWithDPI(boolean scaleWithDPI)
Sets the state of the scale with DPI flag.
void setVerticalOffset(float verticalOffset)
Sets the vertical offset for the billboard.
[Expand]
Inherited Methods
From class com.carto.styles.StyleBuilder
From class java.lang.Object

Public Methods

public synchronized void delete ()

public AnimationStyle getAnimationStyle ()

Returns the animation style of the billboard.

Returns
  • The animation style of the billboard. Can be null if animations are not used.

public float getAttachAnchorPointX ()

Returns the horizontal attaching anchor point of the billboard.

Returns
  • The horizontal attaching anchor point of the billboard.

public float getAttachAnchorPointY ()

Returns the vertical attaching anchor point of the billboard.

Returns
  • The vertical attaching anchor point of the billboard.

public float getHorizontalOffset ()

Returns the horizontal offset of the billboard.

Returns
  • The horizontal offset of the billboard, units depend on the scaling mode.

public int getPlacementPriority ()

Returns the placement priority of the billboard.

Returns
  • The placement priority of the billboard.

public float getVerticalOffset ()

Returns the vertical offset of the billboard.

Returns
  • The vertical offset of the billboard, units depend on the scaling mode.

public boolean isCausesOverlap ()

Returns the state of the causes overlap flag.

Returns
  • True if this billboard causes overlapping with other billboards behind it.

public boolean isHideIfOverlapped ()

Returns the state of the allow overlap flag.

Returns
  • True if this billboard can be hidden by overlapping billboards in front of it.

public boolean isScaleWithDPI ()

Returns the state of the scale with DPI flag.

Returns
  • True if this billboard's size will be scaled using the screen dot's per inch.

public void setAnimationStyle (AnimationStyle animStyle)

Sets the animation style of the billboard.

Parameters
animStyle The new animation style of the billboard. Can be null if animations are not needed (the default).

public void setAttachAnchorPoint (float attachAnchorPointX, float attachAnchorPointY)

Sets the attaching anchor point for the billboard. The attaching anchor point is
only used if the billboard is attached to another (base) billboard. It defines the point
on the base billboard where the attachable billboard will be placed.

Parameters
attachAnchorPointX The new horizontal attaching anchor point for the billboard. -1 means the left side,
0 the center and 1 the right side. The default is 0.
attachAnchorPointY The new vertical attaching anchor point for the billboard. -1 means the bottom,
0 the center and 1 the top. The default is 1.

public void setAttachAnchorPointX (float attachAnchorPointX)

Sets the horizontal attaching anchor point of the billboard.

Parameters
attachAnchorPointX The new horizontal attaching anchor point for the billboard. -1 means the left side,
0 the center and 1 the right side. The default is 0.

public void setAttachAnchorPointY (float attachAnchorPointY)

Sets the vertical attaching anchor point of the billboard.

Parameters
attachAnchorPointY The new vertical attaching anchor point for the billboard. -1 means the bottom,
0 the center and 1 the top. The default is 1.

public void setCausesOverlap (boolean causesOverlap)

Sets the state of the causes overlap flag. If set to false the billboard will
never hide other billboards, even if they are overlapping and have the hide if overlapped flag
set to true. If set to true the billboard may hide other overlapping billboards that have the
hide if overlapped flag set to true and are located behind this billboard. This billboard may still
be hidden by other billboards in front of it, regardless of this parameter.
The default depends on the subclass.

Parameters
causesOverlap The new state of the allow overlap flag.

public void setHideIfOverlapped (boolean hideIfOverlapped)

Sets the state of the hide if overlapped flag. If set to false the billboard may be
hidden by other billboards that are overlapping with it and are located
in front of this billboard. If set to true the billboard will never
be hidden by other overlapping billboards. The default depends on the subclass.

Parameters
hideIfOverlapped The new state of the allow overlap flag.

public void setHorizontalOffset (float horizontalOffset)

Sets the horizontal offset for the billboard. Horizontal offset is used to offset the bitmap
of the billboard horizontally relative to the billboard rotation. The units are the same as the
units used in the setSize method. Negative values offset the bitmap to the left and
positive values to the right. The default is 0.

Parameters
horizontalOffset The new horizontal offset for the billboard.

public void setPlacementPriority (int placementPriority)

Sets the placement priority for the billboard. Higher priority billboard get drawn in front of lower
priority billboards regardless of their distance to the camera. If billboards are not allowed to overlap then
higher priority billboards hide overlapping lower priority billboards. The default is 0.

Parameters
placementPriority The new placement priority for the billboard.

public void setScaleWithDPI (boolean scaleWithDPI)

Sets the state of the scale with DPI flag. If set to true the billboard's size will scale using the screen
dots per inch parameter. This means that billboards will look the same size regardless of the device screen size
and density. If set to false the billboards will not be scaled with the screen density parameter, which means
that billboard will look smaller on on higher density screens. Custom Label and Popup implementations may,
but are not guaranteed to compensate for this by generating higher resolution images. The default depends on the subclass.

Parameters
scaleWithDPI The new state of the scale with DPI flag.

public void setVerticalOffset (float verticalOffset)

Sets the vertical offset for the billboard. Vertical offset is used to offset the bitmap
of the billboard vertically relative to the billboard rotation. The units are the same as the
units used in the setSize method. Negative values offset the bitmap to the bottom and positive values to the top.
The default is 0.

Parameters
verticalOffset The new vertical offset for the billboard.