0.1.0 • Published 8 years ago

leaflet-pulse-icon v0.1.0

Weekly downloads
61
License
MIT
Repository
github
Last release
8 years ago

leaflet-pulse-icon

A very simple Leaflet plugin provides pulsing icon.

Requires Leaflet 0.7.0 or newer and modern browser

Demo

Check out demo!

Using the plugin

Install

  • clone repo
  • run npm install

Or copy files from releases.

Use

Include the CSS and JavaScript files located in \dist directory.

<script src="../L.Icon.Pulse.js" />
<link rel="stylesheet" href="../L.Icon.Pulse.css" />

Usage

Create a new L.Icon.Pulse

var pulsingIcon = L.icon.pulse({iconSize:[20,20],color:'red'});
var marker = L.marker([50,15],{icon: pulsingIcon}).addTo(map);

Options

PropertyDescriptionDefault ValuePossible values
colorcolor of icon'red'any CSS color
iconSizesize of L.divIcon12,12 width,height
animateenable pulsingtrueany CSS color
heatbeatpulsing beat1number (seconds)

License

leaflet-pulse-icon is free software, and may be redistributed under the MIT-LICENSE.