New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

leaflet-drift-marker

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-drift-marker

Just a marker that can drift its way to a new position, to use with leaflet, and base on Typescript for react,vue...

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
217
decreased by-73.73%
Maintainers
1
Weekly downloads
 
Created
Source

:warning: From v2 up react project was splited to react-leaflet-drift-marker so this packages can be installed on vue,angular... and serve as base for other platforms.

leaflet-drift-marker

MIT License npm version

SupportTested
leaflet1.5.1

"IMG"

A plugin for leaflet in Typescript to use on react,vue... that allows a marker to move smoothly instead of jump to a new position. Reworked to typescript from Leaflet.Marker.SlideTo!

For more performance use canvas or webgl options!!

Installation

Install via NPM

npm install --save leaflet-drift-marker

leaflet-drift-marker requires only leaflet as peerDependency

npm install --save leaflet

Usage

Leaflet

Edit leaflet_DriftMarker

You can get the build file DriftMarker.js from releases or :

<script>
  <!-- will be fixed on next release -->
  <!-- Include this script if exports does not exists on window or -->
  <!-- the following error "ReferenceError: exports is not defined" -->
  <!-- before the cdn import -->
  var exports = {};
</script>
<script src="https://unpkg.com/leaflet-drift-marker@2.0.0/lib/index.js"></script>

Still supports all existing leaflet marker properties check marker

This plugin implements two new methods:

  • .slideTo(latlng, slideOptions)
    • latlng : LeafletLatLng , required
    • slideOptions : Object , required
      • duration : number , required
      • keepAtCenter : Boolean , optional
  • .slideCancel()
DriftMarker (with leaflet)
import DriftMarker from "leaflet-drift-marker";
//var DriftMarker=require("leaflet-drift-marker")

const marker = new DriftMarker([10, 10]);

marker.slideTo([20, 20], {
  duration: 2000,
  keepAtCenter: true,
});

License

MIT License

Keywords

FAQs

Package last updated on 02 Apr 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc