Stay organized with collections Save and categorize content based on your preferences.
Defines options for a polygon.
Developer GuideFor more information, read the Shapes developer guide.
Inherited Constant Summary From interface android.os.Parcelable int CONTENTS_FILE_DESCRIPTOR int PARCELABLE_WRITE_RETURN_VALUE Public Constructor Summary Public Method Summary Inherited Method Summary From class java.lang.Object Objectclone()
boolean voidfinalize()
final Class<?>getClass()
inthashCode()
final voidnotify()
final voidnotifyAll()
StringtoString()
final voidwait(long arg0, int arg1)
final voidwait(long arg0)
final voidwait()
From interface android.os.Parcelable abstract intdescribeContents()
abstract void writeToParcel(
Parcelarg0, int arg1)
Public Constructors Public Methods public PolygonOptions add (LatLng... points)Adds vertices to the outline of the polygon being built.
Parameters points an array ofLatLng
s that are added to the outline of the polygon. Must not be null
. Returns
PolygonOptions
object with the given points added to the outline.Adds a vertex to the outline of the polygon being built.
Parameters point aLatLng
that is added to the outline of the polygon. Must not be null
. Returns
PolygonOptions
object with the given point added to the outline.Adds vertices to the outline of the polygon being built.
Parameters points a list ofLatLng
s that are added to the outline of the polygon. Must not be null
. Returns
PolygonOptions
object with the given points added to the outline.Adds a hole to the polygon being built.
Parameters points an iterable ofLatLng
s that represents a hole. Must not be null
. public PolygonOptions clickable (boolean clickable)
Specifies whether this polygon is clickable. The default setting is false
Specifies the polygon's fill color, as 32-bit ARGB. The default color is black ( 0xff000000
).
Specifies whether to draw each segment of this polygon as a geodesic. The default setting is false
Gets the fill color set for this PolygonOptions
object.
Gets the holes set for this PolygonOptions
object.
List<LatLng>
s specifying the holes of the polygon.Gets the outline set for this PolygonOptions
object.
LatLng
s specifying the vertices of the outline of the polygon.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. See JointType
for possible values.
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.
true
if the polygon is clickable; false
if it is not.Gets the geodesic setting for this PolygonOptions
object.
true
if the polygon segments should be geodesics; false
if they should not be.Gets the visibility setting for this PolygonOptions
object.
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
).
Specifies the joint type for all vertices of the polygon's outline.
See JointType
for allowed values. The default value JointType.DEFAULT
will be used if joint type is undefined or is not one of the allowed values.
Specifies a stroke pattern for the polygon's outline. The default stroke pattern is solid, represented by null
.
Specifies the polygon's stroke width, in display pixels. The default width is 10.
public PolygonOptions visible (boolean visible)Specifies the visibility for the polygon. The default visibility is true
.
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`PolygonOptions` defines properties like fill color, stroke color, width, and zIndex for polygons on a map."],["You can customize the polygon's outline by adding vertices and holes using methods like `add`, `addAll`, and `addHole`."],["Control the polygon's appearance with options for geodesic lines, stroke patterns, and joint types."],["Set the visibility and clickability of the polygon to manage user interaction."],["For detailed information and examples, refer to the Shapes developer guide."]]],["`PolygonOptions` defines settings for a polygon. Key actions include adding vertices or holes to the polygon's outline via `add`, `addAll`, and `addHole`. Users can set polygon properties like `fillColor`, `strokeColor`, `strokeWidth`, `strokePattern`, `strokeJointType`, `geodesic`, `zIndex`, `clickable`, and `visible`. Methods are also provided to get the current settings of these properties, for example using `getFillColor` or `isClickable`. Additionally, `writeToParcel` is available for data serialization.\n"]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4