OnlyMapJS Latest release
GitHub Docs

OnlyMapJS examples

Interactive WebGL maps from plain HTML. Every example below is a single file that runs with no build step — open one, copy it, edit it.

Features

One concept per page. Copy it, change one attribute, see what moves.

Getting started

Layers

Add scatterplot points

ScatterplotLayer points from a JSON file, sized by population with a sqrt scale and coloured by category.

Create a choropleth

Shade real country boundaries by GDP per capita with GeoJsonLayer. A threshold scale labels the legend classes.

Draw arcs and paths

The same five journeys twice: PathLayer follows the real driving route, ArcLayer curves straight between endpoints.

Animate trips

Move 48 vehicles at once with TripsLayer. Each carries its own departure time, so traffic builds and thins on its own.

Create a heatmap

HeatmapLayer turns thousands of points into a density surface, weighted so large events outweigh clusters of small ones.

Bin points into hexagons

HexagonLayer bins points into counts you can pick, with the tally encoded as both colour and height.

Add icons and labels

Mark places with IconLayer sprites cut from one atlas, then name them with TextLayer. A filter keeps only the biggest cities labelled.

Label many features

PopupLayer draws a WebGL badge on every earthquake above magnitude 5, over a heat ramp of all 1,960 on a dark map.

Aggregate by H3 cells

H3HexagonLayer draws pre-binned data from a column of H3 cell ids: 45 years of cyclone tracks. H3ClusterLayer merges cells into outlines.

Draw spatial index cells

S2Layer, GeohashLayer, QuadkeyLayer and A5Layer draw spatial index cells from a column of ids. The same power stations, binned four ways.

Draw 3D columns

Stand a ColumnLayer bar on every power station, sized by capacity and coloured by fuel. GridCellLayer is the square-cell sibling.

Rasters & tiles

3D, terrain & lighting

Stories & animation

Sources

Styling

Interaction

Widgets

Examples

Complete maps on real data, some of them live. Copy one and swap in your own — the chrome and interaction carry over.

Transport & logistics

Urban planning

Climate & hazards