Extend Leaflet's circle class to display semicircles.
MIT License
Allows drawing semicircles on leaflet maps.
It's an extension of Leaflet's L.Circle
,
and behaves like L.Circle
if the a semicircle of almost 360 degrees is displayed.
Updated for use with leaflet 1.1.0.
The plugin provides two ways to only display a part of the circle:
options
map and set startAngle
and stopAngle
.setDirection(direction, size)
to display a semicircle of size
degrees at direction
.Using options.startAngle
and options.stopAngle
:
L.semiCircle([51.5, -0.09], {
radius: 500,
startAngle: 45,
stopAngle: 135
}).addTo(map);
Draw the same semicircle using setDirection(direction, size)
:
L.semiCircle([51.5, -0.09], {radius: 500})
.setDirection(90, 90)
.addTo(map);
L.Circle
with an extension of itself.