public class Circle extends Path
Constructor and Description |
---|
Circle(LatLng latlng,
double radius)
Instantiates a circle object given a geographical point and a radius in
meters.
|
Circle(LatLng latlng,
double radius,
PathOptions options)
Instantiates a circle object given a geographical point, a radius in
meters and an options object.
|
Modifier and Type | Method and Description |
---|---|
Circle |
addTo(Map map)
Adds the layer to the map.
|
Circle |
bindPopup(Popup popup)
Binds a popup to a click on this circle.
|
Circle |
bindPopup(Popup popup,
PopupOptions options)
Binds a popup with a particular popup configuration options to a click on
this circle.
|
Circle |
bindPopup(String html)
Binds a popup with a particular HTML content to a click on this circle.
|
Circle |
bringToBack()
Brings the layer to the bottom of all path layers.
|
Circle |
bringToFront()
Brings the layer to the top of all path layers.
|
Circle |
closePopup()
Closes the bound popup of the circle if it's opened.
|
LatLng |
getLatLng()
Returns the current geographical position of the circle.
|
double |
getRadius()
Returns the current radius of a circle.
|
Circle |
openPopup()
Opens the popup previously bound by the
bindPopup method. |
Circle |
redraw()
Redraws the layer.
|
Circle |
setLatLng(LatLng latlng)
Changes the circle position to the given point.
|
Circle |
setRadius(double radius)
Changes the circle radius to the given value in meters.
|
Circle |
setStyle(PathOptions options)
Changes the appearance of a Path based on the options in the
PathOptions object. |
Circle |
unbindPopup()
Unbinds the popup previously bound to the circle with
bindPopup . |
addEventListener, addMouseListener, addPopupListener, clearAllEventListeners, getBounds, removeEventListener, removeMouseListener, removePopupListener
public Circle(LatLng latlng, double radius)
latlng
- geographical location of the circleradius
- circle radiuspublic Circle(LatLng latlng, double radius, PathOptions options)
latlng
- geographical location of the circleradius
- circle radiusoptions
- path configuration optionspublic LatLng getLatLng()
public double getRadius()
public Circle setLatLng(LatLng latlng)
latlng
- location of the circlepublic Circle setRadius(double radius)
radius
- circle radius in meterspublic Circle setStyle(PathOptions options)
PathOptions
object.public Circle bringToFront()
bringToFront
in class Path
public Circle bringToBack()
bringToBack
in class Path
public Circle redraw()
public Circle bindPopup(String html)
openPopup
method.public Circle bindPopup(Popup popup)
openPopup
method.public Circle bindPopup(Popup popup, PopupOptions options)
openPopup
method.public Circle unbindPopup()
bindPopup
.unbindPopup
in class Path
public Circle openPopup()
bindPopup
method.public Circle closePopup()
closePopup
in class Path
Copyright © 2017. All rights reserved.