API Reference
MarineCharts serves NOAA ENC data as Mapbox-compatible vector tiles. All endpoints require a token and return data suitable for use with MapLibre GL, Mapbox GL JS, and any other library that supports the vector tile spec.
Quick start
The fastest way to get a working chart is to pass the style endpoint URL directly to MapLibre. It returns a complete style document — sources, layers, sprites, and glyphs — so you don't need to configure anything yourself.
const map = new maplibregl.Map({
container: 'map',
style: 'https://tiles.marinecharts.io/api/style?token=YOUR_TOKEN',
center: [-70.9, 42.35],
zoom: 10
});
See the MapLibre tutorial for a full walkthrough including customisation and depth filtering.
Authentication
All requests require a token query parameter. Tokens are issued per account and are shown in your dashboard.
GET /api/style
https://tiles.marinecharts.io/api/style?token=YOUR_TOKEN
Returns a complete MapLibre style specification document. The style includes the enc vector source, all ENC layers with default styling, sprite references, and glyph URLs.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| token | string | Yes | Your API token |
Response
Returns application/json. The response includes tile source URLs and sprite URLs with your token embedded, so the document can be passed directly to MapLibre with no modification.
GET /api/tiles/:z/:x/:y
https://tiles.marinecharts.io/api/tiles/{z}/{x}/{y}.pbf?token=YOUR_TOKEN
Returns a Mapbox Vector Tile (.pbf) for the given tile coordinates. Tiles are served in the standard XYZ tiling scheme (Web Mercator, EPSG:3857).
Parameters
| Parameter | Type | Description |
|---|---|---|
| z | integer | Zoom level (0–14) |
| x | integer | Tile column |
| y | integer | Tile row |
| token | string | Your API token |
Response
Returns application/x-protobuf. Returns 204 No Content for tiles outside covered areas — your mapping library will silently skip these.
GET /api/asset/:file
https://tiles.marinecharts.io/api/asset/sprites.json?token=YOUR_TOKEN
Serves sprite sheets used by the default style for buoy, beacon, and light icons. These URLs are included automatically in the style document — you do not need to call this endpoint directly.
Available files
| File | Description |
|---|---|
| sprites.json | Sprite index (1x) |
| sprites.png | Sprite image (1x) |
| [email protected] | Sprite index (2x, for high-DPI displays) |
| [email protected] | Sprite image (2x, for high-DPI displays) |
Layer reference
Each layer corresponds to an S-57 ENC object class. Layer names in the tiles match the source-layer values used in MapLibre style definitions. The default style renders all layers — you can override or extend any of them.
Depth & water
| Layer | Geometry | Description |
|---|---|---|
| depare | Polygon | Depth areas with drval1 / drval2 depth range attributes |
| depcnt | Line | Depth contour lines |
| soundg | Point | Individual sounding labels with depth attribute (metres). Visible from zoom 11. |
| drgare | Polygon | Dredged areas with depth attributes |
| basemap_deptharea | Polygon | Low-zoom simplified depth areas with drval attribute. Shown at zoom 0–5. |
Land & coastline
| Layer | Geometry | Description |
|---|---|---|
| lndare | Polygon | Land areas |
| coalne | Line | Coastlines |
| earth | Polygon | Basemap land fill |
| slcons | Polygon / Line | Shoreline constructions (seawalls, breakwaters) |
| bridge | Polygon | Bridges |
| ponton | Line | Pontoons and floating docks |
Navigation aids
| Layer | Geometry | Description |
|---|---|---|
| lights | Point | Navigational lights. Icon driven by icon_id; label from label. |
| light_arcs | Line | Coloured light sector arcs. Colour driven by colour attribute. |
| boylat | Point | Lateral buoys (port/starboard). Icon driven by icon_id. |
| bcnlat | Point | Lateral beacons |
| boycar | Point | Cardinal buoys (N/S/E/W) |
| bcncar | Point | Cardinal beacons |
| boyisd | Point | Isolated danger buoys |
| bcnisd | Point | Isolated danger beacons |
| boyspp | Point | Special purpose buoys |
| bcnspp | Point | Special purpose beacons |
| boysaw | Point | Safe water buoys |
| bcnsaw | Point | Safe water beacons |
| lndmrk | Point | Landmarks |
Shipping & routing
| Layer | Geometry | Description |
|---|---|---|
| fairwy | Polygon | Fairway areas |
| tssbnd | Line | Traffic separation scheme boundaries |
| tselne | Line | Traffic separation lane centrelines |
| tselpt | Line | Traffic separation lane parts |
| tsezne | Polygon | Traffic separation zone areas |
| tssron | Line | Traffic separation roundabouts |
| prcare | Line | Precautionary areas |
| achare | Line | Anchorage areas |
Cables & pipelines
| Layer | Geometry | Description |
|---|---|---|
| cblsub | Line | Submarine cables. Visible from zoom 12. |
| pipsol | Line | Pipelines. Visible from zoom 12. |
| cblare | Line | Cable areas |
| ctnare | Line | Caution areas |
Depth attributes
Depth values are in metres below chart datum. The two key attributes on depth area layers are:
| Attribute | Layers | Description |
|---|---|---|
| drval1 | depare, drgare | Minimum depth of the area (shallow edge). Negative values indicate areas above chart datum. |
| drval2 | depare, drgare | Maximum depth of the area (deep edge). |
| depth | soundg | Sounding depth at the point. Formatted to one decimal place in the default style. |
| drval | basemap_deptharea | Single depth value used for low-zoom colour interpolation. |
To highlight areas shallower than your vessel's draft, filter on drval1:
map.addLayer({
id: 'shallow-hazard',
type: 'fill',
source: 'enc',
'source-layer': 'depare',
filter: ['all', ['>=', ['get', 'drval1'], 0], ['<=', ['get', 'drval1'], 2]],
paint: { 'fill-color': '#ff3300', 'fill-opacity': 0.4 }
});
Coverage & zoom levels
Geographic coverage
Current coverage is US coastal and inland waters based on NOAA ENC data. Charts are updated as NOAA publishes new ENC editions.
Zoom levels
| Zoom | Scale equivalent | Notable layers |
|---|---|---|
| 0–4 | Ocean / continental | Background, simplified depth areas, territorial waters, country/region labels |
| 5–7 | Coastal overview | Depth areas, coastlines, land, city labels, roads |
| 8–10 | Harbour approach | Fairways, TSS, anchorages, isolated danger buoys, cardinal marks |
| 10–12 | Harbour | All buoys and beacons with icons, lights with labels and arcs, depth contours |
| 11–14 | Berthing | Soundings, cables, pipelines, pontoons, landmarks |
Tiles are served up to zoom 14. Mapping libraries can oversample beyond zoom 14 for detail views using the maxzoom / tileSize settings — the data will not change but the vector features will scale.