1.0.0 • Published 4 years ago

leaflet-arrowcircle v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Leaflet.ArrowCircle

Circle with a directional arrow for use with the Leaflet mapping library.

Requirements

  • Leaflet 1.6.0+ (it may well work with earlier versions; they have not been tested)
  • Browser support for SVG

Demo

https://coyotesqrl.github.io/Leaflet.ArrowCircle

Usage

Include L.ArrowCircle.js as appropriate to your environment (HTML or Node).

<script src="L.ArrowCircle.js"></script>

Simple initialization

L.marker
  .arrowCircle([40.2, -74.8], {
    iconOptions: { color: "rgb(200, 30, 240)", rotation: 42 },
  })
  .addTo(mymap);

Properties

OptionTypeDefaultDescription
colorString#0080ffColor of the ArrowCircle
sizeNumber36Total size of viewport square; the circle's center is coincident with the viewport's and the tip of the arrow abuts the end
opacityNumber1Opacity of the ArrowCircle
rotationNumber0Angle at which the arrow points