View a fullscreen map

Toggle between the current display and fullscreen mode.

NPM module setup


npm install --save @maptiler/sdk
import { Map, MapStyle, 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 id
    style: MapStyle.STREETS,
    center: [11.255, 43.77], // starting position
    zoom: 13, // starting zoom
    fullscreenControl: true
});
Hide map navigation controls

Hide map navigation controls

Tutorials

Hide the map navigation and zoom controls.

Geolocate control how to get the user's location using the GPS

Geolocate control (GPS)

Tutorials

Enable GPS location tracking using the geolocate map control.

Was this helpful?