---
title: Overlay
framework: Maps Web Snapshots
role: symbol
role_heading: Object
platforms: [maps web snapshots 1.0+]
path: snapshots/overlay
---

# 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

```data
object Overlay
```

## Properties

type: An optional property that specifies the type of overlay shape to render. Default: ”polygon” Options: “circle”, ”polygon”, or “polyline” points: 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" center: The coordinate of the circle’s center. radius: The circle’s radius in meters. strokeColor: The color of the line between each coordinate point. Supported values are HTML color names or hexadecimal color codes. lineWidth: The width of the line, in CSS pixels. lineDash: 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. fillColor: The object’s fill color. fillOpacity: The opacity value used for filling the object. fillRule: The rule used to determine the inside of the polygon. lineCap: The style used for line end points. Default: ”round” Options: ”butt”, “round”, or “square” lineDashOffset: The line dash offset. lineGradient: An object that determines color stops for the gradient, positioned by offsets between 0 and 1. "lineGradient": {"0": "green", "1": "blue"} lineGradientIndexes: An object that determines where the color stops for the gradient. This property uses indexes of points on the polyline. "lineGradientIndexes": {"1": "blue"} lineJoin: The style used for joins between line segments. Default: “round” Options: “bevel”, “miter”, or “round” strokeOpacity: The opacity value for stroking. styleIdx: The index number used to reference an OverlayStyle object.

## Topics

### Objects

- [Overlay.LineGradient](snapshots/overlay/linegradient-data.dictionary.md)
- [Overlay.LineGradientIndexes](snapshots/overlay/linegradientindexes-data.dictionary.md)

## See Also

### Essentials

- [Generating a URL and Signature to Create a Maps Web Snapshot](snapshots/generating-a-url-and-signature-to-create-a-maps-web-snapshot.md)
- [Annotation](snapshots/annotation.md)
- [OverlayStyle](snapshots/overlaystyle.md)
- [Image](snapshots/image.md)
