@@ -15,6 +15,45 @@ var transform = require('./transform');
1515 * style options.
1616 */
1717
18+ /**
19+ * Style specification for a polygon pattern.
20+ *
21+ * @typedef {geo.polygonPattern } geo.polygonPattern
22+ * @property {geo.geoColor } [fillColor] RGBA fill color. Default is polygon
23+ * strokeColor and strokeOpacity.
24+ * @property {geo.geoColor } [strokeColor] RGBA stroke color. Default is
25+ * polygon fillColor and fillOpacity.
26+ * @property {number } [strokeWidth=1.25] The weight of the pattern marker's
27+ * stroke in pixels. Set this or A on strokeFill to zero to not have a
28+ * stroke.
29+ * @property {number } [strokeOffset=-1] The position of the stroke compared to
30+ * the pattern radius. This can only be -1, 0, or 1 (the sign of the value
31+ * is used).
32+ * @property {boolean } [radiusIncludesStroke=true] If truthy or undefined, the
33+ * `radius` includes the `strokeWidth` based on the `strokeOffset`. If
34+ * defined and falsy, the radius does not include the `strokeWidth`.
35+ * @property {number } [symbol=0] One of the predefined symbol numbers. This is
36+ * one of `geo.markerFeature.symbols`.
37+ * @property {number|number[] } [symbolValue=0] A value the affects the
38+ * appearance of the symbol. Some symbols can take an array of numbers.
39+ * @property {number } [rotation=0] The rotation of the symbol in clockwise
40+ * radians.
41+ * @property {geo.markerFeature.scaleMode } [scaleWithZoom='none'] This
42+ * determines if the fill, stroke, or both scale with zoom. If set, the
43+ * values for radius and strokeWidth are the values at zoom-level zero.
44+ * @property {boolean } [rotateWithMap=false] If truthy, rotate symbols with the
45+ * map. If falsy, symbol orientation is absolute.
46+ * @property {number } [radius=6.25] Radius of each marker in pixels. This
47+ * includes the stroke width if `strokeOffset` is -1, excludes it if
48+ * `strokeOffset` is 1, and includes half the stroke width if `strokeOffset`
49+ * is 0. Note that is `radiusIncludesStroke` is `false`, this never
50+ * includes the stroke width.
51+ * @property {number } [spacing=20] Spacing in pixels between pattern symbols;
52+ * scaled if either radius or strokeWidth is scaled. If positive, patterns
53+ * are on a square grid. If negative, patterns are on a triangular grid.
54+ * @property {number[] } [origin=[0, 0]] Origin of the pattern.
55+ */
56+
1857/**
1958 * Style specification for a polygon feature.
2059 *
@@ -35,6 +74,9 @@ var transform = require('./transform');
3574 * function, this is passed an array of items, each of which has a vertices
3675 * property that is a single continuous array in map gcs coordinates. It
3776 * defaults to the first polygon's first vertex's position.
77+ * @property {geo.polygonPattern|Function } [pattern] Pattern to apply to each
78+ * polygon. Each polygon can be distinct, but the pattern is uniform across
79+ * any one polygon.
3880 */
3981
4082/**
0 commit comments