1.1.7 • Published 4 years ago

@whatsaaaaa/leafletpolylinedirection v1.1.7

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

@whatsaaaaa/leafletpolylinedirection

Leaflet plug-in to add direction arrows on existing Polylines.

Install

$ npm i @whatsaaaaa/leafletpolylinedirection

Usage

import { createDirectionIndicators } from "@whatsaaaaa/leafletpolylinedirection";

createDirectionIndicators(coordinates, mapObject, {
  numberOfIndicators: 1,
  color: "red",
});

Parameters

  • coordinates: Array
  • mapObject: Object
  • options: Object

Options

  • numberOfIndicators - Default value 1. If you want more than one indicator between two coordinates, use this property
  • color - Default 'blue'. Change the color of indicator

Recommended CSS

.direction-indicator {
  width: 8px;
  height: 8px;
}

.direction-indicator > div {
  margin-left: -1px;
  margin-top: -3px;
  transform-origin: center center;
  font: 12px/1.5 'Helvetica Neue', Arial, Helvetica, sans-serif;
}
1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago