A polygon (like a polyline) defines a series of connected coordinates in an ordered sequence. Additionally, polygons form a closed loop and define a filled region. See the samples in the developer's guide, starting with a simple polygon, a polygon with a hole, and more. Note that you can also use the Data layer to create a polygon. The Data layer offers a simpler way of creating holes because it handles the order of the inner and outer paths for you.
Access by calling const {Polygon} = await google.maps.importLibrary("maps")
. See
https://developers.google.com/maps/documentation/javascript/libraries.
Adds the given listener function to the given event name. Returns an
identifier for this listener that can be used with
google.maps.event.removeListener
.
Binds a View to a Model.
Gets a value.
Returns whether this shape can be dragged by the user.
Returns whether this shape can be edited by the user.
Returns the map on which this shape is attached.
Returns whether this poly is visible on the map.
Notify all observers of a change on this property. This notifies both objects that are bound to the object's property as well as the object that it is bound to.
Sets a value.
If set to true
, the user can drag this shape over the map.
The geodesic
property defines the mode of dragging.
If set to true
, the user can edit this shape by dragging the
control points shown at the vertices and on each segment.
Renders this shape on the specified map. If map is set to
null
, the shape will be removed.
Sets the first path. See PolygonOptions
for more details.
Sets the path for this polygon.
Sets a collection of key-value pairs.
Hides this poly if set to false
.
Removes a binding. Unbinding will set the unbound property to the current value. The object will not be notified, as the value has not changed.
Removes all bindings.
Generated using TypeDoc
A polygon (like a polyline) defines a series of connected coordinates in an ordered sequence. Additionally, polygons form a closed loop and define a filled region. See the samples in the developer's guide, starting with a simple polygon, a polygon with a hole, and more. Note that you can also use the Data layer to create a polygon. The Data layer offers a simpler way of creating holes because it handles the order of the inner and outer paths for you.
Access by calling
const {Polygon} = await google.maps.importLibrary("maps")
. See https://developers.google.com/maps/documentation/javascript/libraries.