Package globus.glmap

Class GLMapScaleRuler


public class GLMapScaleRuler extends GLMapDrawObject
Draws scale ruler on screen
  • Constructor Details

    • GLMapScaleRuler

      public GLMapScaleRuler(int drawOrder)
      Default constructor
      Parameters:
      drawOrder - draw order of object
  • Method Details

    • setPlacement

      public void setPlacement(int placement, int paddingX, int paddingY, double maxWidth)
      Set style of scale ruler.
      
       mapView.setScaleRulerStyle(GLUnitSystem.International, GLMapPlacement.BottomCenter, new MapPoint(10, 10), 200);
       
      Parameters:
      placement - alignment of text
      paddingX - x padding of scale ruler in points
      paddingY - y padding of scale ruler in points
      maxWidth - width of scale hit in points
    • setBottomText

      public void setBottomText(@Nullable String text)
      Sets text that will be displayed under scale ruler.
      Parameters:
      text - text to display
    • hitTestBottomText

      public boolean hitTestBottomText(float screenX, float screenY)
      Test if point (screenX, screenY) is inside bottom text bbox
      Parameters:
      screenX - x coordinate of hit point
      screenY - x coordinate of hit point
      Returns:
      true if point inside bottom text bbox