Package com.google.maps.android.data.kml
Class KmlStyle
- java.lang.Object
-
- java.util.Observable
-
- com.google.maps.android.data.Style
-
- com.google.maps.android.data.kml.KmlStyle
-
public class KmlStyle extends Style
Represents the defined styles in the KML document
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intcomputeRandomColor(int color)Computes a random color given an integer.java.util.HashMap<java.lang.String,java.lang.String>getBalloonOptions()Gets the balloon optionsdoublegetIconScale()Gets the scale for a marker iconjava.lang.StringgetIconUrl()Gets the url for the marker iconcom.google.android.gms.maps.model.MarkerOptionsgetMarkerOptions()Gets a MarkerOptioncom.google.android.gms.maps.model.PolygonOptionsgetPolygonOptions()Gets a PolygonOptioncom.google.android.gms.maps.model.PolylineOptionsgetPolylineOptions()Gets a PolylineOptionbooleanhasBalloonStyle()Gets whether a BalloonStyle has been setbooleanhasFill()Gets whether the Polygon fill is setbooleanhasOutline()Gets whether the Polygon outline is setbooleanisLineRandomColorMode()Checks whether the color mode for a polyline is true / randombooleanisPolyRandomColorMode()Checks whether the color mode for a polygon is true / randombooleanisStyleSet(java.lang.String style)Checks if a given style (for a marker, linestring or polygon) has been setvoidsetFill(boolean fill)Sets whether the Polygon has a filljava.lang.StringtoString()-
Methods inherited from class com.google.maps.android.data.Style
getRotation, setLineStringWidth, setMarkerHotSpot, setMarkerRotation, setPolygonFillColor, setPolygonStrokeWidth
-
-
-
-
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:
toStringin classjava.lang.Object
-
-