SiteWatch API Help

update

update

Previous topic Next topic  

update

Previous topic Next topic  

A method to update a vector line configuration in a map location.

 

Parameter

Value

point: a point set objects (SWPoint)

-or-

point: a point set array

isn93 map point locations.

config:

Configuration.

 lineColor: string

Color of line.

Hex #ffffff

rgb(0,0,0)

rgba(0,0,0,0.1)

colornames (red, blue)

 lineWidth: integer

Width of line.

 

Example:

var point = { x: 339587, y: 361482 };

var newPtn = line1.getPoint();

 

newPtn[0].x = 644088;

newPtn[0].y = 467236;

newPtn[1].x = 644088;

newPtn[1].y = 467236;

 

var newConf = line.getConfig(); 

 

newConfig.lineColor = "blue";

newConfig.lineWidth = 10;

 

line.update(newPtn, newConf);