PolyLines
Creating a PolyLine
You can create a PolyLine by using the polylines
keyword. The polylines
keyword is followed by the positions of the points that make up the PolyLine. For example, to create a polyline with 4 points, you would use the following code:
Output:
In above example, we have created a PolyLine with 4 points. The color
keyword is used to set the color of the PolyLine. The thickness
keyword is used to set the thickness of the PolyLine. The fillColor
keyword is used to set the color of the points that make up the PolyLine.
Properties
The following properties can be used to customize the appearance of a PolyLine:
color
: The color of the PolyLine.thickness
: The thickness of the PolyLine.position
: The positions of the points that make up the PolyLine. The position property inpolyLines
will be in the array format. For example,position [0]: 50, 300
.fillColor
: The color of the points that make up the PolyLine. It can be set tono
if it is inherited from a poly-line that has fill color and the current object doesn't want to inherit it.
Conclusion
PolyLines are a useful tool for representing paths on a map. They can be used to represent routes, boundaries, and other linear features. By using the polylines
keyword, you can create PolyLines with different colors, thicknesses, and point colors.