public class Polygon extends MapObject
Constructor and Description |
---|
Polygon(Map map)
Creates new Polygon object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
getDraggable()
Returns whether this shape can be dragged by the user.
|
boolean |
getEditable()
Returns whether this shape can be edited by the user.
|
LatLng[] |
getPath()
Retrieves the first path.
|
LatLng[][] |
getPaths()
Retrieves the paths for this polygon.
|
boolean |
getVisible()
Returns whether this polygon is visible on the map.
|
void |
remove()
Removes polygon from the map.
|
void |
setDraggable(boolean value)
If set to true, the user can drag this shape over the map.
|
void |
setEditable(boolean value)
If set to true, the user can edit this shape by dragging the control points shown at the vertices
and on each segment.
|
void |
setOptions(PolygonOptions options)
Sets new options for current shape.
|
void |
setPath(LatLng[] values)
Sets the first path.
|
void |
setPaths(LatLng[][] items)
Sets the path for this polygon.
|
void |
setVisible(boolean value)
Hides this poly if set to false.
|
addEventListener, attachObject, cacheProperties, cacheProperties, clone, createJSValue, dispose, fromJSValue, getJSObject, getMap, getProperties, invokeMethod, propertyChanged, removeEventListener, updateProperty
public Polygon(Map map)
map
- owner Map objectpublic boolean getDraggable()
public boolean getEditable()
public boolean getVisible()
public void setDraggable(boolean value)
value
- new valuepublic void setEditable(boolean value)
value
- new valuepublic void setVisible(boolean value)
value
- new valuepublic void setOptions(PolygonOptions options)
options
- new options object@Nullable public LatLng[] getPath()
@Nullable public LatLng[][] getPaths()
public void remove()
public void setPath(LatLng[] values)
values
- array of LatLng values that represents the new pathpublic void setPaths(LatLng[][] items)
items
- collection of paths