ym.modules.provider.Circle
Overview
With this class, you can draw circle objects on the map. Use addTo(map)
to add an object to the map.
Initialization
Factory: ym.circle(latlng, radius, options)
Instantiates a circle object with a geographic point, a radius in meters, and (optionally) an options object.
- Parameters
-
latlng
- Description: [mandatory]
- Data type: LatLng
-
radius
- Description: [mandatory]
- Data type: int
-
options
- Data type: int
Methods
getLatLng()
Returns the current geographic position of the circle.
- Return: LatLng
getRadius()
Returns the current radius of the circle. The unit is meters.
- Return: int
setLatLng(latlng)
Sets the position of the circle to a new position.
- Parameter
-
latlng
- Data type: LatLng
-
Return: this
setRadius(radius)
Defines the radius of the circle. The unit is meters.
- Parameter
-
radius
- Data type: int
-
Return: this
toGeoJSON()
Returns a GeoJSON representation of the circle (GeoJSON Point Feature).
- Return: object