3D
3D
A Maptoolkit map can show two things in 3D: the ground, raised by an elevation model, and the buildings on it. Both appear when you tilt the map, and both work without an API key.
What you can show
| How you turn it on | Details | |
|---|---|---|
| Terrain | Add -3d to any community style name, for example summer-3d.json | 3D Terrain |
| Extruded buildings | Built into the Street and Summer styles. For the other styles, add a fill-extrusion layer | 3D Buildings |
| Buildings with roof shapes, 3D city models and 3D trees | Add the Scene3D Control to a MapLibre GL JS map with the Street or Summer style | 3D Buildings |
On a -3d style, the buildings stand on the terrain.
Our MapLibre plugins for 3D
| Plugin | What it does |
|---|---|
| Scene3D Control | Reads the 3D scene from the style and adds the buildings with roof shapes and the trees. This is the only package you install. |
| 3D Layers | The three.js layers that draw the buildings and trees. The Scene3D Control loads it for you. |
Both need MapLibre GL JS 6 or later.
What each library supports
| Library | 3D terrain | 3D buildings |
|---|---|---|
| MapLibre GL JS | Yes | Yes, with roof shapes through the Scene3D Control |
| deck.gl | Yes, with the terrarium decoder | Extruded blocks, through a MapLibre basemap |
| MapLibre Native Android | No | Extruded blocks |
| MapLibre Native iOS | No | Extruded blocks |
| Flutter | No | Extruded blocks |
| React Native | No | Extruded blocks |
| kepler.gl | What the style carries | What the style carries |
| Leaflet | No | No |
| OpenLayers | No | No |
| CesiumJS | No | No |
The 3D Terrain and 3D Buildings pages explain why a library cannot show 3D, and link the examples for each library.