Contents

Overlay

A JSON object for a Snapshot URL that describes overlay shape characteristics, including points for the overlay and styles such as width, color, and dash pattern.

Declaration

object Overlay

Properties

NameTypeDescription
typestring

An optional property that specifies the type of overlay shape to render.

Default: ”polygon”

Options: “circle”, ”polygon”, or “polyline”

points([string] | string)

An array of coordinates, specified as latitude and longitude coordinate pairs, or as a string encoded with the Encoded Polyline Algorithm Format.

The array format specifies points for a polyline overlay. The following example specifies two points for a polyline overlay as an array of latitude and longitude coordinate pairs:

"points": ["37.779996,-122.51158","37.78040,-122.51348"]

You can provide those same parameters in encoded polyline algorithm format:

"points": "w{qeFj`wjVwAzJ"
centerstring

The coordinate of the circle’s center.

radiusnumber

The circle’s radius in meters.

strokeColorstring

The color of the line between each coordinate point. Supported values are HTML color names or hexadecimal color codes.

lineWidthinteger

The width of the line, in CSS pixels.

lineDash[integer]

An array that defines a line’s dash pattern, where numbers represent line and gap lengths in CSS pixels. For example, [10,5] means draw a line for 10 pixels, leave a 5-pixel gap, and repeat. An empty array draws a solid line, which is the default.

fillColorstring

The object’s fill color.

fillOpacitynumber

The opacity value used for filling the object.

fillRulestring

The rule used to determine the inside of the polygon.

lineCapstring

The style used for line end points.

Default: ”round”

Options: ”butt”, “round”, or “square”

lineDashOffsetinteger

The line dash offset.

lineGradientOverlay.LineGradient

An object that determines color stops for the gradient, positioned by offsets between 0 and 1.

"lineGradient": {"0": "green", "1": "blue"}
lineGradientIndexesOverlay.LineGradientIndexes

An object that determines where the color stops for the gradient. This property uses indexes of points on the polyline.

"lineGradientIndexes": {"1": "blue"}
lineJoinstring

The style used for joins between line segments.

Default: “round”

Options: “bevel”, “miter”, or “round”

strokeOpacitynumber

The opacity value for stroking.

styleIdxinteger

The index number used to reference an OverlayStyle object.

Topics

Objects

See Also

Essentials