java.lang.Object | |
↳ | com.amazon.geo.mapsv2.model.PolygonOptions |
An object for defining the initial options for a Polygon
object. Use
this to define all the properties of a Polygon
before calling the
addPolygon(PolygonOptions)
method to add the
Polygon
to the map.
Modifying PolygonOptions
after the Polygon
has been added to
the map has no effect on the appearance of the Polygon
.
See Polygon
for details on creating a valid Polygon
.
Note that PolygonOptions
methods do not need to be called on the main
thread.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new
PolygonOptions object with default values. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Adds multiple vertices to the end of the new
Polygon . | |||||||||||
Adds a vertex to the end of the new
Polygon . | |||||||||||
Adds all vertices in
points to the end of the new
Polygon . | |||||||||||
Adds a hole to the new
Polygon .Holes are not supported in Amazon Maps API v2.5. | |||||||||||
Sets the fill color to use for the new
Polygon in ARGB format. | |||||||||||
Sets whether the line segments for the new
Polygon are drawn
geodesic or non-geodesic.Geodesic is not supported in Amazon Maps API v2.5 | |||||||||||
Gets the fill color to use for the new
Polygon . | |||||||||||
Gets a list of the holes that have been added with
addHole(Iterable) .Holes are not supported in Amazon Maps API v2.5. | |||||||||||
Gets the list of the vertices to use to represent the new
Polygon . | |||||||||||
Gets the stroke color to use for the new
Polygon . | |||||||||||
Gets the stroke width to use for the new
Polygon . | |||||||||||
Gets the z-index to use for the new
Polygon . | |||||||||||
Retrieves a boolean value indicating whether the new
Polygon line
segments are drawn as geodesic (curved to correspond to the shortest path
between two points on the surface of the Earth) or as straight lines.Geodesic is not supported in Amazon Maps API v2.5 | |||||||||||
Retrieves a boolean value indicating whether the new
Polygon is
visible or hidden. | |||||||||||
Sets the stroke color to use for the new
Polygon in ARGB format. | |||||||||||
Sets the stroke width to use for the new
Polygon 's outline in
screen pixels. | |||||||||||
Sets the visibility to use for the new
Polygon . | |||||||||||
Sets the z-index to use for the new the
Polygon . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Creates a new PolygonOptions
object with default values.
Adds a vertex to the end of the new Polygon
.
point | The vertex to add as a LatLng object. Must not be
null . |
---|
PolygonOptions
object.
Adds a hole to the new Polygon
. A valid hole has three or more
points and is completely contained within the Polygon
. To be
valid, line segments drawn between each consecutive point must not
overlap.
Holes are not supported in Amazon Maps API v2.5.
PolygonOptions
object.
Sets the fill color to use for the new Polygon
in ARGB format.
Fill color is the color drawn inside the Polygon
. To draw no
fill, use TRANSPARENT
. The default value is
TRANSPARENT
.
color | The color in ARGB format. See Color for more
details. |
---|
PolygonOptions
object.
Sets whether the line segments for the new Polygon
are drawn
geodesic or non-geodesic. The default is false
to draw straight
lines.
Geodesic line segments are drawn as a curve that corresponds to the shortest path between two points on the surface of the Earth. The curve is drawn assuming that the Earth is a sphere.
Non-geodesic line segments are drawn as straight lines on top of the map's projection.
Geodesic is not supported in Amazon Maps API v2.5
geodesic | true to draw geodesic line segments, or
false to draw straight lines on the map. |
---|
PolygonOptions
object.
Gets a list of the holes that have been added with
addHole(Iterable)
. The list returned is a shallow copy, so
adding additional holes to the returned list has no effect. However,
modifying individual holes in the list does change the resulting
Polygon
defined by this PolygonOptions
object.
Holes are not supported in Amazon Maps API v2.5.
Polygon
's holes. Each hole is represented
as a list of LatLng
objects.
Gets the stroke width to use for the new Polygon
.
Polygon
's stroke width in screen pixels.
Gets the z-index to use for the new Polygon
.
Polygon
's z-index.
Retrieves a boolean value indicating whether the new Polygon
line
segments are drawn as geodesic (curved to correspond to the shortest path
between two points on the surface of the Earth) or as straight lines.
Geodesic is not supported in Amazon Maps API v2.5
true
if each segment is drawn geodesic, or false
if each segment is drawn as a straight line.
Retrieves a boolean value indicating whether the new Polygon
is
visible or hidden.
true
if the Polygon
is visible, or false
if it is invisible.
Sets the stroke color to use for the new Polygon
in ARGB format.
Stroke color is the color of the Polygon
's outline. To draw no
outline, use TRANSPARENT
. The default value is
BLACK
.
color | The color in ARGB format. See Color for more
details. |
---|
PolygonOptions
object.
Sets the stroke width to use for the new Polygon
's outline in
screen pixels. Must be zero or greater. Setting a negative stroke width
causes addPolygon(PolygonOptions)
to throw an
IllegalArgumentException
. No outline is drawn if the stroke width
is set to zero. The default value is 10.
width | The stroke width of the new Polygon in screen
pixels. |
---|
PolygonOptions
object
Sets the visibility to use for the new Polygon
. The default
value is true
.
visible | true to make the Polygon visible, or
false to make it invisible. |
---|
PolygonOptions
object.
Sets the z-index to use for the new the Polygon
. Z-index
determines the order in which overlays are drawn. Overlays with higher
indices are drawn over overlays with lower indices. Overlays with the
same z-index are drawn in an arbitrary order.
Overlays that are affected by z-index include GroundOverlay
,
TileOverlay
, Circle
, Polyline
, and
Polygon
.
Marker
overlays are not affected by the z-index of other
overlays.
The default value is zero.
zIndex | The z-index for the new Polygon . |
---|
PolygonOptions
object.