<< Click to Display Table of Contents >>

 

new sg.symbols.PictureFillSymbol(url, outline, width, height)

 

 

Description

create a new PictureFillSymbol object.

 

Position

Symbol.js

 

 

Parameters

 

Parameter

Type

Description

url

String

URL to the picture

outline

sg.symbols.LineSymbol        

symbol outline

width

Number

picture width

height

Number

picture height

 

 

Properties

 

Properties

Type

Description

type

String

definition of the symbol type.

width

Number

definition of the symbol width.

height

Number

image height in pixels.

url

String

image URL

xscale

Number

definition of x scale factor.

yscale

Number

definition of y scale factor.

color

sg.Color

symbol color

outline

sg.symbols.LineSymbol

symbol outline

 

 

Methods

 

Methods

Type

Description

setColor(color)

sg.Color

define symbol color.

Name

Type

Description

color

sg.Color

Symbol color

setHeight(height)

Number

define symbol height.

Name

Type

Description

height

Number

Height of the image in pixels.

setOffset(x, y)

Number

define symbol offset in x and y direction.

Name

Type

Description

x

Number

The X offset value in pixels.

y

Number

The Y offset value in pixels.

setOutline(outline)

sg.symbols.LineSymbol        

define symbol outline.

Name

Type

Description

outline

sg.symbols.LineSymbo

Symbol used for outline

setUrl(url)

String

define image URL.

Name

Type

Description

url

String

URL location of the image

setWidth(width)

Number

define symbol width.

Name

Type

Description

width

Number

Width of the image in pixels.

setXScale(scale)

Number

define x scale factor.

Name

Type

Description

xscale

Number

Scale factor in x direction.

setYScale(scale)

Number

define y scale factor.

Name

Type

Description

yscale

Number

Scale factor in y direction.

 

Example

 

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

 

var outline = new sg.symbols.SimpleLineSymbol(sg.symbols.SimpleLineSymbol.STYLE_NULL, new sg.Color(0, 0, 0, 0), 0);

 

var Boys = new sg.symbols.PictureMarkerSymbol("http://cdn.mysitemyway.com/etc-mysitemyway/icons/legacy-previews/icons-256/glowing-green-neon-icons-people-things/111914-glowing-green-neon-icon-people-things-people-child2.png", outline, 50, 50);

 

Boys.setColor(sg.Color(255, 0, 0, 1));

Boys.setOffset(5, 5);

 

 


©2015 Supergeo Technologies Inc.