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

leaflet-compass

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leaflet-compass

A leaflet control plugin to make simple rotating compass

latest
Source
npmnpm
Version
1.5.6
Version published
Weekly downloads
210
-35.58%
Maintainers
1
Weekly downloads
 
Created
Source

Leaflet.Control.Compass

npm version

A leaflet control plugin to make simple rotating compass

Tested in Leaflet 0.7 and 1.2

require HTML5 API on mobile device!

Tested platforms:

  • Chrome on Android
  • Safari on iOS

Demo online:
opengeo.tech/maps/leaflet-compass

Image

Usage

Adding the Compass Control to the map:

map.addControl( new L.Control.Compass() );

Options

OptionDefaultDescription
autoActivefalseactivate control at startup
showDigitfalseshow angle value bottom compass
textErr''error message on alert notification
callErrnullfunction that run on compass error activating
angleOffset2min angle deviation before rotate, big angleOffset is need for device have noise in orientation sensor
position'topright'position of control inside map

Methods

MethodArgumentsDescription
autoActivefalseactivate control at startup
getAnglereturn Azimut angle
setAngleangleset rotation compass
activateactive tracking on runtime
deactivatedeactive tracking on runtime

Events

EventDataDescription
'compass:rotated'anglefired after compass data is rotated
'compass:disabled'fired when compass is disabled

Where

Source code:

Github
Bitbucket
Atmosphere NPM

Keywords

gis

FAQs

Package last updated on 13 Dec 2022

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