Create a globe map with 3D terrain elevation

Show a detailed 3D (three-dimensional) globe map with terrain elevation. Creating a 3D terrain globe view of your map requires only two lines of code. Simply include the projection and the terrain option within the map constructor.

Enhance the authenticity of your web mapping applications and data by using the globe projection and incorporating terrain relief into your maps. This will provide a greater sense of realism and depth to your visuals.

NPM module setup


npm install --save @maptiler/sdk
import { Map, config } from '@maptiler/sdk';
import '@maptiler/sdk/dist/maptiler-sdk.css';

config.apiKey = 'YOUR_MAPTILER_API_KEY_HERE';
const map = new Map({
  container: 'map', // container's id or the HTML element to render the map
  style:  'ocean',
  maxPitch: 85,
  center: [-115.54098, 51.2018],
  zoom: 14,
  pitch: 83,
  bearing: 37.1,
  projection: 'globe', //enable globe projection
  terrain: true, //add terrain elevation
  terrainExageration: 1.5
});
Projection control how to toggle the map between mercator and globe projection

Projection control (globe)

Tutorials

Toggle between Mercator and globe projections using map controls.

Display a 3D terrain map

3D terrain map

Tutorials

Create and display 3D terrain maps on web pages.

Create a globe map with ocean bathymetry terrain elevation

Globe with ocean bathymetry

Examples

Display ocean bathymetry and terrain elevation on 3D globe.

Animate a 3D plane flight in a globe using MapTiler 3D JS

Animate a 3D plane flight in a globe

Examples

Animate airplane flight paths using 3D models on globe.

Was this helpful?