Noncommercial
Free
Personal projects, learning, research and other uses without commercial advantage.
Read termsClair is a carefully designed and configurable basemap for Protomaps.
Explore the map & configure your style ↗Fetch your Clair style, add your tile source, and use it with MapLibre GL JS 6.9 or later.
import * as maplibregl from 'maplibre-gl';
import 'maplibre-gl/dist/maplibre-gl.css';
const response = await fetch(
'https://clair.benmaps.fr/styles/0.5.18/light.json?lang=en'
);
if (!response.ok) throw new Error('Could not load Clair');
const style = await response.json();
// Your tile provider is configured in your app.
const key = 'YOUR_PROTOMAPS_KEY';
style.sources.protomaps.tiles = [
`https://api.protomaps.com/tiles/v4/{z}/{x}/{y}.mvt?key=${encodeURIComponent(key)}`
];
new maplibregl.Map({
container: 'map',
style,
center: [2.35, 48.86],
zoom: 13,
});
Add <div id="map"></div> and give it a height, such as
#map { height: 100vh; }. Map data is served by your tile provider.
/styles/0.5.18/light.json/styles/latest/light.json
The endpoint returns a MapLibre style with fonts, sprites, and an empty vector tile
source. You don’t need an account or API key to fetch it. Before creating the map, set
style.sources.protomaps.tiles in your app.
The files are served from a CDN with stable releases. Use a specific version URL if you prefer a stable style.
/styles/latest/light.json always serves the newest release with the same
options. It is a moving alias: it is revalidated rather than cached for a year, and its
Content-Location header names the pinned version it resolved to. Prefer a
versioned URL in production so your map does not change under you; use
latest for demos or to discover the current release.
The style and map data are separate. Use your own Protomaps token, or connect
self-hosted MVT tiles that follow the Protomaps v4 schema:
['https://tiles.example.com/{z}/{x}/{y}.mvt']
Self-hosted tiles don’t require a Protomaps token. Remember to include the appropriate data attribution. Clair’s demo uses a separate token that is never included in exported styles.
The endpoint supports GET, HEAD, CORS, and ETag
revalidation. Invalid or unknown options return 400; unknown releases
return 404.
All parameters have defaults, so you only need to include the ones you want to change. Use the configurator to preview your settings and copy the URL.
| Parameter | Default | Values |
|---|---|---|
theme |
light |
light or dark (Clair Night). |
lang |
en |
Language tag, or local for local names |
bilingual |
0 |
1 adds distinct local names |
font |
commissioner |
Commissioner (default), cal-sans, google-sans, source-sans,
inter, inter-tight, pliant or
noto. Noto covers other scripts.
|
density |
balanced |
balanced or quiet POIs |
icons |
soft |
soft or line |
terrain |
0 |
1 enables 3D terrain at natural elevation |
bathymetry |
0 |
1 tints open ocean by depth, fading out before coastal zooms |
3d |
0 |
1 enables building extrusions |
height |
9 |
Default building height, 0–100 metres |
relief, trees |
1 |
0 hides the corresponding detail |
buildings, labels, pois |
1 |
0 hides the corresponding layer group |
Translations fall back to available names. Tree, address and building detail depends on source coverage.
Simple licensing: free for noncommercial use, and a one-time license for commercial work.
Free
Personal projects, learning, research and other uses without commercial advantage.
Read terms$199 USD
Up to 10,000 daily users across all your projects. Licensed to one person or company, with no renewal fees.
Buy lifetime license ↗Over 10,000 daily users
A separate agreement for larger audiences. Contact us to discuss scope and pricing.
Daily users are distinct people who use a Clair map. Qualifying noncommercial use remains free at any audience size.
The license covers Clair, including modifications and use in client projects. It does not include tile hosting or guarantee lifetime API availability. Standalone resale of the style is excluded. See the full terms and third-party notices.