Skip to content
LocusQ

A MapLibre-compatible map renderer with 3D built in

@locusq/gl is a fork of MapLibre GL JS that stays a drop-in replacement. It adds rounded 3D buildings, labels lifted above them and GLB landmark models, with no plugin.

Maps

0.3.0Free + Pro

01What it does

Swap the import, keep your code

Existing maplibre-gl code runs unchanged: same API, same named exports, same maplibregl- CSS classes. The UMD bundle sets the global locusqgl and also window.maplibregl.

ts
import maplibregl from '@locusq/gl';

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

3D extrusion, opted into per layer

A fill-extrusion layer gets rounded corners and roofs, and an optional ground shadow, when it sets a locusq-* paint property. Every other layer runs the unmodified MapLibre v5.24.0 code.

json
{
  "id": "buildings-3d",
  "type": "fill-extrusion",
  "source": "base",
  "source-layer": "building",
  "paint": {
    "fill-extrusion-height": ["get", "render_height"],
    "locusq-fill-extrusion-edge-radius": 1.5,
    "locusq-fill-extrusion-shadow": true
  }
}

Sealed tiles with @locusq/gl-secure (Pro)

The Pro build adds a WebAssembly decoder for .lqtiles served by Tilex. Decrypted tiles stay in the web worker, so secure sources cannot be queried; rendering is the same.

ts
import {Map, enableLocusQSecure} from '@locusq/gl-secure';

const map = new Map({container: 'map', style});
await enableLocusQSecure(map, {
    sessionEndpoint: 'https://tiles.example.com/v1/session',
    apiKey: EMBEDDER_SUPPLIED_API_KEY,
    tileServerOrigin: 'https://tiles.example.com',
    wasmUrl: '/assets/locusq-gl-secure.wasm'
});

02Install

Run GL JS yourself

  1. Get access

    The repositories and packages are private while LocusQ is in private release. Ask for access and say which tools you need.

  2. Point the @locusq scope at GitHub Packages

    Add this line to your project's .npmrc. Reading the packages needs a GitHub token with read:packages in your npm auth config. Never commit the token.

    text
    @locusq:registry=https://npm.pkg.github.com
  3. Install the build you need

    bash
    npm install @locusq/gl          # open build: MapLibre-compatible renderer with the LocusQ 3D additions
    npm install @locusq/gl-secure   # the same, plus the sealed-tile (lqp1) decoder and enableLocusQSecure()
  4. Coming from maplibre-gl

    Swap the dependency, then change the import specifier from 'maplibre-gl' to '@locusq/gl'. No other source changes are needed.

    bash
    npm uninstall maplibre-gl && npm install @locusq/gl

Draw your first LocusQ map

The guide covers the script tag, the ES module import and the secure build.