2 minutes to read
In this article
Polylines allow you to draw connected lines on a map. In many spatial database systems, this is also known as a LineString. The Polyline class derives from the
IPrimitive interface. When creating a polyline, an array of locations must be passed as an argument in the constructor. Optionally polyline options can also be passed in as an argument.
Location, options?: PolylineOptions) Methods
The Polyline class has the following methods.
Gets the css cursor value when the polyline has mouse events on it.
Returns whether the polyline is generalizable based on zoom level or not.
Location Returns the locations that define the polyline.
or Color Returns the color of the polyline.
or number Returns the string that represents the stroke/gap sequence used to draw the polyline.
Returns the thickness of the polyline.
Returns whether the polyline is visible. A value of false indicates that the polyline is hidden, although it is still an entity on the map.
Sets the locations that define the polyline.
Sets options for the polyline.
Information that is linked to the polyline. Some modules such at the GeoJSON, and Spatial Data Service modules will also often add information to this property.
IPrimitiveChangedEventArgs Occurs when the locations or options of the polyline has changed.
MouseEventArgs Occurs when the mouse is used to click the polyline.
MouseEventArgs Occurs when the mouse is used to double click the polyline.
MouseEventArgs Occurs when the left mouse button is pressed when the mouse is over the polyline.
MouseEventArgs Occurs when the mouse cursor moves out of the area covered by the polyline.
MouseEventArgs Occurs when the mouse is over the polyline.
MouseEventArgs Occurs when the left mouse button is lifted up when the mouse is over the polyline.