Skip to content
LocusQ

GL JS

What it is

A fork of MapLibre GL JS that stays a drop-in replacement and adds opt-in 3D extrusion, labels lifted above buildings and GLB landmarks. The Pro build, @locusq/gl-secure, also renders sealed .lqtiles.

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.

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.

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.

Install

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

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

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()

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

Minimal usage

Serve locusq-gl.js and locusq-gl.css from your installed copy (there is no public CDN) and draw a map. Either global works: locusqgl is the canonical one, maplibregl the alias.

html
<script src='/vendor/locusq-gl/locusq-gl.js'></script>
<link href='/vendor/locusq-gl/locusq-gl.css' rel='stylesheet' />

<div id='map' style='width: 400px; height: 300px;'></div>
<script>
var map = new maplibregl.Map({
  container: 'map',
  style: 'https://demotiles.maplibre.org/style.json',
  center: [-74.5, 40],
  zoom: 9
});
</script>

Licence

BSD-3-Clause, like MapLibre GL JS, which it forks.

Product page: GL JS. Release notes: Changelog.