Skip to content
LocusQ

One schema in. Tiles, routes and search out.

LocusQ is a self-hosted mapping platform: data pipeline, vector tiles, map styles, a WebGL renderer, routing and geocoding. The services run in Docker on your own servers.

OpenFreeMap © OpenMapTiles Data from OpenStreetMap

01How it fits

From your database to a map in four steps

  1. Bring your data

    DataLab maps your PostGIS tables into the LocusQ schema with a YAML file. pg2osm turns the schema into an OSM PBF.

    DataLab
  2. Build tiles

    TileGen runs Planetiler on the PBF and writes PMTiles. Tilex serves them over HTTP, open or sealed.

    TileGen
  3. Style the map

    MapLab Studio, a Maputnik fork, edits the style, generates fonts and icons, and publishes it to Tilex.

    MapLab
  4. Ship it

    GL JS draws it in the browser. It is a drop-in MapLibre GL JS replacement, so existing map code keeps working.

    GL JS

03Try it

The renderer, live on this page

LocusQ GL JS 0.3.0 drawing OpenFreeMap tiles with this site’s two styles. Switch the style, raise the buildings, or fly to another city.

04Own it

Run it yourself, keep it yours

The services run on your servers

Each service is a Docker image or a Compose stack with keys from its own environment: Tilex is one Rust binary, Router a gateway in front of OSRM, Valhalla, GraphHopper and OpenTripPlanner, Geocoder one Pelias stack.

Self-host LocusQ
bash
export ROUTER_API_KEYS="$(openssl rand -hex 24)"
docker compose --profile osrm --profile valhalla up -d --build
curl -s http://127.0.0.1:8080/health

Sealed tiles the server never decrypts (Pro)

TileGen seals PMTiles into .lqtiles. Tilex rewraps each tile for a short-lived viewer session without decrypting it, and @locusq/gl-secure decodes it in a web worker.

Free vs Pro
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'
});

One schema in, everything out

DataLab loads your PostGIS tables into the LocusQ schema. pg2osm writes the OSM PBF that TileGen and Router read, and DataGen writes the Who’s On First, GeoNames and Placeholder data the geocoder imports.

The LocusQ schema
bash
npx tsx bin/locusq-convert.ts mappings/<your-mapping>.yaml
locusq-pg2osm convert --config config/master_mapping.yaml \
  --db-config config/database.yaml --output output/final/country.osm.pbf
locusq-datagen generate --source <source> --output ./output --all --validate

Start free, or tell us what you are building

Sign up for a console token, or write to us about access to the software and Pro.