google.maps.Circle class
A circle on the Earth's surface; also known as a "spherical cap".
This class extends MVCObject.
Constructor
Circle([opts])
Parameters:
- opts: CircleOptions optional
Create a circle using the passed CircleOptions, which specify the center, radius, and style.
Methods
getBounds()
Parameters: None
Return Value: LatLngBounds
Gets the LatLngBounds of this Circle.
getCenter()
Parameters: None
Return Value: LatLng
Returns the center of this circle.
getDraggable()
Parameters: None
Return Value: boolean
Returns whether this circle can be dragged by the user.
getEditable()
Parameters: None
Return Value: boolean
Returns whether this circle can be edited by the user.
getMap()
Parameters: None
Return Value: Map
Returns the map on which this circle is displayed.
getRadius()
Parameters: None
Return Value: number
Returns the radius of this circle (in meters).
getVisible()
Parameters: None
Return Value: boolean
Returns whether this circle is visible on the map.
setCenter(center)
Parameters:
- center: LatLng|LatLngLiteral
Return Value: None
Sets the center of this circle.
setDraggable(draggable)
Parameters:
- draggable: boolean
Return Value: None
If set to true, the user can drag this circle over the map.
setEditable(editable)
Parameters:
- editable: boolean
Return Value: None
If set to true, the user can edit this circle by dragging the control points shown at the center and around the circumference of the circle.
setMap(map)
Parameters:
- map: Map
Return Value: None
Renders the circle on the specified map. If map is set to null, the circle will be removed.
setOptions(options)
Parameters:
- options: CircleOptions
Return Value: None
setRadius(radius)
Parameters:
- radius: number
Return Value: None
Sets the radius of this circle (in meters).
setVisible(visible)
Parameters:
- visible: boolean
Return Value: None
Hides this circle if set to false.
Events
function()
Arguments: None
This event is fired when the circle's center is changed.
function(event)
Arguments:
- event: MouseEvent
This event is fired when the DOM click event is fired on the circle.
function(event)
Arguments:
- event: MouseEvent
This event is fired when the DOM dblclick event is fired on the circle.
function(event)
Arguments:
- event: MouseEvent
This event is repeatedly fired while the user drags the circle.
function(event)
Arguments:
- event: MouseEvent
This event is fired when the user stops dragging the circle.
function(event)
Arguments:
- event: MouseEvent
This event is fired when the user starts dragging the circle.
function(event)
Arguments:
- event: MouseEvent
This event is fired when the DOM mousedown event is fired on the circle.
function(event)
Arguments:
- event: MouseEvent
This event is fired when the DOM mousemove event is fired on the circle.
function(event)
Arguments:
- event: MouseEvent
This event is fired on circle mouseout.
function(event)
Arguments:
- event: MouseEvent
This event is fired on circle mouseover.
function(event)
Arguments:
- event: MouseEvent
This event is fired when the DOM mouseup event is fired on the circle.
function()
Arguments: None
This event is fired when the circle's radius is changed.
function(event)
Arguments:
- event: MouseEvent
This event is fired when the circle is right-clicked on.