MapLibre (Map Tiles API)

MapLibre is a popular map rendering library, which can be used to display all our raster maps available using our Map Tiles API.

To use our Map Tiles API with MapLibre you’ll need:

Here’s a code snippet showing how to add our Outdoors map to your site:

<script src=""></script>
<div id="map" style="height:300px"></div>
    const map = new maplibregl.Map({
        container: 'map',
        style: {
            'version': 8,
            'sources': {
                'raster-tiles': {
                    'type': 'raster',
                    'tiles': [
                    'tileSize': 256,
                        '<a href="" target="_blank">&copy; Thunderforest</a> <a href="" target="_blank">&copy; OpenStreetMap contributors</a>'
            'layers': [
                    'id': 'simple-tiles',
                    'type': 'raster',
                    'source': 'raster-tiles',
                    'minzoom': 0,
                    'maxzoom': 22
        center: [-0.09, 51.505],
        zoom: 5

A more common use-case is using MapLibre to render client-side vector maps! We have a separate tutorial for using MapLibre with our Vector Styles API