npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@saundersresearch/leaflet-maidenhead

v0.2.2

Published

Leaflet plugin for displaying and highlighting Maidenhead grid squares

Readme

leaflet-maidenhead

A Leaflet plugin for displaying and highlighting Maidenhead grid squares

This project is a fork of Leaflet.Maidenhead by HA8TKS that adds the ability to highlight specific grid squares.

Usage

Include the script:

<script src="https://unpkg.com/@saundersresearch/leaflet-maidenhead@latest/dist/leaflet-maidenhead.js"></script>

Then add the Maidenhead layer to your Leaflet map:

L.maidenhead({
    color : 'rgba(255, 0, 0, 0.4)', 
    highlights: [
        { grids: ["JN82", "JO"], color: 'rgba(0, 255, 0, 0.4)', fillOpacity: 0.4 },
        { grids: ["KN16"], color: 'rgba(0, 0, 255, 0.4)', fillOpacity: 0.8 }
    ]
}).addTo(map);

See the example in examples/ for a complete working demo.

Options

  • redraw: Redraw the grid on 'move' or 'moveend'. (default: 'move')
  • color: The color of the lines and labels. (default: rgba(255, 0, 0, 0.4))
  • highlights: An array of objects defining grid squares to highlight. Each object can have:
    • grids: An array of Maidenhead grid squares to highlight (e.g., ["JN82", "JO"]). They will be highlighted at the largest level matching the prefix and all sub-levels.
    • color: The color for the highlighted squares.
    • fillOpacity: The fill opacity for the highlighted squares.
  • zoomLevels: Configuration object to set zoom levels for different grid sizes:
    • field: Zoom level for field grids (default: 5)
    • square: Zoom level for square grids (default: 9.5)
    • subsquare: Zoom level for subsquare grids (default: 14)
    • extended: Zoom level for extended grids (default: 18)
    • extendedPlus: Zoom level for extended plus grids (default: 22)
  • font: Configuration object for font size:
    • cellPercentage: Percentage of the grid cell size to use for font size (default: 0.2)
    • sizeBounds: Object defining min and max font sizes for each grid level:
      • field: (default: { min: 28, max: 42 })
      • square: (default: { min: 18, max: 28 })
      • subsquare: (default: { min: 12, max: 20 })
      • extended: (default: { min: 8, max: 12 })
      • extendedPlus: (default: { min: 8, max: 12 })

Installation for development

For local development, clone the repository and install the dependencies with npm install. Then, build and run the example in examples/ with npm run dev.

To build for production, use npm run build. The output will be at dist/leaflet-maidenhead.js.

License

This project is released under the MIT license.

See also