Package globus.glmap
Class GLMapScaleRuler
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapDrawObject
globus.glmap.GLMapScaleRuler
Draws a scale ruler overlay on the map.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhitTestBottomText(float screenX, float screenY) Tests whether a screen point is inside the bottom text bounding box.voidsetBottomText(String text) Sets text that will be displayed under scale ruler.voidSets the style of the text at the bottom of the ruler.voidsetPlacement(int placement, int paddingX, int paddingY, double maxWidth) Set style of scale ruler.Methods inherited from class globus.glmap.GLMapDrawObject
getDrawOrder, isHidden, setHiddenMethods inherited from class globus.glmap.GLNativeObject
dispose
-
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.scaleRuler.setPlacement(GLMapViewRenderer.GLMapPlacement.BottomCenter, 10, 10, 200);- Parameters:
placement- placement on screenpaddingX- horizontal padding in screen points (dp)paddingY- vertical padding in screen points (dp)maxWidth- maximum ruler width in screen points (dp)
-
setBottomText
Sets text that will be displayed under scale ruler.- Parameters:
text- text to display
-
hitTestBottomText
public boolean hitTestBottomText(float screenX, float screenY) Tests whether a screen point is inside the bottom text bounding box.- Parameters:
screenX- x coordinate in screen pixelsscreenY- y coordinate in screen pixels- Returns:
- true if the point is inside the bottom text bounding box
-
setBottomTextStyle
Sets the style of the text at the bottom of the ruler. The default is"{font-size:11; text-color:black; fill-color:#000000B2; font-stroke-width:2pt; font-stroke-color:#FFFFFF99;}".- Parameters:
style- style of the text
-