Documentation

OSM Buildings

Leaflet Layer

Mapbox GL

Data Tiles

OSM Buildings

Source code on GitHub
API documentation

Getting started


<link href="https://cdn.osmbuildings.org/4.0.1/OSMBuildings.css" rel="stylesheet">
<script src="https://cdn.osmbuildings.org/4.0.1/OSMBuildings.js"></script>

<div id="map"></div>

<script>
var map = new OSMBuildings({
container: 'map',
position: { latitude: 52.51836, longitude: 13.40438 },
zoom: 16,
minZoom: 15,
maxZoom: 20,
attribution: '© Data <a href="https://openstreetmap.org/copyright/">OpenStreetMap</a> © Map <a href="https://mapbox.com/">Mapbox</a> © 3D <a href="https://osmbuildings.org/copyright/">OSM Buildings</a>'
})

map.addMapTiles('https://{s}.tiles.mapbox.com/v3/[YOUR_MAPBOX_KEY]/{z}/{x}/{y}.png');
map.addGeoJSONTiles('https://{s}.data.osmbuildings.org/0.2/anonymous/tile/{z}/{x}/{y}.json');
</script>

Example