Package globus.glmap

Class GLMapVectorStyle

java.lang.Object
globus.glmap.GLNativeObject
globus.glmap.GLMapVectorStyle

public class GLMapVectorStyle extends GLNativeObject
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 Details

    • createStyle

      public static GLMapVectorStyle createStyle(@NonNull String style)
      Creates style object.
      
       GLMapVectorStyle style = GLMapVectorStyle.createStyle("{font-size:12;}");
       
      Parameters:
      style - String with style rule in MapCSS format.
      Returns:
      New GLMapVectorStyle object or null in case of error
    • createWithIconAndTint

      public static GLMapVectorStyle createWithIconAndTint(String iconName, @ColorInt int iconTint)
      Creates a style with an icon and a tint.
      Parameters:
      iconName - icon name
      iconTint - icon tint (ARGB, 0xAARRGGBB)
      Returns:
      New style with icon and tint
    • getTextStyleSubset

      @Nullable public GLMapVectorStyle getTextStyleSubset()
      Retrieves a subset of parameters that define only the text style.
      Returns:
      A GLMapVectorStyle object representing the text style subset, or null if no text style is defined.
    • getIconName

      public GLMapValue getIconName()
      Retrieves the resolved value of the 'icon-image' attribute.
      Returns:
      A GLMapValue representing 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

      public GLMapValue getText()
      Retrieves the resolved value of the 'text' attribute.
      Returns:
      A GLMapValue representing the resolved 'text' attribute value.
    • getDetailsText

      public GLMapValue getDetailsText()
      Retrieves the resolved value of the 'details-text' attribute.
      Returns:
      A GLMapValue representing the resolved 'details-text' attribute value.
    • getDetailsDescription

      public GLMapValue getDetailsDescription()
      Retrieves the resolved value of the 'details-description' attribute.
      Returns:
      A GLMapValue representing the resolved 'details-description' attribute value.