Package globus.glmap

Class GLMapBalloon

public class GLMapBalloon extends GLMapDrawable
Drawable that displays text in balloon.
  • Constructor Details

    • GLMapBalloon

      public GLMapBalloon(int drawOrder)
      Creates new empty image with given draw order
      drawOrder - Draw order used to sort objects on map
  • Method Details

    • setBackgroundBitmap

      public void setBackgroundBitmap(@NonNull bitmap, @Nullable insets)
      Sets backgroud image of balloon
      bitmap - image to set
      insets - insets of background image
    • setText

      public void setText(@NonNull String text, @NonNull GLMapVectorStyle style, @Nullable insets, @Nullable Runnable onReadyToDraw)
      Sets new text of balloon
      text - new text to draw
      style - style of the text
      insets - insets of text
      onReadyToDraw - optional runnable that called when text ready to draw
    • setReferenceAngle

      public void setReferenceAngle(float referenceAngle)
      Sets reference angle to detect direction of balloon
      referenceAngle - reference angle
    • setPossiblePositions

      public void setPossiblePositions(double[] positions)
      Sets positions where balloon can be displayed
      positions - positions to set [x1, y1, dx1, dy1, x2, y2, dx1, dy2, ...]
    • setPlaceToCenter

      public void setPlaceToCenter(boolean placeToCenter)
      If set to `true` position nearest to center of screen will be selected
      placeToCenter - value to set