Class BillboardStyleBuilder

java.lang.Object
com.massifmaps.styles.StyleBuilder
com.massifmaps.styles.BillboardStyleBuilder
Direct Known Subclasses:
LabelStyleBuilder, MarkerStyleBuilder, NMLModelStyleBuilder, PopupStyleBuilder

public class BillboardStyleBuilder extends StyleBuilder
A base class for BillboardStyleBuilder subclasses.
  • Method Details

    • getAttachAnchorPointX

      public float getAttachAnchorPointX()
      Returns the horizontal attaching anchor point of the billboard.
      Returns:
      The horizontal attaching anchor point of the billboard.
    • setAttachAnchorPointX

      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.
    • getAttachAnchorPointY

      public float getAttachAnchorPointY()
      Returns the vertical attaching anchor point of the billboard.
      Returns:
      The vertical attaching anchor point of the billboard.
    • setAttachAnchorPointY

      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.
    • setAttachAnchorPoint

      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.
    • isCausesOverlap

      public boolean isCausesOverlap()
      Returns the state of the causes overlap flag.
      Returns:
      True if this billboard causes overlapping with other billboards behind it.
    • setCausesOverlap

      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.
    • isHideIfOverlapped

      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.
    • setHideIfOverlapped

      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.
    • getHorizontalOffset

      public float getHorizontalOffset()
      Returns the horizontal offset of the billboard.
      Returns:
      The horizontal offset of the billboard, units depend on the scaling mode.
    • setHorizontalOffset

      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.
    • getVerticalOffset

      public float getVerticalOffset()
      Returns the vertical offset of the billboard.
      Returns:
      The vertical offset of the billboard, units depend on the scaling mode.
    • setVerticalOffset

      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.
    • getPlacementPriority

      public int getPlacementPriority()
      Returns the placement priority of the billboard.
      Returns:
      The placement priority of the billboard.
    • setPlacementPriority

      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.
    • isScaleWithDPI

      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.
    • setScaleWithDPI

      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.
    • getAnimationStyle

      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.
    • setAnimationStyle

      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).