Circle
Quick answer
L.circle draws a geographic circle whose radius is measured in meters, so its screen size grows and shrinks as the map zooms. It suits buffer zones, coverage ranges and area analysis where the real-world extent matters. Use setRadius and setLatLng to update it in place.
L.circle( latlng , radius , options ) → Circle
Key points
- radius is required and always interpreted in meters, never in pixels.
- getBounds returns the enclosing box, suitable for map.fitBounds with padding.
- toGeoJSON exports a polygon approximation, not a true circular geometry.
Example
var circle = L.circle([39.907359, 116.391263], {
radius: 1500,
color: '#1f5fd0',
weight: 1.5,
fillColor: '#1f5fd0',
fillOpacity: 0.12
}).addTo(map);
circle.bindTooltip('半径 1.5 km');
circle.setRadius(3000);
circle.setLatLng([39.914, 116.404]);
Notes
- Circle is built from line segments, so the exported polygon is coarser at low zoom levels.
- getBounds is the bounding rectangle, not the area; compute area from radius directly.
English edition written for Atlaslog. Code is taken from the original Chinese page and runs unchanged.
Atlaslog (2026). Circle. https://www.jingweizhi.com/en/leaflet/api/circle.html (accessed 2026-11-03).