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

maplibregl-minimap

v1.0.3

Published

Minimap Plugin for Maplibre-GL

Readme

Minimap Plugin for Maplibre-gl Map Engine

This package provides a configurable MiniMap component to use with the MapLibre GL project. It allows you to display a small overview map alongside the main map, with customizable options for size, zoom level, interactions, and styling, making it a flexible tool for enhancing your MapLibre GL applications.

!!!Note: This library is currently in development and not yet ready for production use. Use it at your own risk, and expect potential changes in future releases.!!!

Instructions

  • Install the plugin using your package manager
$ npm i maplibregl-minimap
  • import it into your project and use it directly
import MinimapControl from "maplibregl-minimap";

const miniMapConfig = {
  id: "myCustomMiniMap",
  width: "200px",
  height: "200px",
  zoomLevelOffset: 6,
  interactions: { drag: true, zoom: false },
  initialMinimized: false,
  minimizableMinimap: true,
  collapsedWidth: "30px",
  collapsedHeight: "30px",
  borderRadius: "5px",
};

// after the initilize your map
map.on("load", () => {
  map.control(new MinimapControl(miniMapConfig));
});

MiniMap Configuration

The configuration object for the MiniMap allows you to control its size, visibility, interaction, and style. Below are the available options. It's possible to

Configuration Properties

export type MiniMapConfiguration = Partial<{
  showText: string;
  hideText: string;
}> & {
  id: string;
  width: string;
  height: string;
  zoomLevelOffset: 5 | 6 | 7 | 8;
  interactions: MinimapInteractions;
  initialMinimized: boolean;
  minimizableMinimap: boolean;
  collapsedWidth: string;
  collapsedHeight: string;
  borderRadius: string;
  style: StyleSpecification;
};

Property Descriptions

  • id (string, required): Set a custom id for the minimap. This must be unique within your application.
  • width (string, optional, default: 150px): Defines the width of the minimap container.
  • height (string, optional, default: 150px): Defines the height of the minimap container.
  • zoomLevelOffset (5 | 6 | 7 | 8, optional, default: 5): Sets the zoom offset for the minimap relative to the parent map.
  • interactions (MinimapInteractions, optional, default: all disabled): Specifies which interactions (like zoom, drag, etc.) are enabled or disabled on the minimap.
  • initialMinimized (boolean, optional, default: true): Determines whether the minimap is minimized when it first loads.
  • minimizableMinimap (boolean, optional, default: true): Whether the minimap can be minimized or not. If set to false, the minimize button will be disabled.
  • collapsedWidth (string, optional, default: 29px): The width of the minimap when it is minimized.
  • collapsedHeight (string, optional, default: 29px): The height of the minimap when it is minimized.
  • borderRadius (string, optional, default: 3px): Sets the border radius for the minimap container.
  • style (StyleSpecification, optional): Custom style object for further styling the minimap. This allows you to define specific visual properties like colors, borders, etc.

To-Do/Fix

  • [x] Bundling the package results in losing types and autocompletion provided by the intellisence. ~~(partially solved but still the importer script doesn't recognize types and intellisense doesn't autocomplete while typing... (WIP)~~
  • [ ] figure out what is the initial yet optimal value for 'zoomLevelOffset'.
  • [ ] optimize the package size (currently ~600KB).