Class MarkerStyleBuilder


public class MarkerStyleBuilder extends BillboardStyleBuilder
A builder class for MarkerStyle.
  • Constructor Details

    • MarkerStyleBuilder

      public MarkerStyleBuilder()
      Constructs a MarkerStyleBuilder object with all parameters set to defaults.
  • Method Details

    • getAnchorPointX

      public float getAnchorPointX()
      Returns the horizontal anchor point of the marker.
      Returns:
      The horizontal anchor point of the marker.
    • setAnchorPointX

      public void setAnchorPointX(float anchorPointX)
      Sets the horizontal anchor point of the marker.
      Parameters:
      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.
    • getAnchorPointY

      public float getAnchorPointY()
      Returns the vertical anchor point of the marker.
      Returns:
      The vertical anchor point of the marker.
    • setAnchorPointY

      public void setAnchorPointY(float anchorPointY)
      Sets the vertical anchor point of the marker.
      Parameters:
      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.
    • setAnchorPoint

      public void setAnchorPoint(float anchorPointX, float anchorPointY)
      Sets the anchor point for the marker. Values will be clamped to [-1, 1] range.
      Parameters:
      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.
    • getBitmap

      public Bitmap getBitmap()
      Returns the bitmap of the marker.
      Returns:
      The bitmap of the marker.
    • setBitmap

      public void setBitmap(Bitmap bitmap)
      Sets the bitmap that will be used for drawing the marker. The default is "default_marker.png".
      Parameters:
      bitmap - The new bitmap for the marker.
    • getOrientationMode

      public int getOrientationMode()
      Returns the orientation mode of the marker.
      Returns:
      The orientation mode of the marker.
    • setOrientationMode

      public void setOrientationMode(int orientationMode)
      Sets the orientation mode for the marker. The default is BillboardOrientation::FACE_CAMERA_BILLBOARD.
      Parameters:
      orientationMode - The new orientation mode for the marker.
    • getScalingMode

      public int getScalingMode()
      Returns the scaling mode of the marker.
      Returns:
      The scaling mode of the marker.
    • setScalingMode

      public void setScalingMode(int scalingMode)
      Sets the scaling mode for the marker. The default is BillboardScaling::CONST_SCREEN_SIZE.
      Parameters:
      scalingMode - The new scaling mode for the marker.
    • getClickSize

      public float getClickSize()
      Returns the size of the marker used for click detection.
      Returns:
      The size of the marker used for click detection.
    • setClickSize

      public void setClickSize(float size)
      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.
      Parameters:
      size - The new point size in dp.
    • getSize

      public float getSize()
      Returns the size of the marker.
      Returns:
      The size of the marker, units depend on the scaling mode.
    • setSize

      public void setSize(float size)
      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.
      Parameters:
      size - The new marker size.
    • buildStyle

      public MarkerStyle buildStyle()
      Builds a new instance of the MarkerStyle object using previously set parameters.
      Returns:
      A new MarkerStyle object.