Leaflet plug-in to add circular points on polyline coordinates.
npm i @whatsaaaaa/leafletpolylinepoints
import { addCircularPointToPolyline } from "@whatsaaaaa/leafletpolylinepoints";
addCircularPointToPolyline(
[
{
latitude: route.latitude,
longitude: route.longitude,
},
],
map,
{
color: "red",
bindPopup: true,
popupContent: `Popup Content!`,
}
);
- coordinates: Array of objects (lat, lng)
- map: Obhect
- options: Object
- color - Default 'blue'. Change the color of circle
- bindPopup - Default 'false'. On click binds popup.
- popupContent - What to show in popup.
.polyline-point > div {
margin-left: -1px;
margin-top: -3px;
transform-origin: center center;
}