---
title: "MaplibreAttributionControl"
description: "Attribution control that displays data source credits with compact-mode collapsing and support for custom attribution text."
canonical_url: "https://maplibre.mhaibaraai.cn/en/docs/controls/attribution"
---
# MaplibreAttributionControl

> Attribution control that displays data source credits with compact-mode collapsing and support for custom attribution text.

## Introduction

`MaplibreAttributionControl` displays data source attribution in a corner of the map. `options.compact` collapses it into an expandable icon button, and `options.customAttribution` appends custom attribution text (a string or array of strings).

> [!TIP]
> 
> Attribution from styles and data sources is usually displayed automatically. Use this control to customize the presentation or add supplementary credits.

## Usage

Compact mode with custom attribution appended:

```vue [AttributionControlExample.vue]
<template>
  <div class="h-115 w-full overflow-hidden rounded-(--ui-radius) border border-default">
    <MaplibreMap :options="{ style: 'https://tiles.openfreemap.org/styles/positron', center: [116.39, 39.91], zoom: 10 }">
      <!-- compact 折叠为图标按钮，customAttribution 追加自定义版权 -->
      <MaplibreAttributionControl
        position="bottom-right"
        :options="{ compact: true, customAttribution: '© MOVK MapLibre' }"
      />
    </MaplibreMap>
  </div>
</template>
```

## API

### Props

```ts
/**
 * Props for the MaplibreAttributionControl component
 */
interface MaplibreAttributionControlProps {
  /**
   * 控件停靠位置；省略用地图默认位置
   */
  position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | undefined;
  /**
   * AttributionControl 构造选项
   */
  options?: AttributionControlOptions | undefined;
}
```

## Changelog

See commit history for [src/runtime/components/controls/AttributionControl.vue](https://github.com/mhaibaraai/movk-maplibre/commits/main/src/runtime/components/controls/AttributionControl.vue).


## Sitemap

See the full [sitemap](https://maplibre.mhaibaraai.cn/sitemap.md) for all pages.
