Skip to content

Latest commit

 

History

History
264 lines (133 loc) · 5.42 KB

Rectangle.md

File metadata and controls

264 lines (133 loc) · 5.42 KB

See html formatted version

Rectangle class

google.maps.Rectangle class

A rectangle overlay.

This class extends MVCObject.

Constructor

undefined

Rectangle([opts])

Parameters: 

Create a rectangle using the passed RectangleOptions, which specify the bounds and style.

Methods

undefined

getBounds()

Parameters:  None

Return Value:  LatLngBounds

Returns the bounds of this rectangle.

undefined

getDraggable()

Parameters:  None

Return Value:  boolean

Returns whether this rectangle can be dragged by the user.

undefined

getEditable()

Parameters:  None

Return Value:  boolean

Returns whether this rectangle can be edited by the user.

undefined

getMap()

Parameters:  None

Return Value:  Map

Returns the map on which this rectangle is displayed.

undefined

getVisible()

Parameters:  None

Return Value:  boolean

Returns whether this rectangle is visible on the map.

undefined

setBounds(bounds)

Parameters: 

Return Value:  None

Sets the bounds of this rectangle.

undefined

setDraggable(draggable)

Parameters: 

  • draggable:  boolean

Return Value:  None

If set to true, the user can drag this rectangle over the map.

undefined

setEditable(editable)

Parameters: 

  • editable:  boolean

Return Value:  None

If set to true, the user can edit this rectangle by dragging the control points shown at the corners and on each edge.

undefined

setMap(map)

Parameters: 

Return Value:  None

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

undefined

setOptions(options)

Parameters: 

Return Value:  None

undefined

setVisible(visible)

Parameters: 

  • visible:  boolean

Return Value:  None

Hides this rectangle if set to false.

Events

undefined

function()

Arguments:  None

This event is fired when the rectangle's bounds are changed.

undefined

function(event)

Arguments: 

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

undefined

function(event)

Arguments: 

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

undefined

function(event)

Arguments: 

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

undefined

function(event)

Arguments: 

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

undefined

function(event)

Arguments: 

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

undefined

function(event)

Arguments: 

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

undefined

function(event)

Arguments: 

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

undefined

function(event)

Arguments: 

This event is fired on rectangle mouseout.

undefined

function(event)

Arguments: 

This event is fired on rectangle mouseover.

undefined

function(event)

Arguments: 

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

undefined

function(event)

Arguments: 

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