Create a globe map with ocean bathymetry terrain elevation

Show a detailed 3D globe map of the ocean’s seafloor and its bathymetry.

Increase the authenticity of your web mapping applications and data by using the globe projection and incorporating ocean 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: [165.9043, 54.7078], // starting position [lng, lat]
  zoom: 10.04, // starting zoom
  bearing: -33.2,
  pitch: 72,
  projection: 'globe' //enable globe projection
});

map.on('load', function() {
  map.addSource("bathymetry", {
    type: 'raster-dem',
    url: 'https://api.maptiler.com/tiles/ocean-rgb/tiles.json',
  });
  map.setTerrain({ source: 'bathymetry', exaggeration: 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.

Create a globe map with 3D terrain elevation

Globe with elevation terrain

Examples

Create a 3D globe map featuring terrain elevation.

How to switch map projection programmatically

Switch between “mercator” and “globe”

Examples

Programmatically switch between Mercator and globe map projections.

Display a 3D terrain map

3D terrain map

Tutorials

Create and display 3D terrain maps on web pages.

Was this helpful?