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

maplibre-gl-earth-engine

v0.4.2

Published

MapLibre GL control for Google Earth Engine catalog discovery, authentication, and layer rendering

Readme

maplibre-gl-earth-engine

MapLibre GL JS plugin for Earth Engine dataset discovery, authentication, and layer rendering.

Current tabs and capabilities

  • Browse/Catalog
    • Automatically fetch official + community catalogs when the panel opens
    • Source filter (official/community/all)
    • Category grouping with result counts
    • Dataset details pane (title/id/provider/type/tags/snippet)
    • One-click Use in Load tab
  • Search
    • Keyword search
    • Source + type filter
    • Sort by title/id
    • Page + limit controls
  • Load
    • Asset id input
    • Image/ImageCollection options (date range, cloud property/threshold, reducer)
    • Visualization params (bands/min/max/palette/opacity)
    • Add, update, remove map layer
    • Open dataset page on Earth Engine
  • Layers
    • Manage all added Earth Engine layers
    • Toggle visibility
    • Change raster opacity
    • Select and remove layers
  • Inspector
    • Inspect added Earth Engine layers directly
    • Inspect pixel values from added image/image collection layers and features from added feature collection layers
    • Use explicit lon/lat inputs or map clicks
  • Code
    • Run EE script snippets, including Code Editor-style Map.addLayer, Map.setCenter, and Map.centerObject calls
  • Auth
    • Sign in with Google account OAuth
    • Enter Earth Engine Google Cloud project ID
    • Auth status text

Feature matrix

| Area | Status | | ------------------------------------- | -------------------------------------------------- | | Catalog browse + grouped categories | ✅ Implemented | | Search filters/sort/pagination | ✅ Implemented | | Load image + collection options | ✅ Implemented (MVP wiring for collection options) | | Layer add/update/remove | ✅ Implemented | | Multi-layer management | ✅ Implemented | | EE object + pixel inspection | ✅ Implemented | | Auth persistence | ✅ Implemented | | Charts/statistical UI for time series | 🟡 Planned |

Install

npm install maplibre-gl-earth-engine

Quick start

import maplibregl from 'maplibre-gl';
import { PluginControl } from 'maplibre-gl-earth-engine';
import 'maplibre-gl-earth-engine/style.css';

const map = new maplibregl.Map({
  container: 'map',
  style: 'https://demotiles.maplibre.org/style.json',
  center: [0, 0],
  zoom: 2,
});

map.on('load', () => {
  const eeControl = new PluginControl({
    title: 'Earth Engine',
    oauthClientId: 'YOUR_GOOGLE_OAUTH_CLIENT_ID',
    projectId: 'your-earth-engine-project',
  });
  map.addControl(eeControl, 'top-right');
});

Authentication

The control uses browser OAuth through the official @google/earthengine package. Configure an OAuth client ID in the host app and let users enter an Earth Engine-enabled Google Cloud project ID in the Auth tab:

const eeControl = new PluginControl({
  oauthClientId: 'YOUR_GOOGLE_OAUTH_CLIENT_ID',
});

For Vite builds, copy .env.example to .env and set:

VITE_GEE_OAUTH_CLIENT_ID=your-client-id.apps.googleusercontent.com
VITE_GEE_PROJECT_ID=your-earth-engine-project

When VITE_GEE_OAUTH_CLIENT_ID is available at build time, the Auth tab hides the OAuth client ID input and only asks users for the project ID.

You can also prefill the project ID:

const eeControl = new PluginControl({
  oauthClientId: 'YOUR_GOOGLE_OAUTH_CLIENT_ID',
  projectId: 'your-earth-engine-project',
});

Service account private keys are intentionally not used in the browser control.

GitHub Pages deployment guidance

For static deployments (e.g., GitHub Pages):

  1. Build docs/demo with Vite (npm run build or your docs workflow).
  2. Configure a browser OAuth client ID if you want native Earth Engine login.

For the included GitHub Pages workflow, add VITE_GEE_OAUTH_CLIENT_ID as a GitHub Actions secret on the github-pages environment. You can also add VITE_GEE_PROJECT_ID as a GitHub Actions variable there as an optional default project ID. Note that Vite embeds VITE_* values into the deployed browser bundle, so the client ID is still visible in the published site; use a public OAuth client ID, not a private key.

Development

npm install
npm run build
npm test