Vector Tiles
Serve NOAA ENC data as Mapbox Vector Tiles (MVT) from the CHRT tile network.
CHRT serves nautical charts as vector tiles from tiles.chrt.co. Each tile request is authenticated with a short-lived ES256 JWT that you mint from your API key. The official SDK handles minting, refresh, and styling for you — use it unless you have a reason not to.
Recommended: the SDK
chrt.style() returns a ready-to-use S-52 style; chrt.transformRequest() mints and attaches the tile token automatically. No token handling, no manual layer wiring.
import maplibregl from 'maplibre-gl';
import { Chrt } from '@chrtco/sdk';
const chrt = new Chrt('chrt_sk_live_...');
const map = new maplibregl.Map({
container: 'map',
style: chrt.style({ palette: 'DAY' }), // 'DAY' | 'DUSK' | 'NIGHT' | 'EINK_COLOR' | 'EINK_MONO' | 'EINK_NIGHT'
center: [-70.25, 43.66],
zoom: 12,
transformRequest: chrt.transformRequest(),
});The tile contract (raw HTTP)
If you're not using the SDK, the flow is two steps: mint a token, then request tiles with it.
1. Mint a tile token
POST your API key to the mint endpoint. It returns a short-lived JWT (default 5 minutes, max 15) scoped to your coverage and plan.
curl -X POST "https://api.chrt.co/v1/mint/tile-token" \
-H "x-api-key: chrt_sk_live_..." \
-H "content-type: application/json" \
-d '{ "region": "NOAA_ENC" }'
# → 200
# {
# "token": "eyJhbGciOiJFUzI1Ni␣...", // ES256 JWT — send as Bearer
# "expires_at": 1776630300, // unix seconds
# "kid": "chrt-tile-2026-04",
# "build_tag": "2026-04-15-a1b2c3d",
# "region": "NOAA_ENC"
# }2. Request tiles with the token
Send the JWT as a Bearer token on each tile request. The tile path carries the chart region:
GET https://tiles.chrt.co/v1/tiles/{region}/{z}/{x}/{y}.mvt
Authorization: Bearer <token>
# Example
curl "https://tiles.chrt.co/v1/tiles/NOAA_ENC/10/301/384.mvt" \
-H "Authorization: Bearer eyJhbGciOiJFUzI1Ni␣..."The token is short-lived, so mint a fresh one before expiry (the SDK does this automatically, ~30s before expires_at). The API key is used only at the mint step — never put it on a tile request.
Parameters
| Param | Type | Description |
|---|---|---|
| region | string | Chart region, e.g. NOAA_ENC. Must be within your key's licensed coverage. |
| z | integer | Zoom level (0–14) |
| x | integer | Tile column |
| y | integer | Tile row |
What's in a tile
CHRT serves one consolidated vector source per region. Every S-57 object class is a distinctsource-layer inside it, so you reference classes directly (e.g. DEPARE, LIGHTS, BOYLAT) — there are no separate tileset URLs to manage. Key classes:
| Category | S-57 source-layers |
|---|---|
| Depths & areas | DEPARE DEPCNT SOUNDG LNDARE SEAARE LAKARE RIVERS CANALS |
| Coastline & structures | COALNE SLCONS DYKCON HULKES PONTON |
| Navigation aids | BOYCAR BOYLAT BOYSAW BOYISD BOYSPP BCNCAR BCNLAT LIGHTS RTPBCN RADRFL RETRFL FOGSIG |
| Hazards | UWTROC WRECKS OBSTRN |
| Routes & areas | RECTRC NAVLNE FAIRWY FERYRT TSELNE RESARE ACHARE CTNARE |
| Services | ACHBRT PILBOP SMCFAC HRBFAC CRANES |
| Linear infrastructure | CBLSUB PIPSOL PIPOHD |
| Cell metadata | M_COVR M_QUAL M_NSYS |
Styling
The IHO S-52 portrayal comes in two equivalent forms. Served: GET https://tiles.chrt.co/v1/styles/{region}/style.json?theme=day|dusk|night|eink_color|eink_mono|eink_night returns the complete MapLibre style JSON (same Bearer tile token as tiles — in the SDK, await chrt.styleUrl({ theme: 'day' }) plus chrt.transformRequest(), or fetch the object with chrt.fetchStyle()). The served style honors your key's bound CHRTstyle custom style (Platform → Map Styles) — palettes, layer visibility, label and icon settings, applied server-side. Custom styles are available on Dev plans and above; the default day/dusk/night themes, and the e-ink themes for e-paper screens, are available to every tier (a bound style on a Free key falls back to the defaults, and the mint response says so via style_applied/style_reason).
Local: chrt.style() generates the same S-52 style client-side with no network round-trip (no custom-style application). Use it offline or as a fallback, mutate the returned object freely — or, for a fully custom look, build your own style over CHRT's vector source with buildSources():
import maplibregl from 'maplibre-gl';
import { Chrt, buildSources } from '@chrtco/sdk';
const chrt = new Chrt('chrt_sk_live_...');
const map = new maplibregl.Map({
container: 'map',
// Start from any basemap (or {version:8, sources:{}, layers:[]})
style: 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json',
center: [-70.25, 43.66],
zoom: 12,
transformRequest: chrt.transformRequest(), // mints + attaches the tile JWT
});
map.on('load', async () => {
// Pin the tile URLs to the build being served, so a build cutover gets its
// own cache namespace instead of mixing old and new tiles on screen.
// `buildTags` comes from the mint; warmTiles() fills the same cache
// transformRequest() uses, so this costs no extra round-trip.
const { buildTags } = await chrt.warmTiles('NOAA_ENC');
// One vector source per region; each S-57 class is a source-layer.
const sources = buildSources({ region: 'NOAA_ENC', buildTags });
map.addSource('chrt', sources['NOAA_ENC']);
map.addLayer({
id: 'depth-areas',
type: 'fill',
source: 'chrt',
'source-layer': 'DEPARE',
paint: { 'fill-color': '#1a3a5c', 'fill-opacity': 0.6 },
});
map.addLayer({
id: 'buoys',
type: 'circle',
source: 'chrt',
'source-layer': 'BOYLAT',
paint: { 'circle-radius': 5, 'circle-color': '#f59e0b' },
});
});S-101 portrayal is on the roadmap; today the style helpers emit S-52.
Response headers
Every tile response includes standard rate-limit and metadata headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum tile requests per window for your key |
X-RateLimit-Remaining | Requests remaining in the current window |
X-Build-Id | The build this tile came from. A header, so it is not part of any cache key — put the build in the tile URL as ?v= (see above) if you cache tiles yourself |
Cache-Control | private, max-age=3600 — cacheable by your client, never by a shared proxy |
Error responses
Mint and tile requests use standard HTTP status codes with a JSON body:
{ "error": "invalid_api_key" } // at the mint step
// On a tile request, a missing or expired Bearer token returns 401 — re-mint and retry.{ "error": "region_not_licensed", "requested": "CHS_ENC", "allowed": ["NOAA_ENC"] }
// or
{ "error": "feature_flag_disabled" } // the key isn't enabled for tile serving{
"error": "tile_quota_exceeded",
"limit": 5000,
"used": 5000,
"resets_at": "2026-08-01T00:00:00.000Z",
"retry_after": 431999,
"hint": "Monthly tile quota exhausted. It resets at 2026-08-01T00:00:00.000Z ..."
}
// Retry-After is set on BOTH rate-limit and quota responses.
// A quota block carries X-Quota-Limit / -Remaining / -Reset / -Window and does
// NOT carry X-RateLimit-* — those describe the 60s window, not this one.
// "used" stops advancing while you're blocked: a rejected request isn't
// metered, so an unchanging value is expected, not a stuck meter.{ "error": "region_not_available", "detail": "No servable tile_build for region=NOAA_ENC" }
// The build catalogue was read and this region has nothing promoted.
// Retrying will not help until a build is promoted.{
"error": "tile_builds_unavailable",
"detail": "The tile build catalogue could not be read. This is not a missing build; retry after Retry-After seconds.",
"retry_after": 5
}
// Retry-After: 5 is set. This is NOT region_not_available: the mint could not
// tell which build to name, so ask again with backoff.Monthly usage limits
Each API key has a monthly tile quota based on your plan. The quota is checked when a token is minted: once you reach it, mint requests return 429 tile_quota_exceeded until the quota resets or you upgrade. Use the Usage dashboard to monitor consumption.
The quota window is the UTC calendar month — not your billing-cycle anniversary. It resets at 00:00:00 UTC on the 1st, and every 429 carries that exact instant asresets_at plus a matchingRetry-After, so you never have to infer it. Note that used stops advancing once you are blocked — a rejected request is not metered, so a value that does not change across days is the quota working, not a stuck counter.
Coverage filtering
Tiles are gated by the licensed chart sources on your API key, derived from your team's coverage. A key with US-only coverage serves NOAA_ENC tiles and gets a403 region_not_licensed for any other region. The requested region is validated both when the token is minted and on every tile request.
Tile data freshness
Tiles are rebuilt when the underlying ENC data changes. NOAA publishes weekly updates; CHRT typically reflects them within 24 hours of publication. Outstanding tokens keep serving their pinned build_tag, so a rebuild never breaks an in-flight session.
| Layer | Cache TTL | Notes |
|---|---|---|
| Edge (CDN) | 1 hour | max-age=3600 on tile responses |
| Browser | 1 hour | Same Cache-Control header |
For situational awareness only — not for primary navigation. CHRT is not an ECDIS and is not SOLAS-compliant.