Package globus.glmap
Class GLMapVectorStyle
java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapVectorStyle
Defines resolved style parameters for text/icons used by map drawables (for example,
GLMapMarkerLayer and GLMapLabel).
The base map style is described in MapCSS (see mapcss.org).
-
Method Summary
Modifier and TypeMethodDescriptionstatic GLMapVectorStylecreateStyle(String style) Creates style object.static GLMapVectorStylecreateWithIconAndTint(String iconName, int iconTint) Creates a style with an icon and a tint.Retrieves the resolved value of the 'details-description' attribute.Retrieves the resolved value of the 'details-text' attribute.Retrieves the resolved value of the 'icon-image' attribute.floatRetrieves the resolved value of the 'icon-scale' attribute.intRetrieves the resolved value of the 'icon-tint' attribute.getText()Retrieves the resolved value of the 'text' attribute.Retrieves a subset of parameters that define only the text style.Methods inherited from class globus.glmap.GLNativeObject
dispose
-
Method Details
-
createStyle
Creates style object.GLMapVectorStyle style = GLMapVectorStyle.createStyle("{font-size:12;}");- Parameters:
style- String with style rule in MapCSS format.- Returns:
- New
GLMapVectorStyleobject ornullin case of error
-
createWithIconAndTint
Creates a style with an icon and a tint.- Parameters:
iconName- icon nameiconTint- icon tint (ARGB,0xAARRGGBB)- Returns:
- New style with icon and tint
-
getTextStyleSubset
Retrieves a subset of parameters that define only the text style.- Returns:
- A
GLMapVectorStyleobject representing the text style subset, ornullif no text style is defined.
-
getIconName
Retrieves the resolved value of the 'icon-image' attribute.- Returns:
- A
GLMapValuerepresenting the resolved 'icon-image' attribute value.
-
getIconTint
@ColorInt public int getIconTint()Retrieves the resolved value of the 'icon-tint' attribute.- Returns:
- The resolved color value of the 'icon-tint' attribute as an integer.
-
getIconScale
public float getIconScale()Retrieves the resolved value of the 'icon-scale' attribute.- Returns:
- The resolved scaling factor of the 'icon-scale' attribute.
-
getText
Retrieves the resolved value of the 'text' attribute.- Returns:
- A
GLMapValuerepresenting the resolved 'text' attribute value.
-
getDetailsText
Retrieves the resolved value of the 'details-text' attribute.- Returns:
- A
GLMapValuerepresenting the resolved 'details-text' attribute value.
-
getDetailsDescription
Retrieves the resolved value of the 'details-description' attribute.- Returns:
- A
GLMapValuerepresenting the resolved 'details-description' attribute value.
-