Version:
Popular examples
Map
Geo objects
Balloon and hint
Controls
Hotspots
Regions
Clustering
GeoQuery
Behaviors and events
Search on a map
Traffic
User's location
Routing
YMapsML
GeoXML
ObjectManager
Modular system
Panoramas
External modules

Polygon

Save as filesEdit on JSFiddle

A polygon is a closed shape consisting of a set of sequentially connected vertices. A polygon can have internal contours.

A polygon can be created in two ways: using the GeoObject class with the "Polygon" geometry type, or using the Polygon auxiliary class.

When creating a polygon, you must specify the coordinates of its vertices. You can also set the properties (for example the contents of a balloon or hint) and options (such as fill color or contour style) of the polygon.

A visual editor is available for polygons. A link to the editor is in the editor field of the polygon object.

Polygons, like other geo objects, can be combined in collections.