<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Snapshots",
  "identifier" : "/documentation/Snapshots/OverlayStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Object",
  "symbol" : {
    "kind" : "Object",
    "modules" : [
      "Maps Web Snapshots"
    ],
    "preciseIdentifier" : "data:snapshots:OverlayStyle"
  },
  "title" : "OverlayStyle"
}
-->

# OverlayStyle

A  JSON object that describes reusable styles for an overlay.

```
object OverlayStyle
```

## Discussion

You pass the `OverlayStyle` object properties from the `overlayStyles` query parameter. You can set the object properties and reuse the styles for multiple objects. Any changes made to an `OverlayStyle` object property automatically changes the styles associated with that object, unless they’re overwritten using the `Overlay` object.

The following example shows `OverlayStyle` properties passed into the `overlayStyles` query parameter:

```javascript
/snapshot?center=0,0&z=7&overlays=[{
"type": "polygon",
"points":["1,1","1,-1","-1,-1","-1,1"],
"styleIdx": 2
}]
&overlayStyles=[{
"fillColor": "teal",
"fillOpacity": 0.7,
"strokeColor": "blue",
"lineCap": "square",
"lineWidth": 11,
"strokeOpacity": 0.7 }]
```

## Topics

### Objects

[`object OverlayStyle.LineGradient`](/documentation/Snapshots/OverlayStyle/LineGradient-data.dictionary)

A property that sets the color stops for the gradient, positioned by offsets between 0 and 1.

[`object OverlayStyle.LineGradientIndexes`](/documentation/Snapshots/OverlayStyle/LineGradientIndexes-data.dictionary)

A property that sets the color stops for the gradient, positioned by indexes of points on the polyline.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)