Contents

new PolygonOverlay(points, options)

Creates a polygon overlay with an array of points and style options.

Declaration

constructor(
        points: Coordinate[][] | Coordinate[],
        options?: OverlayOptions,
    );

Parameters

  • points:

    The points in the polygon as an array of arrays of Coordinate, or an array of Coordinate. For the latter, MapKit JS autowraps the array with an enclosing array.

  • options:

    An optional object literal of options for initializing the polygon.

Discussion

The following example shows the options parameter for a polygon overlay:

{
    style: new mapkit.Style({
        lineWidth: 2,
        strokeColor: "#F00",
        fillColor: "#339"
    }),
    selected: true
}

See Also

Creating a polygon overlay