A method to add a vector line to a map location.
Parameter |
Value |
---|---|
id: string |
Identity of object. |
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. |
repaint: boolean (optional) (default=true) |
Redraw line on map. |
Return |
Value |
---|---|
object: |
A vector line object. |
Example:
var line = map.addVectorLine("line",
[{ x: 359583, y: 406481 }, { x: 359603, y: 406471 }],
{ lineColor: "red", lineWidth: 3 });
Or
var point1 = SWPoint.create(359583, 406481);
var point2 = SWPoint.create(359603, 406471);
var point3 = SWPoint.create(359623, 406461);
var point4 = SWPoint.create(359643, 406451);
var line1 = map.addVectorLine("line1",
[point1, point2],
{ lineColor: "blue", lineWidth: 3 }, false);
var line2 = map.addVectorLine("line2",
[point3, point 4],
{ lineColor: "red", lineWidth: 3 }, true);