---
title: "<ScriptMapLibreFullscreenControl> · Nuxt Scripts"
description: "Adds MapLibre's fullscreen button to the nearest parent map. The map container goes fullscreen by default. Pass options.container to make a different element fullscreen."
canonical_url: "https://scripts.nuxt.com/scripts/maplibre/api/fullscreen-control"
meta:
  "og:description": "Adds MapLibre's fullscreen button to the nearest parent map. The map container goes fullscreen by default. Pass options.container to make a different element fullscreen."
  "og:image": "https://scripts.nuxt.com/_og/s/o_24d69ce6493bde65.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "<ScriptMapLibreFullscreenControl> · Nuxt Scripts"
  "twitter:image": "https://scripts.nuxt.com/_og/s/o_24d69ce6493bde65.png"
---

> Index of every page on this site: [llms.txt](https://scripts.nuxt.com/llms.txt)

**Api**

# **\<ScriptMapLibreFullscreenControl>**

[Copy for LLMs](https://scripts.nuxt.com/scripts/maplibre/api/fullscreen-control.md)

Adds MapLibre's fullscreen button to the nearest parent map. The map container goes fullscreen by default. Pass `**options.container**` to make a different element fullscreen.

```vue
<template>
  <ScriptMapLibreMap map-style="https://tiles.openfreemap.org/styles/liberty" :center="[147.33, -42.88]">
    <ScriptMapLibreFullscreenControl
      position="top-right"
      @fullscreenstart="console.log('fullscreen')"
      @fullscreenend="console.log('windowed')"
    />
  </ScriptMapLibreMap>
</template>
```

`**new maplibregl.FullscreenControl()**` reads `**options**` and `**position**` once, when it creates the control. To apply a change, change the component `**key**`.

If the browser has no Fullscreen API, or `**options.pseudo**` is `**true**`, MapLibre expands the map with CSS instead.

`**position**``MapLibre.ControlPosition`

`**options**``MapLibre.FullscreenControlOptions`

[Edit this page](https://github.com/nuxt/scripts/edit/main/docs/content/maplibre/2.api/9.fullscreen-control.md)

[Markdown For LLMs](https://scripts.nuxt.com/scripts/maplibre/api/fullscreen-control.md)

[**\<ScriptMapLibreGeolocateControl>** Adds MapLibre's geolocate button to the nearest parent map. The button asks the browser for the user's location and moves the camera there.](https://scripts.nuxt.com/scripts/maplibre/api/geolocate-control) [**MapLibre GL JS** Add lazy-loaded, provider-agnostic vector maps to Nuxt with MapLibre GL JS.](https://scripts.nuxt.com/scripts/maplibre)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://scripts.nuxt.com/#website","@type":"WebSite","description":"Nuxt Scripts lets you load third-party scripts with better performance, privacy, security and DX. It includes many popular third-parties out of the box.","name":"Nuxt Scripts","url":"https://scripts.nuxt.com/","publisher":{"@id":"https://scripts.nuxt.com/#identity"}},{"@id":"https://scripts.nuxt.com/scripts/maplibre/api/fullscreen-control#webpage","@type":"WebPage","description":"Adds MapLibre's fullscreen button to the nearest parent map. The map container goes fullscreen by default. Pass options.container to make a different element fullscreen.","name":"<ScriptMapLibreFullscreenControl>","url":"https://scripts.nuxt.com/scripts/maplibre/api/fullscreen-control","breadcrumb":{"@id":"https://scripts.nuxt.com/scripts/maplibre/api/fullscreen-control#breadcrumb"},"isPartOf":{"@id":"https://scripts.nuxt.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://scripts.nuxt.com/scripts/maplibre/api/fullscreen-control"]}],"primaryImageOfPage":{"@id":"https://scripts.nuxt.com/#logo"}},{"@id":"https://scripts.nuxt.com/#identity","@type":"Organization","name":"Nuxt Scripts","url":"https://scripts.nuxt.com","logo":{"@id":"https://scripts.nuxt.com/#logo"}},{"@id":"https://scripts.nuxt.com/scripts/maplibre/api/fullscreen-control#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Nuxt Scripts","item":"https://scripts.nuxt.com/","position":1},{"@type":"ListItem","name":"Scripts","item":"https://scripts.nuxt.com/scripts","position":2},{"@type":"ListItem","name":"Maplibre","item":"https://scripts.nuxt.com/scripts/maplibre","position":3},{"@type":"ListItem","name":"API","item":"https://scripts.nuxt.com/scripts/maplibre/api","position":4},{"@type":"ListItem","name":"<ScriptMapLibreFullscreenControl>","item":"https://scripts.nuxt.com/scripts/maplibre/api/fullscreen-control","position":5}]},{"@id":"https://scripts.nuxt.com/#logo","@type":"ImageObject","caption":"Nuxt Scripts","contentUrl":"https://scripts.nuxt.com/logo.svg","inLanguage":"en","url":"https://scripts.nuxt.com/logo.svg"}]}
```

## Sitemap

See the full [sitemap](https://scripts.nuxt.com/sitemap.md) for all pages.
