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

@kayahr/etchmap

v0.1.0

Published

A small dependency-free browser library for smooth interactive raster-tile maps

Readme

EtchMap

GitHub | NPM | API Doc

A browser library for smooth interactive XYZ raster-tile maps like OpenStreetMap.

  • Canvas-based.
  • Minimal by design: only renders the map and handles the usual pan and zoom interactions.
  • Developer-friendly onDraw callback to draw application-specific visuals after the map has been rendered in each frame.
  • Programmatic usage through the MapComponent class.
  • Declarative usage through the <kayahr-map> custom element.
  • Configurable map source. Defaults to OpenStreetMap.
  • Built-in Web Mercator and linear projections with support for custom projections.
  • Zero runtime dependencies.

Declarative creation

Import the package module, give the element a CSS size, and specify the initial view directly in HTML.

<script type="module">
  import "@kayahr/etchmap";
</script>

<style>
  kayahr-map {
    width: 100vw;
    height: 100vh;
  }
</style>

<kayahr-map center-x="6.9603" center-y="50.9375" zoom="13"></kayahr-map>

JavaScript can access the complete component API of a declaratively created map with document.querySelector("kayahr-map").getComponent().

Programmatic creation

import { MapComponent } from "@kayahr/etchmap";

const map = new MapComponent({
    center: { x: 6.9603, y: 50.9375 },
    zoom: 13
});

map.onDraw = (context, map) => {
    const point = map.projectPoint({ x: 6.9583, y: 50.9413 });
    context.fillRect(point.x - 4, point.y - 4, 8, 8);
};

document.body.append(map.getElement());

Demos

  • Simple demo (Source) - Uses the default OpenStreetMap source and the onDraw callback to position an HTML marker at Cologne Cathedral.
  • GW2 demo (Source) - Renders the Tyria world map from the Guild Wars 2 map API as a linear tile source with viewport covering disabled.
  • Flights demo (Source) - A more complex animated example with moving aircraft, dynamically changing routes and naturally projected great-circle polylines.

See also