style.Shape()

class style.Shape()

A symbolizer that renders points using a named shape.

Config Properties

fill

style.Fill() The fill used for this shape. May be provided as a fill instance or any valid fill configuration.

Example use:

>> var Shape = require("geoscript/style").Shape;
>> var shape = Shape({name: "circle", fill: "blue"});
name

String The shape name. Acceptable values include “circle”, “square”, “triangle”, “star”, “cross”, and “x”. Default is “square”.

rotation

Number Rotation angle in degrees clockwise about the center point of the shape.

size

Number The shape pixel size. Default is 6.

stroke

style.Stroke() The stroke used for this shape. May be provided as a stroke instance or any valid stroke configuration.

Example use:

>> var shape = Shape({name: "circle", stroke: "red"});
zIndex

Number The zIndex determines draw order of symbolizers. Symbolizers with higher zIndex values will be drawn over symbolizers with lower values. By default, symbolizers have a zIndex of 0.

Properties

Shape.fill

style.Fill() The fill used for this shape.

Shape.filter

filter.Filter() Optional filter that determines where this symbolizer applies.

Shape.name

String The shape name.

Shape.opacity

Number The opacity value (0 - 1). Default is 1.

Shape.rotation

Number Rotation angle in degrees clockwise about the center point of the shape.

Shape.size

filter.Expression() The shape pixel size.

Shape.stroke

style.Stroke() The stroke used for this shape.

Methods

Shape.and()
Arguments
Returns

style.Style()

Generate a composite style from this symbolizer and the provided symbolizer.

Shape.range()
Arguments
  • configObject An object with optional min and max properties specifying the minimum and maximum scale denominators for applying this symbolizer.

Returns

style.Symbolizer() This symbolizer.

Shape.where()
Arguments
  • filterfilter.Filter() or String A filter or CQL string that limits where this symbolizer applies.

Returns

style.Symbolizer() This symbolizer.