---
title: "<ScriptMapLibreAttributionControl> · Nuxt Scripts"
description: "Moves or restyles the map's attribution. Use it to change the attribution position, force compact mode, or add your own credits."
canonical_url: "https://scripts.nuxt.com/scripts/maplibre/api/attribution-control"
meta:
  "og:description": "Moves or restyles the map's attribution. Use it to change the attribution position, force compact mode, or add your own credits."
  "og:image": "https://scripts.nuxt.com/_og/s/o_af3f9a35a21181af.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "<ScriptMapLibreAttributionControl> · Nuxt Scripts"
  "twitter:image": "https://scripts.nuxt.com/_og/s/o_af3f9a35a21181af.png"
---

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

**Api**

# **\<ScriptMapLibreAttributionControl>**

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

Moves or restyles the map's attribution. Use it to change the attribution position, force compact mode, or add your own credits.

```vue
<template>
  <ScriptMapLibreMap map-style="https://tiles.openfreemap.org/styles/liberty" :center="[147.33, -42.88]">
    <ScriptMapLibreAttributionControl
      position="bottom-left"
      :options="{ compact: false, customAttribution: 'Data: Hobart City Council' }"
    />
  </ScriptMapLibreMap>
</template>
```

Most tile providers require attribution. OpenFreeMap and OpenStreetMap require it. Keep an attribution control on every map that shows their tiles.

## How it works with the default attribution

MapLibre adds an attribution control to every map by default. Two controls would show the attribution twice. This component prevents that:

- When the component mounts, it removes the map's attribution control and adds its own.
- When the component unmounts, it adds the map's control back. This also happens if your code removed the component's control first.

When no other attribution control is present, the map shows attribution exactly once. Unmounting the component does not remove the default attribution.

If you set `**attributionControl: false**` in the map `**options**`, the map has no control to restore. The component then adds its own control, and unmounting removes it.

The component replaces only the control that `**<ScriptMapLibreMap>**` adds. If your code adds an attribution control with `**map.addControl()**`, that control stays on the map.

Use one `**<ScriptMapLibreAttributionControl>**` per map. The map's control returns to its default position, bottom-right, when the component unmounts.

## Attribution text

The control always shows the attribution from the style sources, for example OpenFreeMap and OpenStreetMap. `**options**` cannot remove it.

The component `**options**` override the options of the map's attribution control. Options you omit keep the map's values.

If you omit `**options.customAttribution**`, the credits from the map's control stay, including MapLibre's default "MapLibre" link. If you set it, your value replaces them.

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

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

`**options**``MapLibre.AttributionControlOptions`

Options passed to \`new maplibregl.AttributionControl()\`. Source attribution from the style and tiles always shows. \`customAttribution\` only adds text.

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

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

[**\<ScriptMapLibreMap>** The map facade reserves layout space during SSR, loads MapLibre when triggered, creates the Map, and provides it to child components.](https://scripts.nuxt.com/scripts/maplibre/api/script-maplibre-map) [**\<ScriptMapLibreMarker>** Adds a reactive MapLibre Marker. Supply a unique aria-label so its generated DOM element has a useful accessible name.](https://scripts.nuxt.com/scripts/maplibre/api/marker)

**On this page **

- [How it works with the default attribution](#how-it-works-with-the-default-attribution)
- [Attribution text](#attribution-text)

```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/attribution-control#webpage","@type":"WebPage","description":"Moves or restyles the map's attribution. Use it to change the attribution position, force compact mode, or add your own credits.","name":"<ScriptMapLibreAttributionControl>","url":"https://scripts.nuxt.com/scripts/maplibre/api/attribution-control","breadcrumb":{"@id":"https://scripts.nuxt.com/scripts/maplibre/api/attribution-control#breadcrumb"},"isPartOf":{"@id":"https://scripts.nuxt.com/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://scripts.nuxt.com/scripts/maplibre/api/attribution-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/attribution-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":"<ScriptMapLibreAttributionControl>","item":"https://scripts.nuxt.com/scripts/maplibre/api/attribution-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.
