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.

ym.circle([50.5, 30.5], 200).addTo(map);  

Initialization

Factory: ym.circle(latlng, radius, options)

Instantiates a circle object with a geographic point, a radius in meters and (optionally) an option object.

Name Description Data type Default value
latlng [erforderlich] LatLng  
radius [erforderlich] int  
options      

Methods

getLatLng() ab v3

Returns the current geographic position of the circle.

Return

LatLng

getRadius() ab v3

Returns the current radius of the circle. The unit is meters.

Return

int

setLatLng(latlng) ab v3

Sets the position of the circle to a new position.

Parameter

Name Description Data type Default value
latlng   LatLng  

Return

this

setRadius(radius) ab v3

Defines the radius of the circle. The unit is meters.

Parameter

Name Description Data type Default value
radius   int  

Return

this

toGeoJSON() ab v3

Returns a GeoJSON representation of the circle (GeoJSON Point Feature)

Return

object