<< Click to Display Table of Contents >>

 

new sg.renderers.SimpleRenderer(defaultSymbol)

 

 

Description

Create a SimpleRenderer object.

 

Position

Randerer.js

 

Parameters

 

Parameter

Type

Description

symbol

sg.symbols.Symbol

simple render symbol

 

 

Properties

 

Property

Type

Description

colorInfo

Object

symbol color

Name

Type

Description

minValue

Number

minimum value

maxValue

Number

maximum value

field

String

attribute field

colors

Array.<sg.Color>

color array

defaultSymbol

sg.symbols.Symbol

default symbol

opacityInfo

Object

symbol transparency

Name

Type

Description

minValue

Number

minimum value

maxValue

Number

maximum value

field

String

attribute field

opacityValues

Array.<Number>

transparency array

rotationInfo

Object

symbol rotation settings:

Name

Type

Description

type

String

geographic(rotates clockwise from North) or arithmetic (rotates counter-clockwise from East)

field

String

attribute field

sizeInfo

Object

symbol size settings:

Name

Type

Description

minSize

Number

minimum size

maxSize

Number

maximum size

field

String

attribute field

symbol

sg.symbols.Symbol

symbol

 

 

 

Methods

 

Methods

Type

Description

getColor(graphic)

graphic:sg.Graphic

Returns:sg.Color

Return graphic color.

Name

Type

Description

graphic

sg.Graphic

Graphic to get color from.

Returns:

Type

Description

sg.Color

The color of the graphic.

getOpacity(graphic)

graphic:sg.Graphic

Returns:Number

Return the graphic transparency.

Name

Type

Description

graphic

sg.Graphic

The given graphic

Returns:

Type

Description

Number

The opacity of the specify graphic

getRotationAngle(graphic)

graphic:sg.Graphic

Returns:Number

Return graphic rotation angle in degrees.

Name

Type

Description

graphic

sg.Graphic

Graphic

Returns:

Type

Description

Number

The angle of the rotation

getSize(graphic)

graphic:sg.Graphic

Returns:Number

Return graphic symbol size in pixels.

Name

Type

Description

graphic

sg.Graphic

Graphic

Returns:

Type

Description

Number

The size of the graphic

getSymbol(graphic)

graphic:sg.Graphic

Returns:sg.symbols.Symbol

return symbol.

Name

Type

Description

graphic

sg.Graphic

Graphic

Returns:

Type

Description

sg.symbols.Symbol

The symbol of the given graphic

setColorInfo(info)

Object

set color information

Name

Type

Description

info

Object

An info object that defines the color.

setOpacityInfo(info)

Object

Define symbol transparency

Name

Type

Description

info

Object

An info object that defines the opacity

setRotationInfo(info)

Object

Define symbol rotation angle

Name

Type

Description

info

Object

An info object that defines the rotation

setSizeInfo(info)

Object

Define symbol symbol size

Name

Type

Description

info

Object

An info object that defines the size

toXml()

Returns:

String

convert to XML string

Returns:

Type

Description

String

Convert to XML representation

 

 

Example

 

 

<script type="text/javascript" src="scripts/Renderer.js"></script>

<script type="text/javascript" src="scripts/Symbol.js"></script>

 

 

var sr = new sg.renderers.SimpleRenderer(new sg.symbols.SimpleLineSymbol(););

 

 

 


©2015 Supergeo Technologies Inc.