Declarative, not procedural.
Write fill-red-500, stroke-black, opacity-80. Read the style — that is the program. No imperative API calls, no setter chains, no callback graph.
Introducing X-GIS
Declare what your map should look like. The compiler emits the WGSL shaders, buffer layouts, and projection math.
source land {
type: geojson
url: "data/land.geojson"
}
layer continents {
source: land
| fill-zinc-200
} Want to tweak it? See more examples
WebGPU · Seven projections · MIT
The Approach
GIS rendering is locked to libraries. Mapbox, Deck.gl, OpenLayers — each has its own API, style format, and shader constraints. Switching means rewriting everything. X-GIS solves this with a language instead of an API.
Write fill-red-500, stroke-black, opacity-80. Read the style — that is the program. No imperative API calls, no setter chains, no callback graph.
WGSL programs, buffer layouts, projection math, render strategies — all derived from your .xgis source. You never reach for a vertex shader.
Switch from Mercator to Orthographic to Natural Earth via a uniform. The same data renders to a flat map, a globe, or anywhere else — no re-tessellation.
opacity-[interpolate(zoom, 8, 40, 14, 100)]. Camera state is a runtime value the compiler can sample — same shape works for feature properties.
Get Started
npm release is in flight; for now the playground is the way in.
git clone https://github.com/X-GIS/X-GIS
cd X-GIS
bun install
bun run dev Bun workspace. The dev server boots the playground at localhost:3000.
import { XGISMap } from "@xgis/runtime"
const map = new XGISMap(canvas)
await map.run(source, baseUrl) WebGPU when available. Canvas 2D fallback when not.