Class: cloverStyle

L.supermap.cloverStyle

The Clover style class.

L.supermap.cloverStyle(options)

CloverStyle.js, line 4
Name Type Description
options Object

Clover-shaped element style parameters.

Name Type Default Description
angle number 60 optional

The central angle of each leaf of the clover, in radians.

spaceAngle number 0 optional

The blade spacing angle is obtained by calculation.

count number 3 optional

The number of blades.

stroke boolean true optional

Whether to stroke.

strokeWidth number 1 optional

The stroke width.

color string '#3388ff' optional

The color..

weight number 1 optional

The weight.

opacity number 1 optional

The opacity.

lineCap string 'round' optional

The line cap.

lineJoin string 'round' optional

The shape of line join.

fill boolean false optional

Whether to fill or not.

fillColor string '#66ccff' optional

The fill color.

fillOpacity number 0.2 optional

The fill opacity.

fillRule string 'evenodd' optional

The fill rule.

radius number 10 optional

The radius.

API Relations

As constructor parameter: L.supermap.graphic.
As method parameter: L.supermap.graphic.setStyle.
Returned by: L.supermap.graphic.getStyle.

Extends

cloverStyle -> L.Class

Methods

drawSector(ctx, x, y, r, sAngle, eAngle)

CloverStyle.js, line 68

Draw a fan shape.

Name Type Description
ctx CanvasRenderingContext2D

The context object.

x number

Center point x.

y number

Center point y.

r number

Center point r.

sAngle number

Blade starting angle.

eAngle number

Blade starting angle.

getStyle()

CloverStyle.js, line 60

Get the canvas.