New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

leaflet-image-animator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-image-animator

Perform keyframe animation of images a leaflet map.

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

leaflet-image-animator NPM version NPM Downloads

Simple plugin to animate mutiple images as keyframes.

Screenshot

install

npm install leaflet-image-animator --save

use and options

See demo for detailed example.

const imageAnimatorLayer = L.imageAnimatorLayer({
  frames: [
    {
      time: '<time string>',
      img: '<base64 image string>'
    }
  ],
  startFrameIndex: 0,
  bbox: [
    '142.020371',
    '-28.589904',
    '155.372974',
    '-7.4053889999999996'
  ],

  // optional - supply the name of an existing custom pane 
  // default overlayPane (leaflet v0.7 compatible)
  paneName: 'myCustomPane' 
	
  // optional callbacks when layer is added/removed from map
  onAdd: function(){}
  onRemove: function(){}
});

public methods

methodparamsdescription
isActivecheck if the layer is currently active on the map
getFrameTimesGet an ascending array of all ISO times (can then be used to call setFrameTime)
setFrameTimetime: {string}display the image at the given frame time
getFrameTimeGet the current frame time (-1 if not set)
setFrameIndexindex: {Number}display the particles at the given frame index
getFrameIndexGet the current frame index (-1 if not set)

Example data

Data shown for the Great Barrier Reef has been derived from CSIRO's eReefs products

Keywords

leaflet

FAQs

Package last updated on 31 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts