Skip to content

Latest commit

 

History

History
256 lines (129 loc) · 5.86 KB

Polyline.md

File metadata and controls

256 lines (129 loc) · 5.86 KB

See html formatted version

Polyline class

google.maps.Polyline class

A polyline is a linear overlay of connected line segments on the map.

This class extends MVCObject.

Constructor

undefined

Polyline([opts])

Parameters: 

Create a polyline using the passed PolylineOptions, which specify both the path of the polyline and the stroke style to use when drawing the polyline. You may pass either an array of LatLngs or an MVCArray of LatLngs when constructing a polyline, though simple arrays are converted to MVCArrays within the polyline upon instantiation.

Methods

undefined

getDraggable()

Parameters:  None

Return Value:  boolean

Returns whether this shape can be dragged by the user.

undefined

getEditable()

Parameters:  None

Return Value:  boolean

Returns whether this shape can be edited by the user.

undefined

getMap()

Parameters:  None

Return Value:  Map

Returns the map on which this shape is attached.

undefined

getPath()

Parameters:  None

Return Value:  MVCArray<LatLng>

Retrieves the path.

undefined

getVisible()

Parameters:  None

Return Value:  boolean

Returns whether this poly is visible on the map.

undefined

setDraggable(draggable)

Parameters: 

  • draggable:  boolean

Return Value:  None

If set to true, the user can drag this shape over the map. The geodesic property defines the mode of dragging.

undefined

setEditable(editable)

Parameters: 

  • editable:  boolean

Return Value:  None

If set to true, the user can edit this shape by dragging the control points shown at the vertices and on each segment.

undefined

setMap(map)

Parameters: 

Return Value:  None

Renders this shape on the specified map. If map is set to null, the shape will be removed.

undefined

setOptions(options)

Parameters: 

Return Value:  None

undefined

setPath(path)

Parameters: 

Return Value:  None

Sets the path. See PolylineOptions for more details.

undefined

setVisible(visible)

Parameters: 

  • visible:  boolean

Return Value:  None

Hides this poly if set to false.

Events

undefined

function(event)

Arguments: 

This event is fired when the DOM click event is fired on the Polyline.

undefined

function(event)

Arguments: 

This event is fired when the DOM dblclick event is fired on the Polyline.

undefined

function(event)

Arguments: 

This event is repeatedly fired while the user drags the polyline.

undefined

function(event)

Arguments: 

This event is fired when the user stops dragging the polyline.

undefined

function(event)

Arguments: 

This event is fired when the user starts dragging the polyline.

undefined

function(event)

Arguments: 

This event is fired when the DOM mousedown event is fired on the Polyline.

undefined

function(event)

Arguments: 

This event is fired when the DOM mousemove event is fired on the Polyline.

undefined

function(event)

Arguments: 

This event is fired on Polyline mouseout.

undefined

function(event)

Arguments: 

This event is fired on Polyline mouseover.

undefined

function(event)

Arguments: 

This event is fired when the DOM mouseup event is fired on the Polyline.

undefined

function(event)

Arguments: 

This event is fired when the Polyline is right-clicked on.