Class GeoJsonPolygonStyle
- java.lang.Object
-
- java.util.Observable
-
- com.google.maps.android.data.Style
-
- com.google.maps.android.data.geojson.GeoJsonPolygonStyle
-
public class GeoJsonPolygonStyle extends Style
A class that allows for GeoJsonPolygon objects to be styled and for these styles to be translated into a PolygonOptions object. {@see PolygonOptions docs for more details about the options.}
-
-
Constructor Summary
Constructors Constructor Description GeoJsonPolygonStyle()Creates a new PolygonStyle object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetFillColor()Gets the fill color of the GeoJsonPolygon as a 32-bit ARGB colorjava.lang.String[]getGeometryType()intgetStrokeColor()Gets the stroke color of the GeoJsonPolygon as a 32-bit ARGB colorintgetStrokeJointType()Gets the stroke joint type of the GeoJsonPolygonjava.util.List<com.google.android.gms.maps.model.PatternItem>getStrokePattern()Gets the stroke pattern of the GeoJsonPolygon as a list of pattern itemsfloatgetStrokeWidth()Gets the stroke width of the GeoJsonPolygon in screen pixelsfloatgetZIndex()Gets the z index of the GeoJsonPolygonbooleanisClickable()Gets the clickability setting for this Options objectbooleanisGeodesic()Gets whether the GeoJsonPolygon is geodesicbooleanisVisible()Gets whether the GeoJsonPolygon is visiblevoidsetClickable(boolean clickable)Specifies whether this GeoJsonPolygon is clickablevoidsetFillColor(int fillColor)Sets the fill color of the GeoJsonPolygon as a 32-bit ARGB colorvoidsetGeodesic(boolean geodesic)Sets whether the GeoJsonPolygon is geodesicvoidsetStrokeColor(int strokeColor)Sets the stroke color of the GeoJsonPolygon as a 32-bit ARGB colorvoidsetStrokeJointType(int strokeJointType)Sets the stroke joint type of the GeoJsonPolygonvoidsetStrokePattern(java.util.List<com.google.android.gms.maps.model.PatternItem> strokePattern)Sets the stroke pattern of the GeoJsonPolygon as a list of pattern itemsvoidsetStrokeWidth(float strokeWidth)Sets the stroke width of the GeoJsonPolygon in screen pixelsvoidsetVisible(boolean visible)Sets whether the GeoJsonPolygon is visiblevoidsetZIndex(float zIndex)Sets the z index of the GeoJsonPolygoncom.google.android.gms.maps.model.PolygonOptionstoPolygonOptions()Gets a new PolygonOptions object containing styles for the GeoJsonPolygonjava.lang.StringtoString()-
Methods inherited from class com.google.maps.android.data.Style
getRotation, setLineStringWidth, setMarkerHotSpot, setMarkerRotation, setPolygonFillColor, setPolygonStrokeWidth
-
-
-
-
Method Detail
-
getGeometryType
public java.lang.String[] getGeometryType()
-
getFillColor
public int getFillColor()
Gets the fill color of the GeoJsonPolygon as a 32-bit ARGB color- Returns:
- fill color of the GeoJsonPolygon
-
setFillColor
public void setFillColor(int fillColor)
Sets the fill color of the GeoJsonPolygon as a 32-bit ARGB color- Parameters:
fillColor- fill color value of the GeoJsonPolygon
-
isGeodesic
public boolean isGeodesic()
Gets whether the GeoJsonPolygon is geodesic- Returns:
- true if GeoJsonPolygon is geodesic, false if not geodesic
-
setGeodesic
public void setGeodesic(boolean geodesic)
Sets whether the GeoJsonPolygon is geodesic- Parameters:
geodesic- true if GeoJsonPolygon is geodesic, false if not geodesic
-
getStrokeColor
public int getStrokeColor()
Gets the stroke color of the GeoJsonPolygon as a 32-bit ARGB color- Returns:
- stroke color of the GeoJsonPolygon
-
setStrokeColor
public void setStrokeColor(int strokeColor)
Sets the stroke color of the GeoJsonPolygon as a 32-bit ARGB color- Parameters:
strokeColor- stroke color value of the GeoJsonPolygon
-
getStrokeJointType
public int getStrokeJointType()
Gets the stroke joint type of the GeoJsonPolygon- Returns:
- stroke joint type of the GeoJsonPolygon
-
setStrokeJointType
public void setStrokeJointType(int strokeJointType)
Sets the stroke joint type of the GeoJsonPolygon- Parameters:
strokeJointType- stroke joint type value of the GeoJsonPolygon
-
getStrokePattern
public java.util.List<com.google.android.gms.maps.model.PatternItem> getStrokePattern()
Gets the stroke pattern of the GeoJsonPolygon as a list of pattern items- Returns:
- stroke pattern of the GeoJsonPolygon
-
setStrokePattern
public void setStrokePattern(java.util.List<com.google.android.gms.maps.model.PatternItem> strokePattern)
Sets the stroke pattern of the GeoJsonPolygon as a list of pattern items- Parameters:
strokePattern- stroke pattern value of the GeoJsonPolygon
-
getStrokeWidth
public float getStrokeWidth()
Gets the stroke width of the GeoJsonPolygon in screen pixels- Returns:
- stroke width of the GeoJsonPolygon
-
setStrokeWidth
public void setStrokeWidth(float strokeWidth)
Sets the stroke width of the GeoJsonPolygon in screen pixels- Parameters:
strokeWidth- stroke width value of the GeoJsonPolygon
-
getZIndex
public float getZIndex()
Gets the z index of the GeoJsonPolygon- Returns:
- z index of the GeoJsonPolygon
-
setZIndex
public void setZIndex(float zIndex)
Sets the z index of the GeoJsonPolygon- Parameters:
zIndex- z index value of the GeoJsonPolygon
-
isVisible
public boolean isVisible()
Gets whether the GeoJsonPolygon is visible- Returns:
- true if GeoJsonPolygon is visible, false if not visible
-
setVisible
public void setVisible(boolean visible)
Sets whether the GeoJsonPolygon is visible- Parameters:
visible- true if GeoJsonPolygon is visible, false if not visible
-
toPolygonOptions
public com.google.android.gms.maps.model.PolygonOptions toPolygonOptions()
Gets a new PolygonOptions object containing styles for the GeoJsonPolygon- Returns:
- new PolygonOptions object
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
setClickable
public void setClickable(boolean clickable)
Specifies whether this GeoJsonPolygon is clickable- Parameters:
clickable- - new clickability setting for the GeoJsonPolygon
-
isClickable
public boolean isClickable()
Gets the clickability setting for this Options object- Returns:
- true if the GeoJsonPolygon is clickable; false if it is not
-
-