java.lang.Object | |
↳ | com.google.android.gms.maps.model.PolygonOptions |
Defines options for a polygon.
For more information, read the Shapes developer guide.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates polygon options.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds vertices to the outline of the polygon being built.
| |||||||||||
Adds a vertex to the outline of the polygon being built.
| |||||||||||
Adds vertices to the outline of the polygon being built.
| |||||||||||
Adds a hole to the polygon being built.
| |||||||||||
Specifies whether this polygon is clickable.
| |||||||||||
Specifies the polygon's fill color, as 32-bit ARGB.
| |||||||||||
Specifies whether to draw each segment of this polygon as a geodesic.
| |||||||||||
Gets the fill color set for this
PolygonOptions object. | |||||||||||
Gets the holes set for this
PolygonOptions object. | |||||||||||
Gets the outline set for this
PolygonOptions object. | |||||||||||
Gets the stroke color set for this
PolygonOptions object. | |||||||||||
Gets the stroke joint type set in this
PolygonOptions object for all vertices of the
polygon's outline. | |||||||||||
Gets the stroke pattern set in this
PolygonOptions object for the polygon's outline. | |||||||||||
Gets the stroke width set for this
PolygonOptions object. | |||||||||||
Gets the zIndex set for this
PolygonOptions object. | |||||||||||
Gets the clickability setting for this
PolygonOptions object. | |||||||||||
Gets the geodesic setting for this
PolygonOptions object. | |||||||||||
Gets the visibility setting for this
PolygonOptions object. | |||||||||||
Specifies the polygon's stroke color, as 32-bit ARGB.
| |||||||||||
Specifies the joint type for all vertices of the polygon's outline.
| |||||||||||
Specifies a stroke pattern for the polygon's outline.
| |||||||||||
Specifies the polygon's stroke width, in display pixels.
| |||||||||||
Specifies the visibility for the polygon.
| |||||||||||
Specifies the polygon's zIndex, i.e., the order in which it will be drawn.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Creates polygon options.
Adds vertices to the outline of the polygon being built.
Parameters | |
---|---|
points |
LatLng
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with the given points added to the outline.
|
Adds a vertex to the outline of the polygon being built.
Parameters | |
---|---|
point |
LatLng
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with the given point added to the outline.
|
Adds vertices to the outline of the polygon being built.
Parameters | |
---|---|
points |
Iterable
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with the given points added to the outline.
|
Adds a hole to the polygon being built.
Parameters | |
---|---|
points |
Iterable
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with the given hole added.
|
Specifies whether this polygon is clickable. The default setting is false
Parameters | |
---|---|
clickable |
boolean
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with a new clickability setting.
|
Specifies the polygon's fill color, as 32-bit ARGB. The default color is black (
0xff000000
).
Parameters | |
---|---|
color |
int
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with a new fill color set.
|
Specifies whether to draw each segment of this polygon as a geodesic. The default setting is
false
Parameters | |
---|---|
geodesic |
boolean
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with a new geodesic setting.
|
Gets the fill color set for this PolygonOptions
object.
Returns | |
---|---|
int |
the fill color of the polygon in screen pixels. |
Gets the holes set for this PolygonOptions
object.
Returns | |
---|---|
List<List<LatLng>> |
the list of List<LatLng> s specifying the holes of the polygon.
|
Gets the outline set for this PolygonOptions
object.
Returns | |
---|---|
List<LatLng> |
the list of LatLng s specifying the vertices of the outline of the polygon.
|
Gets the stroke color set for this PolygonOptions
object.
Returns | |
---|---|
int |
the stroke color of the polygon in screen pixels. |
Gets the stroke joint type set in this PolygonOptions
object for all vertices of the
polygon's outline. See JointType
for possible values.
Returns | |
---|---|
int |
the stroke joint type of the polygon's outline. |
Gets the stroke pattern set in this PolygonOptions
object for the polygon's outline.
Returns | |
---|---|
List<PatternItem> |
the stroke pattern of the polygon's outline. |
Gets the stroke width set for this PolygonOptions
object.
Returns | |
---|---|
float |
the stroke width of the polygon in screen pixels. |
Gets the zIndex set for this PolygonOptions
object.
Returns | |
---|---|
float |
the zIndex of the polygon. |
Gets the clickability setting for this PolygonOptions
object.
Returns | |
---|---|
boolean |
true if the polygon is clickable; false if it is not.
|
Gets the geodesic setting for this PolygonOptions
object.
Returns | |
---|---|
boolean |
true if the polygon segments should be geodesics; false if they
should not be.
|
Gets the visibility setting for this PolygonOptions
object.
Returns | |
---|---|
boolean |
true if the polygon is to be visible; false if it is not.
|
Specifies the polygon's stroke color, as 32-bit ARGB. The default color is black (
0xff000000
).
Parameters | |
---|---|
color |
int
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with a new stroke color set.
|
Specifies the joint type for all vertices of the polygon's outline.
See JointType
for allowed values. The default value DEFAULT
will
be used if joint type is undefined or is not one of the allowed values.
Parameters | |
---|---|
jointType |
int
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with a new stroke joint type set.
|
Specifies a stroke pattern for the polygon's outline. The default stroke pattern is solid,
represented by null
.
Parameters | |
---|---|
pattern |
List
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with a new stroke pattern set.
|
Specifies the polygon's stroke width, in display pixels. The default width is 10.
Parameters | |
---|---|
width |
float
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with a new stroke width set.
|
Specifies the visibility for the polygon. The default visibility is true
.
Parameters | |
---|---|
visible |
boolean
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with a new visibility setting.
|
Parameters | |
---|---|
out |
Parcel
|
flags |
int
|
Specifies the polygon's zIndex, i.e., the order in which it will be drawn. See the documentation at the top of this class for more information about zIndex.
Parameters | |
---|---|
zIndex |
float
|
Returns | |
---|---|
PolygonOptions |
this PolygonOptions object with a new zIndex set.
|