@mirei/leaflet-semicircle-ts
v1.0.6
Published
Typescript port of the semicircle extension for Leaflet library. Originally written by @jieter.
Downloads
976
Readme
Description
Semicircle plugin for leaflet library.
This is the TypeScript port of the semicircle plugin by developed by @jieter.
Install
npm i @mirei/leaflet-semicircle-ts
Usage
const options: SemicircleOptions = {
startAngle: 0,
stopAngle: 120
};
const latLng: LatLngExpression = {
lat: 26.212313,
lng: 127.679153
};
const semicircle = new Semicircle(latLng, options);
semicircle.addTo(map);
semicircle.setStyle({
color: "black",
fill: "#00a86b",
radius: 500,
weight: 3
});
Semicircle extends Circle class from Leaflet. Likewise, SemicircleOptions extends the CircleMarkerOptions interface. Therefore, you can use all the options that you can use with the Circle class.