Circle

Draw a circle on the map.

Parameters

NameDescriptiondefault
centerrequired The center coordinate of the circle/
maprequired The map instance to which the marker attaches to/
radiusoptional number The radius of the circle (meters)/
strokeColoroptional stringThe stroke color of the circle'#3388ff'
strokeOpacityoptional number The opacity of the circle, in the middle of 0-11.0
strokeWeightoptional number The stroke weight of the circle3
fillColoroptional string The fill color of the circle'#3388ff'
fillOpacityoptional number The fill opacity of the circle0.2
filloptional string Whether to fill the path with colorfalse

Methods

NameDescription
enableEditTo enable editing mode to the shape.

(Not available for Next Billion Maps GL)
removeTo remove the shape from the map

Example

var circle = new nextbillion.maps.Circle({
center: { lat: 36.0671, lng: 120.3826 },
map: map,
radius: 600,
color: 'red',
})
// To enable editing mode
// The method "enableEdit" is not available for Next Billion Maps GL
circle.enableEdit()
// To remove from the map
circle.remove()