Leaflet Swoopy

A plugin for adding beautiful swoopy arrows on top of Leaflet maps

Installation

Install with npm/yarn:

npm install leaflet-swoopy

Or download the minified library from unpkg or jsDelivr.

<script src="https://unpkg.com/leaflet-swoopy"></script>

Usage Example

import L from 'leaflet';
import 'leaflet-swoopy';

// create leaflet map ...

const swoopy = L.swoopyArrow([53.52, 13.4], [53.525, 14.41], {
  label: 'Hi!',
  labelFontSize: 12,
  iconAnchor: [20, 10],
  iconSize: [20, 16]
}).addTo(map);

Creation

Factory
Description
L.swoopyArrow(fromLatlng, toLatlng, options) You need to pass the first paramters fromLatlng and toLatlng in order to create a swoopy arrow. The options paramter is not required.

Options

Option
Type
Default
Description