public class

Billboard

extends VectorElement
java.lang.Object
   ↳ com.carto.vectorelements.VectorElement
     ↳ com.carto.vectorelements.Billboard
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

A base class for billboard elements that can be displayed on the map.
Billboards can either be given a concrete position on the map or be attached to
other billboards.

Summary

Public Methods
synchronized void delete()
Billboard getBaseBillboard()
Returns the base billboard this billboard is attached to.
MapBounds getBounds()
Returns the bounds of this billboard or the base billboard, if there is one.
Geometry getGeometry()
Returns the geometry object that defines the location of this billboard.
Geometry getRootGeometry()
Returns the location of the root billboard.
float getRotation()
Returns the rotation angle of this billboard.
void setBaseBillboard(Billboard baseBillboard)
Attaches this billboard to another billboard, so it will always be drawn relative to the base billboard.
void setGeometry(Geometry geometry)
Sets the location for this billboard.
void setPos(MapPos pos)
Sets the location for this billboard.
void setRotation(float rotation)
Sets the rotation angle of this billboard.
[Expand]
Inherited Methods
From class com.carto.vectorelements.VectorElement
From class java.lang.Object

Public Methods

public synchronized void delete ()

public Billboard getBaseBillboard ()

Returns the base billboard this billboard is attached to.

Returns
  • The base billboard this billboard is attached to. Null if not attached to a billboard.

public MapBounds getBounds ()

Returns the bounds of this billboard or the base billboard, if there is one.

Returns
  • The bounds of this billboard.

public Geometry getGeometry ()

Returns the geometry object that defines the location of this billboard.

Returns
  • The geometry object of this billboard.

public Geometry getRootGeometry ()

Returns the location of the root billboard. If this billboard has a location,
this method is equavalent to the Billboard::getGeometry method. If this billboard is attached
to another billboard, the hierarchy is traveled recursively and the location of the root
billboard is returned.

Returns
  • The geometry object that defines the location of the root billboard. Null if there's no root billboard.

public float getRotation ()

Returns the rotation angle of this billboard.

Returns
  • The rotation angle of this billboard in degrees.

public void setBaseBillboard (Billboard baseBillboard)

Attaches this billboard to another billboard, so it will always be drawn relative to the base billboard.
If this billboard has a geometry object assigned to it, it will first be set to null.

Parameters
baseBillboard The billboard this billboard will be attached to.

public void setGeometry (Geometry geometry)

Sets the location for this billboard. If this billboard is attached
to another billboard, it will first be detached.

Parameters
geometry The new geometry object that defines the location of this billboard.

public void setPos (MapPos pos)

Sets the location for this billboard. If this billboard is attached
to another billboard, it will first be detached.

Parameters
pos The new map position that defines the location of this billboard.

public void setRotation (float rotation)

Sets the rotation angle of this billboard. The rotation angle is ignored if orientation mode is
set to BillboardOrientation::FACE_CAMERA_BILLBOARD. If the orientation mode is set to
BillboardOrientation::FACE_CAMERA_GROUND then the rotation angle is added to the calculated billboard
angle. If the orientation mode is set to BillboardOrientation::GROUND then the rotation means absolute
rotation, where 0 is points to the north.

Parameters
rotation The new rotation angle of this billboard in degrees.