l.keyboard-help

0.6.0 • Public • Published

Node.js CI NPM Leaflet 1.9.4

L.keyboard-help

A control to display help for keyboard shortcuts in a popup, on a Leaflet map.

Screenshot 1: the "Keyboard shortcuts" button

Screenshot 2: the "Keyboard shortcuts" dialog, and DOM

Focus order

A note on focus order — the “Keyboard shortcuts” button appears before the map container in the focus order, but visually appears at the bottom-right of the map, next to the “Leaflet” attribution link. This deliberate, but there’s room for improvement!

Usage

Include or import core Leaflet, the plugin and plugin stylesheet:

<link href="path/to/leaflet.css" rel="stylesheet">
<link href="path/to/L.keyboard-help.css" rel="stylesheet"><script src="path/to/leaflet.js"></script>
<script src="path/to/L.keyboard-help.js"></script>

Then, set the keyboardHelp option when creating a map:

var map = L.map('map', {
  keyboardHelp: true
  // ...
}).setView([51.505, -0.09], 13);

// ...

Feedback, contributions and pull requests are welcomed!


License: MIT.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.6.0
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.6.0
    2
  • 0.5.0
    0
  • 0.1.0
    2

Package Sidebar

Install

npm i l.keyboard-help

Weekly Downloads

4

Version

0.6.0

License

MIT

Unpacked Size

11.1 kB

Total Files

5

Last publish

Collaborators

  • nfreear