Skip to content

Conversation

@manthey
Copy link
Contributor

@manthey manthey commented Dec 1, 2025

Polygons can now have a pattern style. This is mostly the same as marker styles:

  • fillColor: RGBA fill color. Default is polygon strokeColor and strokeOpacity.
  • strokeColor: RGBA stroke color. Default is polygon fillColor and fillOpacity.
  • strokeWidth: The weight of the pattern marker's stroke in pixels. Set this or A on strokeFill to zero to not have a stroke.
  • strokeOffset: The position of the stroke compared to the pattern radius. This can only be -1, 0, or 1 (the sign of the value is used).
  • radiusIncludesStroke: If truthy or undefined, the radius includes the strokeWidth based on the strokeOffset. If defined and falsy, the radius does not include the strokeWidth.
  • symbol: One of the predefined symbol numbers. This is one of geo.markerFeature.symbols.
  • symbolValue: A value the affects the appearance of the symbol. Some symbols can take an array of numbers.
  • rotation: The rotation of the symbol in clockwise radians.
  • scaleWithZoom: This determines if the fill, stroke, or both scale with zoom. If set, the values for radius and strokeWidth are the values at zoom-level zero.
  • rotateWithMap: If truthy, rotate symbols with the map. If falsy, symbol orientation is absolute.
  • radius: Radius of each marker in pixels. This includes the stroke width if strokeOffset is -1, excludes it if strokeOffset is 1, and includes half the stroke width if strokeOffset is 0. Note that is radiusIncludesStroke is false, this never includes the stroke width.
  • spacing: Spacing in pixels between pattern symbols; scaled if either radius or strokeWidth is scaled. If positive, patterns are on a square grid. If negative, patterns are on a triangular grid.
  • origin: Origin of the pattern.
image

@manthey manthey merged commit ef2829f into master Dec 1, 2025
12 checks passed
@manthey manthey deleted the patterned-polygons branch December 1, 2025 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants