Skip to main content

Vector Tiles

MapLibre / Mapbox compatible vector tiles. Layers: water, roads, boundary, buildings, poi.

Endpoint

GET /tiles/{z}/{x}/{y}

Requires Authorization header.

MapLibre Example

const map = new maplibregl.Map({
style: {
version: 8,
sources: {
arohon: {
type: 'vector',
tiles: ['https://map.arohon.co/tiles/{z}/{x}/{y}'],
minzoom: 0,
maxzoom: 14
}
},
layers: [
{ id: 'water', type: 'fill', source: 'arohon', 'source-layer': 'water', paint: { 'fill-color': '#aad3df' } },
{ id: 'roads', type: 'line', source: 'arohon', 'source-layer': 'roads', paint: { 'line-color': '#019157', 'line-width': 2 } }
]
},
transformRequest: (url, resourceType) => {
if (resourceType === 'Tile' && url.startsWith('https://map.arohon.co'))
return { url, headers: { 'Authorization': 'Bearer ' + apiKey } };
return { url };
}
});