google.maps.Circle
class
A circle on the Earth's surface; also known as a "spherical cap".
This class extends
MVCObject.
| Constructor | |
|---|---|
Circle |
Circle([opts])Parameters:
Create a circle using the passed CircleOptions, which specify the center, radius, and style. |
| Methods | |
|---|---|
getBounds |
getBounds()Parameters: None
Return Value:
LatLngBoundsGets the LatLngBounds of this Circle. |
getCenter |
getCenter()Parameters: None
Return Value:
LatLngReturns the center of this circle. |
getDraggable |
getDraggable()Parameters: None
Return Value:
booleanReturns whether this circle can be dragged by the user. |
getEditable |
getEditable()Parameters: None
Return Value:
booleanReturns whether this circle can be edited by the user. |
getMap |
getMap()Parameters: None
Return Value:
MapReturns the map on which this circle is displayed. |
getRadius |
getRadius()Parameters: None
Return Value:
numberReturns the radius of this circle (in meters). |
getVisible |
getVisible()Parameters: None
Return Value:
booleanReturns whether this circle is visible on the map. |
setCenter |
setCenter(center)Parameters:
Return Value: None
Sets the center of this circle. |
setDraggable |
setDraggable(draggable)Parameters:
Return Value: None
If set to true, the user can drag this circle over the map. |
setEditable |
setEditable(editable)Parameters:
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 |
setMap(map)Parameters:
Return Value: None
Renders the circle on the specified map. If map is set to null, the circle will be removed. |
setOptions |
setOptions(options)Parameters:
Return Value: None
|
setRadius |
setRadius(radius)Parameters:
Return Value: None
Sets the radius of this circle (in meters). |
setVisible |
setVisible(visible)Parameters:
Return Value: None
Hides this circle if set to false. |
| Events | |
|---|---|
center_changed |
function()Arguments: None
This event is fired when the circle's center is changed. |
click |
function(event)Arguments:
This event is fired when the DOM click event is fired on the circle. |
dblclick |
function(event)Arguments:
This event is fired when the DOM dblclick event is fired on the circle. |
drag |
function(event)Arguments:
This event is repeatedly fired while the user drags the circle. |
dragend |
function(event)Arguments:
This event is fired when the user stops dragging the circle. |
dragstart |
function(event)Arguments:
This event is fired when the user starts dragging the circle. |
mousedown |
function(event)Arguments:
This event is fired when the DOM mousedown event is fired on the circle. |
mousemove |
function(event)Arguments:
This event is fired when the DOM mousemove event is fired on the circle. |
mouseout |
function(event)Arguments:
This event is fired on circle mouseout. |
mouseover |
function(event)Arguments:
This event is fired on circle mouseover. |
mouseup |
function(event)Arguments:
This event is fired when the DOM mouseup event is fired on the circle. |
radius_changed |
function()Arguments: None
This event is fired when the circle's radius is changed. |
rightclick |
function(event)Arguments:
This event is fired when the circle is right-clicked on. |