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

@cogp/maplibre

v2.1.4

Published

MapLibre GL JS vector tile adapter for Cloud Optimized GeoParquet.

Readme

@cogp/maplibre

Use Cloud Optimized GeoParquet as a MapLibre GL JS vector source. The adapter reads COGP in a worker and produces vector tiles in the browser.

npm install @cogp/maplibre maplibre-gl

Add a source

Register the protocol once, then use cogpUrl() to create the tile template. The key buildings becomes the MapLibre source-layer name.

import * as maplibregl from 'maplibre-gl';
import { cogpUrl, registerCogpProtocol } from '@cogp/maplibre';

registerCogpProtocol(maplibregl);

const map = new maplibregl.Map({
  container: 'map',
  style: {
    version: 8,
    sources: {
      city: {
        type: 'vector',
        tiles: [cogpUrl({
          buildings: { url: 'https://example.com/buildings.cogp.parquet' },
        })],
      },
    },
    layers: [{
      id: 'buildings', type: 'fill', source: 'city',
      'source-layer': 'buildings',
      paint: { 'fill-color': '#666' },
    }],
  },
});

Select properties or combine files

Each key passed to cogpUrl() creates one MVT layer. Options belong to that layer:

const tiles = cogpUrl({
  buildings: {
    url: 'https://example.com/buildings.cogp.parquet',
    properties: { height: 'details.height', secondFloor: 'floors[1]' },
    maxRowsPerTile: 10_000,
  },
  roads: { url: 'https://example.com/roads.cogp.parquet' },
});
  • Omit properties to read all ordinary attributes; pass {} for geometry only. A mapping selects columns and renames their MVT properties.
  • A struct path fetches only the selected field. A map key such as tags.name reads the map's key and value columns before selecting the key. An indexed list path reads the whole list before selecting an element.
  • Omit maxRowsPerTile for no row limit. A limit keeps the first matching rows in source order.

MVT property values are display strings, including numbers.

The source files need CORS and HTTP range support. Geometry coordinates must be longitude/latitude for Web Mercator tiles. Your bundler must support module workers via new Worker(new URL(..., import.meta.url)).

For optional metadata and diagnostics, inspectCogp(url, signal?) and getCogpStats(url) use the same reader cache as the tiles. See the MapLibre demo for a complete application.

Development

pnpm --filter @cogp/maplibre test