Polyline class
January 28, 2020 ยท View on GitHub
this.map.addPolyline(options: PolylineOptions).then((polyline: Polyline) => {
});
API Reference
Instance methods
-
getId()
Returns the ID of instance.
:arrow_right: Returns
string -
getMap()
Return the map instance.
:arrow_right: Returns GoogleMap instance.
-
setPoints(points)
Changes the polyline points.
Params Type Details points ILatLng[] new position -
getPoints()
Returns an instance of the BaseArrayClass. You can modify the points.
:arrow_right: Returns BaseArrayClass<ILatLng>.
-
setGeoDesic(geoDesic)
When true, edges of the polyline are interpreted as geodesic and will follow the curvature of the Earth.
Params Type Details geoDesic boolean true or false -
getGeodesic()
Returns true if the polyline is geodesic
:arrow_right: Returns
boolean. -
setStrokeWidth(strokeWidth)
Changes the stroke width.
Params Type Details strokeWidth number stroke width in pixel -
getStrokeWidth()
Returns the current stroke width (unit: pixel).
:arrow_right: Returns
number. -
setStrokeColor(color)
Changes the polyline color
Params Type Details color string HTML color strings -
getStrokeColor()
Returns the current stroke color.
:arrow_right: Returns
string. -
setClickable(clickable)
Changes click-ability of the polyline
Params Type Details clickable boolean true or false -
getClickable()
Returns true if the polyline is clickable.
:arrow_right: Returns
boolean. -
setVisible(clickable)
Set polyline visibility
Params Type Details visible boolean true or false -
getVisible()
Returns true if the polyline is visible.
:arrow_right: Returns
boolean. -
setZIndex(index)
Changes the polyline zIndex order.
Params Type Details index number z-index -
getZIndex()
Returns the current polyline zIndex.
:arrow_right: Returns
number. -
remove()
Remove the polyline.