Class KmlStyle


  • public class KmlStyle
    extends Style
    Represents the defined styles in the KML document
    • Method Detail

      • isStyleSet

        public boolean isStyleSet​(java.lang.String style)
        Checks if a given style (for a marker, linestring or polygon) has been set
        Parameters:
        style - style to check if set
        Returns:
        True if style was set, false otherwise
      • hasFill

        public boolean hasFill()
        Gets whether the Polygon fill is set
        Returns:
        True if there is a fill for the polygon, false otherwise
      • setFill

        public void setFill​(boolean fill)
        Sets whether the Polygon has a fill
        Parameters:
        fill - True if the polygon fill is set, false otherwise
      • getIconScale

        public double getIconScale()
        Gets the scale for a marker icon
        Returns:
        scale value
      • hasOutline

        public boolean hasOutline()
        Gets whether the Polygon outline is set
        Returns:
        True if the polygon outline is set, false otherwise
      • hasBalloonStyle

        public boolean hasBalloonStyle()
        Gets whether a BalloonStyle has been set
        Returns:
        True if a BalloonStyle has been set, false otherwise
      • getIconUrl

        public java.lang.String getIconUrl()
        Gets the url for the marker icon
        Returns:
        Url for the marker icon, null otherwise
      • isLineRandomColorMode

        public boolean isLineRandomColorMode()
        Checks whether the color mode for a polyline is true / random
        Returns:
        True if the color mode is true, false otherwise
      • isPolyRandomColorMode

        public boolean isPolyRandomColorMode()
        Checks whether the color mode for a polygon is true / random
        Returns:
        True if the color mode is true, false otherwise
      • getBalloonOptions

        public java.util.HashMap<java.lang.String,​java.lang.String> getBalloonOptions()
        Gets the balloon options
        Returns:
        Balloon Options
      • getMarkerOptions

        public com.google.android.gms.maps.model.MarkerOptions getMarkerOptions()
        Gets a MarkerOption
        Returns:
        A new MarkerOption
      • getPolylineOptions

        public com.google.android.gms.maps.model.PolylineOptions getPolylineOptions()
        Gets a PolylineOption
        Returns:
        new PolylineOptions
      • getPolygonOptions

        public com.google.android.gms.maps.model.PolygonOptions getPolygonOptions()
        Gets a PolygonOption
        Returns:
        new PolygonOptions
      • computeRandomColor

        public static int computeRandomColor​(int color)
        Computes a random color given an integer. Algorithm to compute the random color can be found in https://developers.google.com/kml/documentation/kmlreference#colormode
        Parameters:
        color - Color represented as an integer
        Returns:
        Integer representing a random color
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object