---
title: "MaplibreAttributionControl"
description: "版权信息控件，展示数据来源署名，支持折叠与自定义版权文本。"
canonical_url: "https://maplibre.mhaibaraai.cn/docs/controls/attribution"
---
# MaplibreAttributionControl

> 版权信息控件，展示数据来源署名，支持折叠与自定义版权文本。

## 简介

`MaplibreAttributionControl` 在地图角落展示数据来源署名。`options.compact` 折叠为可展开的图标按钮，`options.customAttribution` 追加自定义版权文本（字符串或字符串数组）。

> [!TIP]
> 
> 样式或数据源自带的署名通常已自动显示；本控件用于自定义展示形态或补充版权。

## 用法

折叠模式并追加自定义版权：

```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.
