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

@jielga/nordic-map

v0.3.0

Published

An offline map of Sweden for React, with GPS pins, labels, clusters, areas and paths.

Readme

@jielga/nordic-map

An offline map of Sweden for React, with GPS pins, labels, clusters, areas and paths. The map data ships with the package, so no tile server or API key is needed.

Installation

npm install @jielga/nordic-map

The peer dependencies are react and react-dom, 19.1 or later.

Import the stylesheet once:

import "@jielga/nordic-map/styles.css";

@jielga/nordic-map/styles.layer.css holds the same rules in the cascade layer nordic-map.

Usage

NordicMap fills its container, so give the container a height:

import { NordicMap, swedenOsmSource, type MapPin } from "@jielga/nordic-map";
import { useState } from "react";

const pins: MapPin[] = [
  { id: "sto", lat: 59.33, lon: 18.07, label: "Stockholm" },
  { id: "got", lat: 57.71, lon: 11.97, label: "Göteborg" },
];

export function Offices() {
  const [selected, setSelected] = useState<string[]>([]);

  return (
    <div style={{ height: 600 }}>
      <NordicMap
        source={swedenOsmSource}
        label="Offices"
        pins={pins}
        selected={selected}
        onSelectionChange={setSelected}
      />
    </div>
  );
}

Define source outside the component; a new object on every render loads every map cell again.

Features

  • Pins with labels that never overlap, colors, priorities and your own data
  • Selection by drag box, by click or by clicking an area, and a highlighted pin for linking the map to a list
  • Clusters of close pins, which open on click
  • Areas, with Sweden's counties and municipalities built in for choropleth maps
  • Paths, such as GPS tracks and routes
  • Place names, roads and road signs, each shown in a zoom range of your choice
  • A camera you move from code: flyTo, fitBounds, fitPins
  • Light and dark colors, a style object for every color, and CSS variables for the buttons
  • English and Swedish texts
  • Keyboard access to every pin on screen

The documentation in docs/ has one page per feature, and ships with the package.

Data licenses

The OpenStreetMap data is © OpenStreetMap contributors, under the Open Database License (ODbL). A map that shows it must credit "© OpenStreetMap contributors"; swedenOsmSource sets this credit, and NordicMap shows it in the corner. The Natural Earth land borders of the neighbouring countries are in the public domain.

Development

The data in src/data/ is built by the scripts in scripts/map-data/, which also lists the sources and how to rebuild. The output is committed, so the scripts only need to run when the data changes.

The documentation site is apps/nordic-map-docs/ in this repository:

bun run --cwd apps/nordic-map-docs dev